This commit is contained in:
Andras Bacsai 2023-06-19 11:02:01 +02:00
parent 448182497f
commit b94a50e720
2 changed files with 2 additions and 2 deletions

View File

@ -28,8 +28,8 @@ public function mount($servers)
public function runCommand()
{
$this->validate();
try {
$this->validate();
$activity = remote_process([$this->command], Server::where('uuid', $this->server)->first(), ignore_errors: true);
$this->emit('newMonitorActivity', $activity->id);
} catch (\Exception $e) {

View File

@ -1,5 +1,5 @@
<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.select label="Server" id="server" required>
@foreach ($servers as $server)