Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/Filament/Widgets/RecentDownloadChartWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ protected function getData(): array
$results = Result::query()
->select(['id', 'download', 'created_at'])
->where('status', '=', ResultStatus::Completed)
->when($this->filter == '24h', function ($query) {
->when($this->filter === '24h', function ($query) {
$query->where('created_at', '>=', now()->subDay());
})
->when($this->filter == 'week', function ($query) {
->when($this->filter === 'week', function ($query) {
$query->where('created_at', '>=', now()->subWeek());
})
->when($this->filter == 'month', function ($query) {
->when($this->filter === 'month', function ($query) {
$query->where('created_at', '>=', now()->subMonth());
})
->orderBy('created_at')
Expand Down
6 changes: 3 additions & 3 deletions app/Filament/Widgets/RecentDownloadLatencyChartWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ protected function getData(): array
$results = Result::query()
->select(['id', 'data', 'created_at'])
->where('status', '=', ResultStatus::Completed)
->when($this->filter == '24h', function ($query) {
->when($this->filter === '24h', function ($query) {
$query->where('created_at', '>=', now()->subDay());
})
->when($this->filter == 'week', function ($query) {
->when($this->filter === 'week', function ($query) {
$query->where('created_at', '>=', now()->subWeek());
})
->when($this->filter == 'month', function ($query) {
->when($this->filter === 'month', function ($query) {
$query->where('created_at', '>=', now()->subMonth());
})
->orderBy('created_at')
Expand Down
6 changes: 3 additions & 3 deletions app/Filament/Widgets/RecentJitterChartWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ protected function getData(): array
$results = Result::query()
->select(['id', 'data', 'created_at'])
->where('status', '=', ResultStatus::Completed)
->when($this->filter == '24h', function ($query) {
->when($this->filter === '24h', function ($query) {
$query->where('created_at', '>=', now()->subDay());
})
->when($this->filter == 'week', function ($query) {
->when($this->filter === 'week', function ($query) {
$query->where('created_at', '>=', now()->subWeek());
})
->when($this->filter == 'month', function ($query) {
->when($this->filter === 'month', function ($query) {
$query->where('created_at', '>=', now()->subMonth());
})
->orderBy('created_at')
Expand Down
6 changes: 3 additions & 3 deletions app/Filament/Widgets/RecentPingChartWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ protected function getData(): array
$results = Result::query()
->select(['id', 'ping', 'created_at'])
->where('status', '=', ResultStatus::Completed)
->when($this->filter == '24h', function ($query) {
->when($this->filter === '24h', function ($query) {
$query->where('created_at', '>=', now()->subDay());
})
->when($this->filter == 'week', function ($query) {
->when($this->filter === 'week', function ($query) {
$query->where('created_at', '>=', now()->subWeek());
})
->when($this->filter == 'month', function ($query) {
->when($this->filter === 'month', function ($query) {
$query->where('created_at', '>=', now()->subMonth());
})
->orderBy('created_at')
Expand Down
6 changes: 3 additions & 3 deletions app/Filament/Widgets/RecentUploadChartWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ protected function getData(): array
$results = Result::query()
->select(['id', 'upload', 'created_at'])
->where('status', '=', ResultStatus::Completed)
->when($this->filter == '24h', function ($query) {
->when($this->filter === '24h', function ($query) {
$query->where('created_at', '>=', now()->subDay());
})
->when($this->filter == 'week', function ($query) {
->when($this->filter === 'week', function ($query) {
$query->where('created_at', '>=', now()->subWeek());
})
->when($this->filter == 'month', function ($query) {
->when($this->filter === 'month', function ($query) {
$query->where('created_at', '>=', now()->subMonth());
})
->orderBy('created_at')
Expand Down
6 changes: 3 additions & 3 deletions app/Filament/Widgets/RecentUploadLatencyChartWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ protected function getData(): array
$results = Result::query()
->select(['id', 'data', 'created_at'])
->where('status', '=', ResultStatus::Completed)
->when($this->filter == '24h', function ($query) {
->when($this->filter === '24h', function ($query) {
$query->where('created_at', '>=', now()->subDay());
})
->when($this->filter == 'week', function ($query) {
->when($this->filter === 'week', function ($query) {
$query->where('created_at', '>=', now()->subWeek());
})
->when($this->filter == 'month', function ($query) {
->when($this->filter === 'month', function ($query) {
$query->where('created_at', '>=', now()->subMonth());
})
->orderBy('created_at')
Expand Down
1 change: 1 addition & 0 deletions lang/en/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
|
*/

'sign_in' => 'Sign in',
'failed' => 'These credentials do not match our records.',
'password' => 'The provided password is incorrect.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
Expand Down
26 changes: 20 additions & 6 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,26 @@ class="p-2 rounded-md transition-all"
</button>
</div>

<x-filament::button
href="{{ url('/admin') }}"
tag="a"
>
Admin Panel
</x-filament::button>
@auth
<x-filament::button
href="{{ url('/admin') }}"
icon="tabler-layout-dashboard"
iconButton="true"
tag="a"
size="lg"
>
{{ __('general.admin') }}
</x-filament::button>
@else
<x-filament::button
href="{{ url('/login') }}"
icon="tabler-login"
tag="a"
size="lg"
>
{{ __('auth.sign_in') }}
</x-filament::button>
@endauth
</div>
</header>

Expand Down
34 changes: 21 additions & 13 deletions resources/views/livewire/latest-result-stats.blade.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
<div wire:poll.60s>
@filled($this->latestResult)
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 latest-result-stats">
<div class="flex items-center justify-between col-span-full">
<h2 class="flex items-center gap-x-2 text-base md:text-lg font-semibold text-zinc-900 dark:text-zinc-100">
<x-tabler-rocket class="size-5" />
Latest result
</h2>

<x-filament::button
href="{{ url('admin/results') }}"
tag="a"
size="sm"
>
{{ __('general.view') }}
</x-filament::button>
<div class="col-span-full">
<div class="flex items-center justify-between">
<div>
<h2 class="flex items-center gap-x-2 text-base md:text-lg font-semibold text-zinc-900 dark:text-zinc-100">
<x-tabler-rocket class="size-5" />
Latest result
</h2>

<p class="mt-1 text-sm font-medium text-zinc-600 dark:text-zinc-400">{{ $this->latestResult->created_at->format(config('app.datetime_format')) }}</p>
</div>

@auth
<x-filament::button
href="{{ url('admin/results') }}"
tag="a"
size="sm"
>
{{ __('general.view') }}
</x-filament::button>
@endauth
</div>
</div>

<x-filament::section class="col-span-1" icon="tabler-download" icon-size="md">
Expand Down