[Chore] Removed polling config (#2038)

This commit is contained in:
Alex Justesen
2025-02-06 20:12:28 -05:00
committed by GitHub
parent 4785c6fded
commit bef6d3ee32
11 changed files with 16 additions and 52 deletions
+3 -3
View File
@@ -436,9 +436,9 @@ class ResultResource extends Resource
->hidden(fn (): bool => ! Auth::user()->is_admin),
])->dropdownPlacement('bottom-end'),
])
->defaultSort('created_at', 'desc')
->paginated([5, 15, 25, 50, 100])
->defaultPaginationPageOption(15);
->defaultSort('id', 'desc')
->deferLoading()
->poll('60s');
}
public static function getPages(): array
@@ -9,11 +9,6 @@ class ListResults extends ListRecords
{
protected static string $resource = ResultResource::class;
protected function getTablePollingInterval(): ?string
{
return config('speedtest.results_polling');
}
protected function getHeaderWidgets(): array
{
return ResultResource::getWidgets();
@@ -16,12 +16,9 @@ class RecentDownloadChartWidget extends ChartWidget
protected static ?string $maxHeight = '250px';
public ?string $filter = '24h';
protected static ?string $pollingInterval = '60s';
protected function getPollingInterval(): ?string
{
return config('speedtest.dashboard_polling');
}
public ?string $filter = '24h';
protected function getFilters(): ?array
{
@@ -14,12 +14,9 @@ class RecentDownloadLatencyChartWidget extends ChartWidget
protected static ?string $maxHeight = '250px';
public ?string $filter = '24h';
protected static ?string $pollingInterval = '60s';
protected function getPollingInterval(): ?string
{
return config('speedtest.dashboard_polling');
}
public ?string $filter = '24h';
protected function getFilters(): ?array
{
@@ -14,12 +14,9 @@ class RecentJitterChartWidget extends ChartWidget
protected static ?string $maxHeight = '250px';
public ?string $filter = '24h';
protected static ?string $pollingInterval = '60s';
protected function getPollingInterval(): ?string
{
return config('speedtest.dashboard_polling');
}
public ?string $filter = '24h';
protected function getFilters(): ?array
{
@@ -15,12 +15,9 @@ class RecentPingChartWidget extends ChartWidget
protected static ?string $maxHeight = '250px';
public ?string $filter = '24h';
protected static ?string $pollingInterval = '60s';
protected function getPollingInterval(): ?string
{
return config('speedtest.dashboard_polling');
}
public ?string $filter = '24h';
protected function getFilters(): ?array
{
@@ -16,12 +16,9 @@ class RecentUploadChartWidget extends ChartWidget
protected static ?string $maxHeight = '250px';
public ?string $filter = '24h';
protected static ?string $pollingInterval = '60s';
protected function getPollingInterval(): ?string
{
return config('speedtest.dashboard_polling');
}
public ?string $filter = '24h';
protected function getFilters(): ?array
{
@@ -14,12 +14,9 @@ class RecentUploadLatencyChartWidget extends ChartWidget
protected static ?string $maxHeight = '250px';
public ?string $filter = '24h';
protected static ?string $pollingInterval = '60s';
protected function getPollingInterval(): ?string
{
return config('speedtest.dashboard_polling');
}
public ?string $filter = '24h';
protected function getFilters(): ?array
{
+1 -4
View File
@@ -12,10 +12,7 @@ class StatsOverviewWidget extends BaseWidget
{
public ?Result $result = null;
protected function getPollingInterval(): ?string
{
return config('speedtest.dashboard_polling');
}
protected static ?string $pollingInterval = '60s';
protected function getCards(): array
{
@@ -54,7 +54,6 @@ class AdminPanelProvider extends PanelProvider
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([])
->databaseNotifications()
->databaseNotificationsPolling(config('speedtest.notification_polling'))
->maxContentWidth(config('speedtest.content_width'))
->spa()
->middleware([
-9
View File
@@ -17,15 +17,6 @@ return [
'public_dashboard' => env('PUBLIC_DASHBOARD', false),
/**
* Polling settings.
*/
'dashboard_polling' => env('DASHBOARD_POLLING', '60s'),
'notification_polling' => env('NOTIFICATION_POLLING', '60s'),
'results_polling' => env('RESULTS_POLLING', null),
/**
* Speedtest settings.
*/