Refactor ActivityMonitor component to add fullHeight option
This commit is contained in:
parent
15ec39bc56
commit
3935a3c885
@ -13,6 +13,7 @@ class ActivityMonitor extends Component
|
||||
public $activityId;
|
||||
public $eventToDispatch = 'activityFinished';
|
||||
public $isPollingActive = false;
|
||||
public bool $fullHeight = false;
|
||||
public bool $showWaiting = false;
|
||||
|
||||
protected $activity;
|
||||
|
@ -9,9 +9,12 @@
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<div
|
||||
class="flex flex-col-reverse w-full px-4 py-2 overflow-y-auto bg-white border border-solid rounded dark:text-white dark:bg-coolgray-100 scrollbar border-neutral-300 dark:border-coolgray-300 max-h-96">
|
||||
<pre class="font-mono whitespace-pre-wrap" @if ($isPollingActive) wire:poll.1000ms="polling" @endif>{{ RunRemoteProcess::decodeOutput($this->activity) }}</pre>
|
||||
<div @class([
|
||||
'flex flex-col-reverse w-full px-4 py-2 overflow-y-auto bg-white border border-solid rounded dark:text-white dark:bg-coolgray-100 scrollbar border-neutral-300 dark:border-coolgray-300',
|
||||
'h-full' => $fullHeight,
|
||||
'max-h-96' => !$fullHeight,
|
||||
])>
|
||||
<pre class="max-h-screen font-mono whitespace-pre-wrap" @if ($isPollingActive) wire:poll.1000ms="polling" @endif>{{ RunRemoteProcess::decodeOutput($this->activity) }}</pre>
|
||||
</div>
|
||||
@else
|
||||
@if ($showWaiting)
|
||||
|
Loading…
Reference in New Issue
Block a user