refactor(activity-monitor): change activity property visibility and update view references for consistency

This commit is contained in:
Andras Bacsai
2025-05-30 12:56:34 +02:00
parent 200b5cd4fb
commit a990cc01c2
2 changed files with 5 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ class ActivityMonitor extends Component
public bool $showWaiting = false; public bool $showWaiting = false;
protected $activity; public $activity;
public static $eventDispatched = false; public static $eventDispatched = false;

View File

@@ -1,6 +1,6 @@
@php use App\Actions\CoolifyTask\RunRemoteProcess; @endphp @php use App\Actions\CoolifyTask\RunRemoteProcess; @endphp
<div> <div class="h-full">
@if ($this->activity) @if ($activity)
@if (isset($header)) @if (isset($header))
<div class="flex gap-2 pb-2"> <div class="flex gap-2 pb-2">
<h3>{{ $header }}</h3> <h3>{{ $header }}</h3>
@@ -11,10 +11,10 @@
@endif @endif
<div @class([ <div @class([
'flex flex-col-reverse w-full px-4 py-2 overflow-y-auto bg-white border border-solid rounded-sm dark:text-white dark:bg-coolgray-100 scrollbar border-neutral-300 dark:border-coolgray-300', 'flex flex-col-reverse w-full px-4 py-2 overflow-y-auto bg-white border border-solid rounded-sm dark:text-white dark:bg-coolgray-100 scrollbar border-neutral-300 dark:border-coolgray-300',
'max-h-[48rem]' => $fullHeight, 'h-full' => $fullHeight,
'max-h-96' => !$fullHeight, 'max-h-96' => !$fullHeight,
])> ])>
<pre class="font-mono whitespace-pre-wrap" @if ($isPollingActive) wire:poll.1000ms="polling" @endif>{{ RunRemoteProcess::decodeOutput($this->activity) }}</pre> <pre class="font-mono whitespace-pre-wrap" @if ($isPollingActive) wire:poll.1000ms="polling" @endif>{{ RunRemoteProcess::decodeOutput($activity) }}</pre>
</div> </div>
@else @else
@if ($showWaiting) @if ($showWaiting)