## Analytics — Live Activity Feed - Dedicated /stats/live standalone page (mirrors /stats/logs pattern) - Consistent 3-tab navigation across Statistics / Live Feed / Visit Logs - checkForUpdates() with skipRender(): O(1) MAX(id) poll — ~100-byte response on no-change - latestVisitId sentinel (-1) prevents unnecessary first-poll re-render - Cache key versioned by latestVisitId — fixes bug where concurrent users could permanently miss a visit due to stale thundering-herd cache - 3-second thundering-herd cache (key: url_id + date + filters + latestVisitId) - Country flags via flagcdn.com (precomputed in PHP, Alpine.js CSP-safe onerror) - time_ago precomputed in PHP — no Carbon::parse() double-instantiation in Blade - SELECT only 12 needed columns instead of SELECT *; limit 25 rows - wire:poll.5s.visible — polling stops when widget is off-screen ## Link Organization - Folders: one folder per link, clickable → filtered link list, link count badge - Tags: up to 5 tags per link, clickable → filtered link list, link count badge - Archiving: soft-archive links instead of permanent deletion; restorable ## REST API - Per-key API scopes: links:read-only (GET) / links:read-write (full CRUD) - Per-key rate limiting: individual requests/minute per API key ## Translations - Added stats_live_feed_poll_interval (EN: 'Updates every 5s', PL: 'Aktualizacja co 5s') ## Docs - README.md: corrected API scopes/rate-limiting docs (features were already implemented) - README.md: added Folders, Tags, Archiving to features list - README.md: added v5.0.0 changelog entry
31 lines
1.1 KiB
PHP
31 lines
1.1 KiB
PHP
<x-filament-panels::page>
|
|
<x-filament::tabs class="mb-6">
|
|
<x-filament::tabs.item
|
|
tag="a"
|
|
href="{{ \Bjanczak\FilamentShortUrl\Filament\Resources\ShortUrlResource::getUrl('stats', ['record' => $record]) }}"
|
|
icon="heroicon-m-presentation-chart-line"
|
|
>
|
|
{{ __('filament-short-url::default.stats_tab_statistics') }}
|
|
</x-filament::tabs.item>
|
|
|
|
<x-filament::tabs.item
|
|
tag="a"
|
|
href="{{ \Bjanczak\FilamentShortUrl\Filament\Resources\ShortUrlResource::getUrl('stats.live', ['record' => $record]) }}"
|
|
icon="heroicon-m-bolt"
|
|
>
|
|
{{ __('filament-short-url::default.stats_tab_live_feed') }}
|
|
</x-filament::tabs.item>
|
|
|
|
<x-filament::tabs.item
|
|
:active="true"
|
|
icon="heroicon-m-list-bullet"
|
|
>
|
|
{{ __('filament-short-url::default.stats_tab_visit_logs') }}
|
|
</x-filament::tabs.item>
|
|
</x-filament::tabs>
|
|
|
|
<div class="mt-2">
|
|
{{ $this->table }}
|
|
</div>
|
|
</x-filament-panels::page>
|