generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28c6738
commit 692742a
Showing
13 changed files
with
377 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,29 @@ | ||
<?php | ||
|
||
// config for Geow/DiskMetrics | ||
return [ | ||
/** | ||
* Determines the state o the package | ||
*/ | ||
'enabled' => env('GEOW_DISK_METRICS', true), | ||
|
||
/** | ||
* Track disks defined in filesystems.php config file. | ||
* Support only 'local' or 's3' driver. | ||
* | ||
* You can pass an array ['directories', 'files'] ONLY to a local disk | ||
* which will determine what to be counted. To count both, | ||
* you can pass an empty array. | ||
*/ | ||
'disks' => [ | ||
'local' => [], | ||
// 'public' => [], | ||
// 's3' => [] | ||
], | ||
|
||
/** | ||
* How often (in minutes) should the Laravel Pulse capture data? | ||
* The value should be greated than 1! | ||
* Default: 10 | ||
*/ | ||
'record_interval' => 10 | ||
]; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<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 | ||
<div class="grid grid-cols-1 @lg:grid-cols-2 @3xl:grid-cols-3 @6xl:grid-cols-4 gap-2"> | ||
<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> | ||
</div> | ||
@endif | ||
</x-pulse::scroll> | ||
</x-pulse::card> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.