Skip to content

Commit

Permalink
fix assets publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
geowrgetudor committed Dec 6, 2023
1 parent 8aedaf1 commit a6323b0
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 53 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
},
"autoload": {
"psr-4": {
"Geow\\DiskMetrics\\": "src/",
"Geow\\DiskMetrics\\Database\\Factories\\": "database/factories/"
"Geow\\DiskMetrics\\": "src/"
}
},
"autoload-dev": {
Expand Down
100 changes: 49 additions & 51 deletions resources/views/livewire/disk-metrics.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,57 @@
@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 }}
<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
</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 }}
@if ($details['disk_data']['bucket'])
{{ $details['disk_data']['bucket'] }}
@endif
</x-pulse::td>
</tr>
@endforeach
</tbody>
</x-pulse::table>
</div>
</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>
2 changes: 2 additions & 0 deletions src/DiskMetricsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public function configurePackage(Package $package): void

public function boot(): void
{
parent::boot();

$this->loadViewsFrom(__DIR__ . '/../resources/views', 'disk-metrics');

$this->callAfterResolving('livewire', function (LivewireManager $livewire, Application $app) {
Expand Down

0 comments on commit a6323b0

Please sign in to comment.