バッシュ
このコミットが含まれているのは:
コミット
39883a7213
|
@ -7,7 +7,15 @@ use Illuminate\Http\Request;
|
|||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class BashController extends Controller {
|
||||
public function ls($pwd) { // /api/rpc/bash/ls/pwd
|
||||
return 'page forum store user';
|
||||
public function exec (Request $r) { // /api/rpc/bash/exec
|
||||
if ($r->arg[0] == 'ls') {
|
||||
return $this->ls($r->arg[2], $r->arg[1]);
|
||||
}
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
public function ls($pwd='', $opt='') {
|
||||
return 'page forum user';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,9 @@
|
|||
},
|
||||
ls(pwd) {
|
||||
var neopwd = pwd.replace('/', 'sl');
|
||||
axios.get('/api/rpc/bash/ls/' + neopwd).then(res => {
|
||||
axios.get('/api/rpc/bash/exec', {
|
||||
arg: ['ls', '', '']
|
||||
}).then(res => {
|
||||
this.result.push({
|
||||
username: this.user,
|
||||
hostname: this.host,
|
||||
|
|
|
@ -8,3 +8,6 @@
|
|||
// Bootstrap
|
||||
@import '~bootstrap/scss/bootstrap';
|
||||
|
||||
html {
|
||||
cursor: text;
|
||||
}
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
*/
|
||||
|
||||
// Commands
|
||||
Route::get('/api/rpc/bash/ls/{pwd}', 'BashController@ls');
|
||||
Route::get('/api/rpc/bash/exec', 'BashController@exec');
|
||||
|
|
新しいイシューから参照