fix(logs): constrain activity monitor output width
This commit is contained in:
parent
03d2fabc64
commit
1aca7ead8c
2 changed files with 18 additions and 3 deletions
|
|
@ -48,11 +48,11 @@
|
||||||
characterData: true
|
characterData: true
|
||||||
});" x-destroy="observer && observer.disconnect()"
|
});" x-destroy="observer && observer.disconnect()"
|
||||||
@class([
|
@class([
|
||||||
'flex flex-col 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 w-full min-w-0 max-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-1 min-h-0' => $fullHeight,
|
'flex-1 min-h-0' => $fullHeight,
|
||||||
'max-h-96' => !$fullHeight,
|
'max-h-96' => !$fullHeight,
|
||||||
])>
|
])>
|
||||||
<pre class="font-logs whitespace-pre-wrap" @if ($isPollingActive) wire:poll.1000ms="polling" @endif>{{ RunRemoteProcess::decodeOutput($activity) }}</pre>
|
<pre class="font-logs min-w-0 max-w-full whitespace-pre-wrap wrap-anywhere" @if ($isPollingActive) wire:poll.1000ms="polling" @endif>{{ RunRemoteProcess::decodeOutput($activity) }}</pre>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
@if ($showWaiting)
|
@if ($showWaiting)
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,25 @@
|
||||||
->toContain('class="flex flex-col font-logs"')
|
->toContain('class="flex flex-col font-logs"')
|
||||||
->toContain('class="font-logs text-neutral-400 mb-2"')
|
->toContain('class="font-logs text-neutral-400 mb-2"')
|
||||||
->and($activityMonitorView)
|
->and($activityMonitorView)
|
||||||
->toContain('<pre class="font-logs whitespace-pre-wrap"')
|
->toContain('<pre class="font-logs min-w-0 max-w-full whitespace-pre-wrap wrap-anywhere"')
|
||||||
->and($dockerCleanupView)
|
->and($dockerCleanupView)
|
||||||
->toContain('class="flex-1 text-sm font-logs text-gray-700 dark:text-gray-300"')
|
->toContain('class="flex-1 text-sm font-logs text-gray-700 dark:text-gray-300"')
|
||||||
->toContain('class="font-logs text-sm text-gray-600 dark:text-gray-300 whitespace-pre-wrap"')
|
->toContain('class="font-logs text-sm text-gray-600 dark:text-gray-300 whitespace-pre-wrap"')
|
||||||
->and($terminalClient)
|
->and($terminalClient)
|
||||||
->toContain('"Geist Mono"');
|
->toContain('"Geist Mono"');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('constrains activity monitor logs inside the available viewport', function () {
|
||||||
|
$activityMonitorView = file_get_contents(resource_path('views/livewire/activity-monitor.blade.php'));
|
||||||
|
|
||||||
|
expect($activityMonitorView)
|
||||||
|
->toContain('flex flex-col w-full min-w-0 max-w-full')
|
||||||
|
->toContain('<pre class="font-logs min-w-0 max-w-full whitespace-pre-wrap wrap-anywhere"');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('bounds database startup activity monitor to the slide over height', function () {
|
||||||
|
$databaseHeadingView = file_get_contents(resource_path('views/livewire/project/database/heading.blade.php'));
|
||||||
|
|
||||||
|
expect($databaseHeadingView)
|
||||||
|
->toContain('<div wire:ignore class="h-full min-h-0 min-w-0 max-w-full">');
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue