From 1175d68ab5c2e0f8a11b51fdc810e8a54140575f Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 1 Nov 2023 13:47:40 +0100 Subject: [PATCH] feat: full screen logs fix: logs are in order now --- app/Http/Livewire/Project/Shared/GetLogs.php | 8 +++++--- resources/css/app.css | 3 +++ .../project/shared/get-logs.blade.php | 19 ++++++++++++++++--- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/app/Http/Livewire/Project/Shared/GetLogs.php b/app/Http/Livewire/Project/Shared/GetLogs.php index 90983785d..e82f20497 100644 --- a/app/Http/Livewire/Project/Shared/GetLogs.php +++ b/app/Http/Livewire/Project/Shared/GetLogs.php @@ -33,9 +33,11 @@ class GetLogs extends Component if ($refresh) { $this->outputs = ''; } - Process::run($sshCommand, function (string $type, string $output) { - $this->doSomethingWithThisChunkOfOutput($output); - }); + $command = Process::run($sshCommand); + $output = $command->output(); + $error = $command->errorOutput(); + $this->doSomethingWithThisChunkOfOutput($output); + $this->doSomethingWithThisChunkOfOutput($error); } } public function render() diff --git a/resources/css/app.css b/resources/css/app.css index ee4ec7b77..76d7f19a5 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -121,3 +121,6 @@ tr td:first-child { .subtitle { @apply pt-2 pb-10; } +.fullscreen { + @apply fixed top-0 left-0 w-full h-full z-[9999] bg-coolgray-200; +} diff --git a/resources/views/livewire/project/shared/get-logs.blade.php b/resources/views/livewire/project/shared/get-logs.blade.php index eed8f143b..3514d4cdb 100644 --- a/resources/views/livewire/project/shared/get-logs.blade.php +++ b/resources/views/livewire/project/shared/get-logs.blade.php @@ -14,10 +14,23 @@ Refresh -
+
- + class="scrollbar flex flex-col-reverse w-full overflow-y-auto border border-solid rounded border-coolgray-300 max-h-[32rem] p-4 pt-6 text-xs text-white relative"> + +
{{ $outputs }}