Snapshot of main at 9f39a6e1e (2026-11-02)
This commit is contained in:
commit
6ccf1792d7
2580 files changed
+1040202
No files matched your search
@@ -0,0 +1,76 @@
|
||||
<div class="scroll-py-3">
|
||||
<div class="mb-3">
|
||||
<h3 class="text-lg font-semibold text-theme-text-primary">{{ $logTitle }}</h3>
|
||||
|
||||
@if ($message)
|
||||
<div class="mt-2">
|
||||
{!! $message !!}
|
||||
</div>
|
||||
@else
|
||||
<div class="mt-2 text-xs text-theme-muted">{{ __('Recent log output') }}</div>
|
||||
@endif
|
||||
|
||||
@if ($fileSize)
|
||||
<div class="mt-1 text-xs text-theme-muted">
|
||||
<span>{{ __('File size') }}: <span class="text-theme-text-primary">{{ $fileSize }}</span></span>
|
||||
<span class="ml-4">{{ __('Last modified') }}: <span class="text-theme-text-primary">{{ $lastModified }}</span></span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($logContent)
|
||||
<div class="box-border max-h-[200px] overflow-x-auto overflow-y-auto rounded-lg bg-black pb-6 pl-6 pr-6 font-mono text-xs text-gray-200"
|
||||
id="log-scroll-{{ $logFilename }}" style="border-radius: 0.5rem;">
|
||||
<div class="m-0 w-full whitespace-pre-wrap">
|
||||
{{ $logContent }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 flex w-full justify-between">
|
||||
<x-jetstream.secondary-button type="button" wire:click="refreshLog" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="refreshLog">{{ __('Refresh log') }}</span>
|
||||
<span wire:loading wire:target="refreshLog">{{ __('Refreshing...') }}</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.button type="button" wire:click="downloadLog" wire:loading.attr="disabled">
|
||||
{{ __('Download log') }}
|
||||
</x-jetstream.button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<style>
|
||||
#log-scroll-{{ $logFilename }} {
|
||||
border-radius: 0.5rem !important;
|
||||
}
|
||||
#log-scroll-{{ $logFilename }}::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
#log-scroll-{{ $logFilename }}::-webkit-scrollbar-track {
|
||||
border-radius: 0 0.5rem 0.5rem 0;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
#log-scroll-{{ $logFilename }}::-webkit-scrollbar-thumb {
|
||||
border-radius: 0 0.5rem 0.5rem 0;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var logDiv = document.getElementById('log-scroll-{{ $logFilename }}');
|
||||
if (logDiv) {
|
||||
logDiv.scrollTop = logDiv.scrollHeight;
|
||||
}
|
||||
});
|
||||
|
||||
// Listen for refresh event
|
||||
window.addEventListener('logRefreshed', function() {
|
||||
setTimeout(function() {
|
||||
var logDiv = document.getElementById('log-scroll-{{ $logFilename }}');
|
||||
if (logDiv) {
|
||||
logDiv.scrollTop = logDiv.scrollHeight;
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@@ -0,0 +1,81 @@
|
||||
<div class="scroll-py-3">
|
||||
<div class="mb-3">
|
||||
<h3 class="text-lg font-semibold text-theme-text-primary">{{ __('Application Log') }}</h3>
|
||||
|
||||
@if ($message)
|
||||
<div class="mt-2">
|
||||
{!! $message !!}
|
||||
</div>
|
||||
@else
|
||||
<div class="mt-2 text-xs text-theme-muted">{{ __('Recent log output') }}</div>
|
||||
@endif
|
||||
|
||||
<div class="mt-1 text-xs text-theme-muted">
|
||||
<span>
|
||||
<span class="text-theme-muted">{{ __('Disk') }}:</span>
|
||||
<span class="{{ $diskUsageClass }}"> {{ $diskUsage }}</span>
|
||||
</span>
|
||||
<span class="ml-4">
|
||||
<span class="text-theme-muted">{{ __('RAM memory') }}:</span>
|
||||
<span class="{{ $availableRamClass }}"> {{ $availableRam }}</span>
|
||||
</span>
|
||||
<span class="ml-4">
|
||||
{{ __('Queue workers running') }}:
|
||||
<span class="{{ $queueWorkersCount > 0 ? 'text-green-500' : 'text-red-500' }}">
|
||||
{{ $queueWorkersCount }}
|
||||
</span>
|
||||
</span>
|
||||
<span class="ml-4">
|
||||
{{ __('Reverb server') }}:
|
||||
<span class="{{ $reverbConnected ? 'text-green-500' : 'text-red-500' }}">
|
||||
{{ $reverbConnected ? __('Connected') : __('Not connected') }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($queueWorkersCount > 0)
|
||||
<div class="mb-2 text-xs text-theme-muted">
|
||||
<pre class="whitespace-pre-wrap">{{ implode("\n", $queueWorkers) }}</pre>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="box-border max-h-[200px] overflow-x-auto overflow-y-auto rounded-lg bg-black pb-6 pl-6 pr-6 font-mono text-xs text-gray-200"
|
||||
id="log-scroll" style="border-radius: 0.5rem;">
|
||||
<div class="m-0 w-full whitespace-pre-wrap">
|
||||
{{ $logContent }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 flex w-full justify-end">
|
||||
<x-jetstream.button type="button" wire:click="downloadLog" wire:loading.attr="disabled">
|
||||
{{ __('Download log') }}
|
||||
</x-jetstream.button>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
#log-scroll {
|
||||
border-radius: 0.5rem !important;
|
||||
}
|
||||
#log-scroll::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
#log-scroll::-webkit-scrollbar-track {
|
||||
border-radius: 0 0.5rem 0.5rem 0;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
#log-scroll::-webkit-scrollbar-thumb {
|
||||
border-radius: 0 0.5rem 0.5rem 0;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var logDiv = document.getElementById('log-scroll');
|
||||
if (logDiv) {
|
||||
logDiv.scrollTop = logDiv.scrollHeight;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
<div>
|
||||
@if($maintenanceMode)
|
||||
<div class="bg-theme-background">
|
||||
<div class="max-w-full sm:mx-auto mr-16 ml-2 bg-theme-background text-2xs sm:text-sm text-center text-red-700 py-2">
|
||||
<span class="font-semibold">
|
||||
<x-icon class="mr-1 inline h-5 w-5" name="exclamation-triangle" />
|
||||
{{ __('Site is currently in maintenance mode') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@@ -0,0 +1,76 @@
|
||||
<div class="bg-theme-background p-6 sm:px-20">
|
||||
<div class="flex items-start justify-between">
|
||||
<div class="flex-1">
|
||||
<h3 class="mb-2 text-lg font-medium">
|
||||
{{ __('Maintenance Mode') }}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex-1">
|
||||
@if ($maintenanceMode)
|
||||
<div class="text-sm font-medium">
|
||||
{{ __('Site is currently in maintenance mode') }}
|
||||
</div>
|
||||
<p class="mt-1 text-xs text-theme-secondary">
|
||||
{{ __('Regular users cannot log in. Only administrators can login.') }}
|
||||
</p>
|
||||
@else
|
||||
<div class="text-sm font-medium">
|
||||
{{ __('Site is currently accessible to all users') }}
|
||||
</div>
|
||||
<p class="mt-1 text-xs text-theme-secondary">
|
||||
{{ __('Enable maintenance mode to restrict access to users with administrator permissions only.') }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="ml-6">
|
||||
@if ($maintenanceMode)
|
||||
<x-jetstream.button wire:click="openModal">
|
||||
{{ __('Disable') }}
|
||||
</x-jetstream.button>
|
||||
@else
|
||||
<x-jetstream.button wire:click="openModal" class="bg-theme-brand">
|
||||
{{ __('Enable') }}
|
||||
</x-jetstream.button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Confirmation Modal -->
|
||||
<x-jetstream.dialog-modal wire:model.live="showModal">
|
||||
<x-slot name="title">
|
||||
{{ __('Maintenance Mode') }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
@if ($maintenanceMode)
|
||||
<p>{{ __('Site is currently in maintenance mode') }}</p>
|
||||
<p class="mt-2 text-sm text-gray-600">{{ __('Regular users cannot log in. Only administrators can login.') }}</p>
|
||||
@else
|
||||
<p>{{ __('Site is currently accessible to all users') }}</p>
|
||||
<p class="mt-2 text-sm text-gray-600">{{ __('Enable maintenance mode to restrict access to users with administrator permissions only.') }}</p>
|
||||
@endif
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="footer">
|
||||
<x-jetstream.secondary-button wire:click="closeModal">
|
||||
{{ __('Cancel') }}
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
@if ($maintenanceMode)
|
||||
<x-jetstream.danger-button wire:click="toggleMaintenanceMode" wire:loading.attr="disabled" class="ml-3">
|
||||
<span wire:loading.remove wire:target="toggleMaintenanceMode">{{ __('Disable') }}</span>
|
||||
<span wire:loading wire:target="toggleMaintenanceMode">{{ __('Loading...') }}</span>
|
||||
</x-jetstream.danger-button>
|
||||
@else
|
||||
<x-jetstream.danger-button wire:click="toggleMaintenanceMode" wire:loading.attr="disabled" class="ml-3 bg-theme-brand">
|
||||
<span wire:loading.remove wire:target="toggleMaintenanceMode">{{ __('Enable') }}</span>
|
||||
<span wire:loading wire:target="toggleMaintenanceMode">{{ __('Loading...') }}</span>
|
||||
</x-jetstream.danger-button>
|
||||
@endif
|
||||
</x-slot>
|
||||
</x-jetstream.dialog-modal>
|
||||
</div>
|
||||
@@ -0,0 +1,101 @@
|
||||
<div>
|
||||
<div class="mb-3 flex items-center justify-between">
|
||||
<h3 class="text-lg font-semibold text-theme-text-primary">{{ __('Search Metrics') }}</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<select wire:model.live="period" class="rounded border border-theme-border bg-transparent py-1 text-xs text-theme-text-primary focus:outline-none focus:ring-1 focus:ring-theme-brand focus:border-theme-brand">
|
||||
@foreach ($periods as $value => $label)
|
||||
<option value="{{ $value }}">{{ __($label) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<x-jetstream.secondary-button type="button" wire:click="refresh" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="refresh">{{ __('Refresh') }}</span>
|
||||
<span wire:loading wire:target="refresh">{{ __('Refreshing...') }}</span>
|
||||
</x-jetstream.secondary-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Summary -->
|
||||
<div class="mb-4 grid grid-cols-2 gap-3 sm:grid-cols-4">
|
||||
<div class="rounded-lg border border-theme-brand p-3 text-center">
|
||||
<div class="text-2xl font-bold text-theme-text-primary">{{ $metrics['searches_last_24h'] ?? 0 }}</div>
|
||||
<div class="mt-1 text-xs">{{ __('Searches Last 24h') }}</div>
|
||||
</div>
|
||||
<div class="rounded-lg border border-theme-brand p-3 text-center">
|
||||
<div class="text-2xl font-bold text-theme-text-primary">{{ $metrics['avg_results'] ?? 0 }}</div>
|
||||
<div class="mt-1 text-xs">{{ __('Avg Results') }}</div>
|
||||
</div>
|
||||
<div class="rounded-lg border border-theme-brand p-3 text-center">
|
||||
<div class="text-2xl font-bold text-theme-text-primary">{{ $metrics['avg_execution_time'] ?? 0 }}s</div>
|
||||
<div class="mt-1 text-xs">{{ __('Avg Exec Time') }}</div>
|
||||
</div>
|
||||
<div class="rounded-lg border border-theme-brand p-3 text-center">
|
||||
<div class="text-2xl font-bold text-theme-text-primary">{{ $metrics['avg_searches_per_day'] ?? 0 }}</div>
|
||||
<div class="mt-1 text-xs">{{ __('Avg Searches / Day') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!empty($metrics['popular_categories']))
|
||||
<!-- Popular Categories -->
|
||||
<div class="mb-4">
|
||||
<div class="mb-2 text-xs font-semibold uppercase tracking-wide">{{ __('Top Categories') }}</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@foreach ($metrics['popular_categories'] as $categoryName => $count)
|
||||
<a href="{{ route('search.show') }}?category={{ $metrics['popular_category_ids'][$categoryName] ?? '' }}"
|
||||
class="bg-{{ $metrics['popular_category_colors'][$categoryName] ?? 'gray' }}-400 inline-flex items-center rounded-md px-2 py-1 text-sm font-normal text-black hover:opacity-80">
|
||||
{{ $categoryName }} ×{{ $count }}
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (!empty($recentSearches))
|
||||
<!-- Recent Searches Table -->
|
||||
<div class="mb-2 text-xs font-semibold uppercase tracking-wide">{{ __('Recent Search Log') }}</div>
|
||||
<div class="box-border max-h-[200px] overflow-x-auto overflow-y-auto rounded-lg bg-black pb-2 font-mono text-xs text-gray-200">
|
||||
<table class="w-full">
|
||||
<thead class="sticky top-0 bg-black">
|
||||
<tr class="border-b border-gray-700 text-left text-gray-400">
|
||||
<th class="px-3 py-2">{{ __('Date') }}</th>
|
||||
<th class="px-3 py-2">{{ __('Query') }}</th>
|
||||
<th class="px-3 py-2">{{ __('Categories') }}</th>
|
||||
<th class="px-3 py-2 text-right">{{ __('Results') }}</th>
|
||||
<th class="px-3 py-2 text-right">{{ __('Exec (s)') }}</th>
|
||||
<th class="px-3 py-2">{{ __('Lang.') }}</th>
|
||||
<th class="px-3 py-2">{{ __('Type') }}</th>
|
||||
<th class="px-3 py-2">{{ __('Location') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($recentSearches as $search)
|
||||
<tr class="border-b border-gray-800 hover:bg-white/5">
|
||||
<td class="px-3 py-1 text-gray-400">
|
||||
{{ \Carbon\Carbon::parse($search['timestamp'])->format('Y-m-d') }}
|
||||
</td>
|
||||
<td class="px-3 py-1">
|
||||
{{ $search['search_string'] ?? '—' ?: '—' }}
|
||||
</td>
|
||||
<td class="px-3 py-1">
|
||||
{{ implode(', ', array_column($search['category_tags'] ?? [], 'name')) ?: '—' }}
|
||||
</td>
|
||||
<td class="px-3 py-1 text-right">{{ $search['total_results'] ?? 0 }}</td>
|
||||
<td class="px-3 py-1 text-right">{{ number_format($search['execution_time'] ?? 0, 4) }}</td>
|
||||
<td class="px-3 py-1">{{ $search['locale'] ?? '—' }}</td>
|
||||
<td class="px-3 py-1">{{ $search['user_type'] ?? 'guest' }}</td>
|
||||
<td class="px-3 py-1 text-gray-400">{{ $search['location_label'] ?? '—' }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="mt-3 flex w-full justify-end">
|
||||
<x-jetstream.button type="button" wire:click="downloadLog" wire:loading.attr="disabled">
|
||||
{{ __('Download log') }}
|
||||
</x-jetstream.button>
|
||||
</div>
|
||||
@else
|
||||
<div class="py-4 text-center text-xs">
|
||||
{{ __('No recent search data available.') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user