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 $activityId;
|
||||||
public $eventToDispatch = 'activityFinished';
|
public $eventToDispatch = 'activityFinished';
|
||||||
public $isPollingActive = false;
|
public $isPollingActive = false;
|
||||||
|
public bool $fullHeight = false;
|
||||||
public bool $showWaiting = false;
|
public bool $showWaiting = false;
|
||||||
|
|
||||||
protected $activity;
|
protected $activity;
|
||||||
|
@ -9,9 +9,12 @@
|
|||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<div
|
<div @class([
|
||||||
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">
|
'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',
|
||||||
<pre class="font-mono whitespace-pre-wrap" @if ($isPollingActive) wire:poll.1000ms="polling" @endif>{{ RunRemoteProcess::decodeOutput($this->activity) }}</pre>
|
'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>
|
</div>
|
||||||
@else
|
@else
|
||||||
@if ($showWaiting)
|
@if ($showWaiting)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user