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 @@ 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) {

View File

@ -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)