From 2d6af39ed0dcb9d68c1fa3cf9c33ca55dd9f3e26 Mon Sep 17 00:00:00 2001 From: Joao Patricio Date: Mon, 20 Mar 2023 14:29:03 +0000 Subject: [PATCH] Have Sail and SSU. Runs a command on a remote host. --- app/Http/Livewire/RunCommand.php | 19 ++++++++++- .../views/livewire/run-command.blade.php | 32 ++++++++++++++++--- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/app/Http/Livewire/RunCommand.php b/app/Http/Livewire/RunCommand.php index 11dad0893..96add0fb3 100755 --- a/app/Http/Livewire/RunCommand.php +++ b/app/Http/Livewire/RunCommand.php @@ -26,7 +26,7 @@ public function runCommand() // Override manual to experiment $override = 0; - if($override) { + if ($override) { // Good to play with the throttle feature $sleepingBeauty = 'x=1; while [ $x -le 40 ]; do sleep 0.1 && echo "Welcome $x times" $(( x++ )); done'; @@ -42,6 +42,23 @@ public function runCommand() $this->activity = coolifyProcess($this->command, 'testing-host'); } + public function runSleepingBeauty() + { + $this->isKeepAliveOn = true; + + $this->activity = coolifyProcess('x=1; while [ $x -le 40 ]; do sleep 0.1 && echo "Welcome $x times" $(( x++ )); done', 'testing-host'); + } + + public function runDummyProjectBuild() + { + $this->isKeepAliveOn = true; + + $this->activity = coolifyProcess(<<activity?->refresh(); diff --git a/resources/views/livewire/run-command.blade.php b/resources/views/livewire/run-command.blade.php index 782b5c309..370264e6c 100755 --- a/resources/views/livewire/run-command.blade.php +++ b/resources/views/livewire/run-command.blade.php @@ -2,13 +2,37 @@
-
+
+
+
+
+ + @isset($activity?->id)
Activity: {{ $activity?->id ?? 'waiting' }} @@ -51,7 +75,7 @@ style=" background-color: #FFFFFF; width: 1200px; - height: 600px; + height: 300px; overflow-y: scroll; display: flex; flex-direction: column-reverse;