javascript - Launch Dynamic Web Console on PHP or Laravel
one text
Ex. VMWare Client
I'm trying to integrate a web console into my Laravel 5.8 application. I have a list of servers in a table. Each server will have a unique IP address, when clicked on IP, will open up the server detail view, I want to add a button to launch the web console
, there. When clicked, should open a new tab, with a logging session, where users can enter any command they want.
I've been research around, I only see this package that allows me to SSH into any server with any inputs dynamically. For web console, I came across this one, but it seems to only allow local, staging, and a prod server IP. In my case, I need to be able to pass in IP address, since it will dynamically base on which one the user selected. If you guys know any other PHP or JS package that can do what I am looking for, please kindly suggest.
I've tried:
Route::get('ssh/console', 'SshController@console');
public function console()
{
$inputs = Input::all();
$host = $inputs['host'];
$username = $inputs['username'];
$password = $inputs['password'];
// config(['console.user.host' => $host]);
config(['console.user.name' => $username]);
config(['console.user.password' => $password]);
return LaravelWebConsole::show($host, $username, $password);
}
Result:
It seems to listed the file of my server instead of the server, that I passed in the query string $ip
. As you can see, I've tried this already
config(['console.user.host' => $host]);
config(['console.user.name' => $username]);
config(['console.user.password' => $password]);
Source