fix
This commit is contained in:
parent
448182497f
commit
b94a50e720
@ -28,8 +28,8 @@ class RunCommand extends Component
|
|||||||
|
|
||||||
public function runCommand()
|
public function runCommand()
|
||||||
{
|
{
|
||||||
try {
|
|
||||||
$this->validate();
|
$this->validate();
|
||||||
|
try {
|
||||||
$activity = remote_process([$this->command], Server::where('uuid', $this->server)->first(), ignore_errors: true);
|
$activity = remote_process([$this->command], Server::where('uuid', $this->server)->first(), ignore_errors: true);
|
||||||
$this->emit('newMonitorActivity', $activity->id);
|
$this->emit('newMonitorActivity', $activity->id);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div>
|
<div>
|
||||||
<form class="flex items-end justify-center gap-2" wire:submit.prevent='runCommand'>
|
<form class="flex flex-col justify-center gap-2 xl:items-end xl:flex-row" wire:submit.prevent='runCommand'>
|
||||||
<x-forms.input placeholder="ls -l" autofocus noDirty id="command" label="Command" required />
|
<x-forms.input placeholder="ls -l" autofocus noDirty id="command" label="Command" required />
|
||||||
<x-forms.select label="Server" id="server" required>
|
<x-forms.select label="Server" id="server" required>
|
||||||
@foreach ($servers as $server)
|
@foreach ($servers as $server)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user