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
23 changes: 14 additions & 9 deletions app/Filament/Pages/Settings/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ public function form(Schema $schema): Schema
->columns(1)
->schema([
Checkbox::make('database_on_speedtest_run')
->label(__('settings/notifications.notify_on_every_speedtest_run')),

->label(__('settings/notifications.notify_on_every_speedtest_run'))
->helpertext(__('settings/notifications.notify_on_every_speedtest_run_helper')),
Checkbox::make('database_on_threshold_failure')
->label(__('settings/notifications.notify_on_threshold_failures')),
->label(__('settings/notifications.notify_on_threshold_failures'))
->helpertext(__('settings/notifications.notify_on_threshold_failures_helper')),
]),

Actions::make([
Expand Down Expand Up @@ -118,10 +119,11 @@ public function form(Schema $schema): Schema
->columns(1)
->schema([
Checkbox::make('mail_on_speedtest_run')
->label(__('settings/notifications.notify_on_every_speedtest_run')),

->label(__('settings/notifications.notify_on_every_speedtest_run'))
->helpertext(__('settings/notifications.notify_on_every_speedtest_run_helper')),
Checkbox::make('mail_on_threshold_failure')
->label(__('settings/notifications.notify_on_threshold_failures')),
->label(__('settings/notifications.notify_on_threshold_failures'))
->helpertext(__('settings/notifications.notify_on_threshold_failures_helper')),
]),

Repeater::make('mail_recipients')
Expand Down Expand Up @@ -176,10 +178,11 @@ public function form(Schema $schema): Schema
->columns(1)
->schema([
Checkbox::make('webhook_on_speedtest_run')
->label(__('settings/notifications.notify_on_every_speedtest_run')),

->label(__('settings/notifications.notify_on_every_speedtest_run'))
->helpertext(__('settings/notifications.notify_on_every_speedtest_run_helper')),
Checkbox::make('webhook_on_threshold_failure')
->label(__('settings/notifications.notify_on_threshold_failures')),
->label(__('settings/notifications.notify_on_threshold_failures'))
->helpertext(__('settings/notifications.notify_on_threshold_failures_helper')),
]),

Repeater::make('webhook_urls')
Expand Down Expand Up @@ -250,9 +253,11 @@ public function form(Schema $schema): Schema
->schema([
Checkbox::make('apprise_on_speedtest_run')
->label(__('settings/notifications.notify_on_every_speedtest_run'))
->helpertext(__('settings/notifications.notify_on_every_speedtest_run_helper'))
->columnSpanFull(),
Checkbox::make('apprise_on_threshold_failure')
->label(__('settings/notifications.notify_on_threshold_failures'))
->helpertext(__('settings/notifications.notify_on_threshold_failures_helper'))
->columnSpanFull(),
]),
Repeater::make('apprise_channel_urls')
Expand Down
4 changes: 4 additions & 0 deletions lang/en/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
'healthy' => 'Healthy',
'not_measured' => 'Not measured',
'unhealthy' => 'Unhealthy',
'last_results' => 'Last results',
'total_failed' => 'Total failed tests',
'total_complted' => 'Total completed tests',
'total' => 'Total',

// Units
'ms' => 'ms',
Expand Down
4 changes: 3 additions & 1 deletion lang/en/settings/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@
'webhook_hint_description' => 'These are generic webhooks. For payload examples and implementation details, view the documentation. For services like Discord, Ntfy etc please use Apprise.',

// Common notification messages
'notify_on_every_speedtest_run' => 'Notify on every scheduled speedtest run',
'notify_on_every_speedtest_run' => 'Notify on every completed scheduled speedtest run',
'notify_on_every_speedtest_run_helper' => 'This will send a notification for every completed scheduled speedtest run, only for healthy or unbenchmarked tests',
'notify_on_threshold_failures' => 'Notify on threshold failures for scheduled speedtests',
'notify_on_threshold_failures_helper' => 'This will send a notification when a scheduled speedtest fails any configured thresholds',

// Test notification messages
'test_notifications' => [
Expand Down
2 changes: 1 addition & 1 deletion resources/views/dashboard.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="grid grid-cols-1 gap-6">
<h2 class="flex items-center gap-x-2 text-base md:text-lg font-semibold text-zinc-900 dark:text-zinc-100 col-span-full">
<x-tabler-chart-histogram class="size-5" />
Metrics
{{ __('general.metrics') }}
</h2>

@livewire(\App\Filament\Widgets\RecentDownloadChartWidget::class)
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/latest-result-stats.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<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
{{ __('general.last_results') }}
</h2>

<p class="mt-1 text-sm font-medium text-zinc-600 dark:text-zinc-400">{{ $this->latestResult->created_at->timezone(config('app.display_timezone'))->format(config('app.datetime_format')) }}</p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/next-speedtest-banner.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<div class="ml-3 flex-1">
<p class="text-sm text-blue-700 dark:text-blue-300">
Next scheduled test at <span class="font-medium">{{ $this->nextSpeedtest->timezone(config('app.display_timezone'))->format(config('app.datetime_format')) }}</span>.
{{ __('dashboard.next_speedtest_at') }} <span class="font-medium">{{ $this->nextSpeedtest->timezone(config('app.display_timezone'))->format(config('app.datetime_format')) }}</span>.
</p>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/livewire/platform-stats.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@

<x-filament::section class="col-span-1" icon="tabler-hash" icon-size="md" :compact="true">
<x-slot name="heading">
Total tests
{{ __('general.total') }}
</x-slot>

<p class="text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100">{{ $this->platformStats['total'] }}</p>
</x-filament::section>

<x-filament::section class="col-span-1" icon="tabler-circle-check" icon-size="md" :compact="true">
<x-slot name="heading">
Total completed tests
{{ __('general.total_complted') }}
</x-slot>

<p class="text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100">{{ $this->platformStats['completed'] }}</p>
</x-filament::section>

<x-filament::section class="col-span-1" icon="tabler-alert-circle" icon-size="md" :compact="true">
<x-slot name="heading">
Total failed tests
{{ __('general.total_failed') }}
</x-slot>

<p class="text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100">{{ $this->platformStats['failed'] }}</p>
Expand Down