This commit is contained in:
2024-01-27 14:33:42 +05:00
parent db04811bd8
commit 2ee13d5434
8 changed files with 123 additions and 186 deletions

View File

@@ -1,65 +0,0 @@
<x-pulse::card :cols="$cols" :rows="$rows" :class="$class">
<x-pulse::card-header name="{{ __('Disk Metrics') }}">
<x-slot:icon>
<x-dynamic-component :component="'pulse::icons.sparkles'" />
</x-slot:icon>
</x-pulse::card-header>
<x-pulse::scroll :expand="$expand" wire:poll.5s="">
@if (empty($data))
<x-pulse::no-results />
@else
<x-pulse::table>
<colgroup>
<col width="100%" />
<col width="0%" />
<col width="0%" />
</colgroup>
<x-pulse::thead>
<tr>
<x-pulse::th>{{ __('Disk') }}</x-pulse::th>
<x-pulse::th class="text-right">{{ __('Directories') }}</x-pulse::th>
<x-pulse::th class="text-right">{{ __('Files') }}</x-pulse::th>
<x-pulse::th class="text-right">{{ __('Size') }}</x-pulse::th>
</tr>
</x-pulse::thead>
<tbody>
@foreach ($data as $diskName => $details)
<tr class="h-2 first:h-0"></tr>
<tr wire:key="{{ $diskName }}">
<x-pulse::td class="max-w-[1px]">
<code class="block text-xs text-gray-900 dark:text-gray-100 truncate"
title="{{ $diskName }}">
{{ ucfirst($diskName) }}
</code>
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400 truncate" title="">
@if ($details['disk_data']['root'])
{{ $details['disk_data']['root'] }}
@endif
@if ($details['disk_data']['bucket'])
{{ $details['disk_data']['bucket'] }}
@endif
</p>
</x-pulse::td>
<x-pulse::td numeric class="text-gray-700 dark:text-gray-300 font-bold">
@if (isset($details['metrics']['directory_count']))
{{ $details['metrics']['directory_count']->value }}
@endif
</x-pulse::td>
<x-pulse::td numeric class="text-gray-700 dark:text-gray-300 font-bold">
@if (isset($details['metrics']['file_count']))
{{ $details['metrics']['file_count']->value }}
@endif
</x-pulse::td>
<x-pulse::td numeric class="text-gray-700 dark:text-gray-300 font-bold">
@if (isset($details['metrics']['total_size']))
{{ $details['metrics']['total_size']->value }}
@endif
</x-pulse::td>
</tr>
@endforeach
</tbody>
</x-pulse::table>
@endif
</x-pulse::scroll>
</x-pulse::card>

View File

@@ -1,18 +1,26 @@
<x-pulse>
<livewire:pulse.about-application cols="4" rows="2" />
<livewire:disk-metrics cols="4" rows="2" />
<livewire:4xx cols="4" rows="2" />
<livewire:pulse.servers cols="full" />
<livewire:pulse.usage cols="4" rows="2" />
<livewire:4xx cols="8" rows="2" />
<livewire:pulse.about-application cols="4" rows="2" />
<livewire:pulse.queues cols="4" />
<livewire:pulse.cache cols="4" />
<livewire:database cols="full" title="Active threads" :values="['Threads_connected', 'Threads_running']" :graphs="[
'avg' => ['Threads_connected' => '#ffffff', 'Threads_running' => '#3c5dff'],
]" />
<livewire:database cols="full" title="Connections" :values="['Connections', 'Max_used_connections']" />
<livewire:database cols="full" title="Innodb" :values="['Innodb_buffer_pool_reads', 'Innodb_buffer_pool_read_requests', 'Innodb_buffer_pool_pages_total']" :graphs="[
'avg' => ['Innodb_buffer_pool_reads' => '#ffffff', 'Innodb_buffer_pool_read_requests' => '#3c5dff'],
]" />
<livewire:pulse.slow-queries cols="8" />
<livewire:pulse.exceptions cols="6" />