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