Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e06e5c5
renamed actions view for dashboard and speedtest buttons in topbar
alexjustesen Dec 2, 2025
ffb2c44
started work removing charts from the admin panel
alexjustesen Dec 3, 2025
c936cd7
Merge branch 'release/v1.12.0' into feat/remove-admin-panel-charts
alexjustesen Dec 5, 2025
c0a3385
feat: add blade-lucide-icons package to dependencies
alexjustesen Dec 5, 2025
dcb76a4
feat: update dashboard with documentation and donation sections
alexjustesen Dec 5, 2025
5f23d5a
feat: update dashboard action to use new icon and layout adjustments
alexjustesen Dec 5, 2025
ca6c66b
feat: update speedtest action modal heading and icon
alexjustesen Dec 5, 2025
1ba7a56
feat: remove navigation group from UserResource
alexjustesen Dec 5, 2025
e4428eb
feat: enhance admin panel dashboard layout and styling
alexjustesen Dec 5, 2025
2de6831
feat: remove navigation items and groups from admin panel
alexjustesen Dec 5, 2025
ceda517
feat: update admin panel dashboard layout and styling
alexjustesen Dec 5, 2025
2c6f3e0
feat: update navigation icons across dashboard and settings pages
alexjustesen Dec 5, 2025
7d8b1f2
feat: remove admin panel specific styles and import custom styles
alexjustesen Dec 5, 2025
7a10b37
feat: remove StatsOverviewWidget from admin panel
alexjustesen Dec 5, 2025
00c97c3
feat: remove admin panel charts and replace with new platform and lat…
alexjustesen Dec 5, 2025
c2a7254
style updates
alexjustesen Dec 5, 2025
47679b9
feat: add icon-size attribute to sections in dashboard
alexjustesen Dec 5, 2025
cfc7572
feat: enhance latest result stats with benchmark status indicators
alexjustesen Dec 5, 2025
c49e5c7
feat: update dashboard action URL handling and enhance latest result …
alexjustesen Dec 5, 2025
fe79905
fix: correct method for retrieving download benchmark status
alexjustesen Dec 5, 2025
ff8f266
fix: remove unnecessary wire:poll attribute from platform stats section
alexjustesen Dec 5, 2025
c41a87c
fix: remove unnecessary class from latest result stats div
alexjustesen Dec 5, 2025
da24bc9
feat: update language strings for GitHub repository and health status…
alexjustesen Dec 5, 2025
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
39 changes: 1 addition & 38 deletions app/Filament/Pages/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@

namespace App\Filament\Pages;

use App\Filament\Widgets\RecentDownloadChartWidget;
use App\Filament\Widgets\RecentDownloadLatencyChartWidget;
use App\Filament\Widgets\RecentJitterChartWidget;
use App\Filament\Widgets\RecentPingChartWidget;
use App\Filament\Widgets\RecentUploadChartWidget;
use App\Filament\Widgets\RecentUploadLatencyChartWidget;
use App\Filament\Widgets\StatsOverviewWidget;
use Carbon\Carbon;
use Cron\CronExpression;
use Filament\Pages\Dashboard as BasePage;

class Dashboard extends BasePage
{
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-chart-bar';
protected static string|\BackedEnum|null $navigationIcon = 'tabler-layout-dashboard';

protected string $view = 'filament.pages.dashboard';

Expand All @@ -28,32 +19,4 @@ public static function getNavigationLabel(): string
{
return __('dashboard.title');
}

public function getSubheading(): ?string
{
$schedule = config('speedtest.schedule');

if (blank($schedule) || $schedule === false) {
return __('dashboard.no_speedtests_scheduled');
}

$cronExpression = new CronExpression($schedule);

$nextRunDate = Carbon::parse($cronExpression->getNextRunDate(timeZone: config('app.display_timezone')))->format(config('app.datetime_format'));

return __('dashboard.next_speedtest_at').': '.$nextRunDate;
}

protected function getHeaderWidgets(): array
{
return [
StatsOverviewWidget::make(),
RecentDownloadChartWidget::make(),
RecentUploadChartWidget::make(),
RecentPingChartWidget::make(),
RecentJitterChartWidget::make(),
RecentDownloadLatencyChartWidget::make(),
RecentUploadLatencyChartWidget::make(),
];
}
}
2 changes: 1 addition & 1 deletion app/Filament/Pages/Settings/DataIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

class DataIntegration extends SettingsPage
{
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-circle-stack';
protected static string|\BackedEnum|null $navigationIcon = 'tabler-database';

protected static string|\UnitEnum|null $navigationGroup = 'Settings';

Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Pages/Settings/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

class Notification extends SettingsPage
{
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-bell-alert';
protected static string|\BackedEnum|null $navigationIcon = 'tabler-bell-ringing';

protected static string|\UnitEnum|null $navigationGroup = 'Settings';

Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Pages/Settings/Thresholds.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class Thresholds extends SettingsPage
{
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-exclamation-triangle';
protected static string|\BackedEnum|null $navigationIcon = 'tabler-alert-triangle';

protected static string|\UnitEnum|null $navigationGroup = 'Settings';

Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Resources/Results/ResultResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ResultResource extends Resource
{
protected static ?string $model = Result::class;

protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-table-cells';
protected static string|\BackedEnum|null $navigationIcon = 'tabler-table';

public static function getNavigationLabel(): string
{
Expand Down
4 changes: 1 addition & 3 deletions app/Filament/Resources/Users/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ class UserResource extends Resource
{
protected static ?string $model = User::class;

protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-users';

protected static string|\UnitEnum|null $navigationGroup = 'Settings';
protected static string|\BackedEnum|null $navigationIcon = 'tabler-users';

protected static ?int $navigationSort = 4;

Expand Down
76 changes: 0 additions & 76 deletions app/Filament/Widgets/StatsOverviewWidget.php

This file was deleted.

12 changes: 1 addition & 11 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace App\Http\Controllers;

use App\Enums\ResultStatus;
use App\Models\Result;
use Illuminate\Http\Request;

class HomeController extends Controller
Expand All @@ -13,14 +11,6 @@ class HomeController extends Controller
*/
public function __invoke(Request $request)
{
$latestResult = Result::query()
->select(['id', 'ping', 'download', 'upload', 'status', 'created_at'])
->where('status', '=', ResultStatus::Completed)
->latest()
->first();

return view('dashboard', [
'latestResult' => $latestResult,
]);
return view('dashboard');
}
}
24 changes: 24 additions & 0 deletions app/Livewire/LatestResultStats.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Livewire;

use App\Enums\ResultStatus;
use App\Models\Result;
use Livewire\Attributes\Computed;
use Livewire\Component;

class LatestResultStats extends Component
{
#[Computed]
public function latestResult(): ?Result
{
return Result::where('status', ResultStatus::Completed)
->latest()
->first();
}

public function render()
{
return view('livewire.latest-result-stats');
}
}
45 changes: 45 additions & 0 deletions app/Livewire/PlatformStats.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace App\Livewire;

use App\Enums\ResultStatus;
use App\Models\Result;
use Carbon\Carbon;
use Cron\CronExpression;
use Illuminate\Support\Number;
use Livewire\Attributes\Computed;
use Livewire\Component;

class PlatformStats extends Component
{
#[Computed]
public function nextSpeedtest(): ?Carbon
{
if ($schedule = config('speedtest.schedule')) {
$cronExpression = new CronExpression($schedule);

return Carbon::parse(time: $cronExpression->getNextRunDate(timeZone: config('app.display_timezone')));
}

return null;
}

#[Computed]
public function platformStats(): array
{
$totalResults = Result::count();
$completedResults = Result::where('status', ResultStatus::Completed)->count();
$failedResults = Result::where('status', ResultStatus::Failed)->count();

return [
'total' => Number::format($totalResults),
'completed' => Number::format($completedResults),
'failed' => Number::format($failedResults),
];
}

public function render()
{
return view('livewire.platform-stats');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
use Filament\Forms\Contracts\HasForms;
use Filament\Notifications\Notification;
use Filament\Support\Enums\IconPosition;
use Filament\Support\Enums\Size;
use Illuminate\Support\Facades\Auth;
use Livewire\Component;

class RunSpeedtestAction extends Component implements HasActions, HasForms
class Actions extends Component implements HasActions, HasForms
{
use InteractsWithActions, InteractsWithForms;

public function dashboardAction(): Action
{
return Action::make('home')
->label(__('results.public_dashboard'))
->icon('heroicon-o-chart-bar')
->iconPosition(IconPosition::Before)
return Action::make('metrics')
->iconButton()
->icon('tabler-chart-histogram')
->color('gray')
->url(shouldOpenInNewTab: true, url: route('home'))
->url(url: route('home'))
->extraAttributes([
'id' => 'dashboardAction',
]);
Expand Down Expand Up @@ -61,13 +61,14 @@ public function speedtestAction(): Action
->success()
->send();
})
->modalHeading(__('results.run_speedtest'))
->modalHeading(__('results.speedtest'))
->modalWidth('lg')
->modalSubmitActionLabel(__('results.start'))
->button()
->size(Size::Medium)
->color('primary')
->label(__('results.speedtest'))
->icon('heroicon-o-rocket-launch')
->icon('tabler-rocket')
->iconPosition(IconPosition::Before)
->hidden(! Auth::check() && Auth::user()->is_admin)
->extraAttributes([
Expand All @@ -77,6 +78,6 @@ public function speedtestAction(): Action

public function render()
{
return view('livewire.topbar.run-speedtest-action');
return view('livewire.topbar.actions');
}
}
21 changes: 1 addition & 20 deletions app/Providers/Filament/AdminPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

namespace App\Providers\Filament;

use App\Services\GitHub\Repository;
use Filament\Http\Middleware\Authenticate;
use Filament\Http\Middleware\DisableBladeIconComponents;
use Filament\Http\Middleware\DispatchServingFilamentEvent;
use Filament\Navigation\NavigationGroup;
use Filament\Navigation\NavigationItem;
use Filament\Panel;
use Filament\PanelProvider;
use Filament\Support\Colors\Color;
Expand Down Expand Up @@ -59,25 +57,8 @@ public function panel(Panel $panel): Panel
])
->navigationGroups([
NavigationGroup::make()
->label(__('general.settings')),
NavigationGroup::make()
->label(__('general.links'))
->label(__('general.settings'))
->collapsible(false),
])
->navigationItems([
NavigationItem::make(__('general.documentation'))
->url('https://docs.speedtest-tracker.dev/', shouldOpenInNewTab: true)
->icon('heroicon-o-book-open')
->group(__('general.links')),
NavigationItem::make(__('general.donate'))
->url('https://github.com/sponsors/alexjustesen', shouldOpenInNewTab: true)
->icon('heroicon-o-banknotes')
->group(__('general.links')),
NavigationItem::make(config('speedtest.build_version'))
->url('https://github.com/alexjustesen/speedtest-tracker', shouldOpenInNewTab: true)
->icon('tabler-brand-github')
->badge(fn (): string => Repository::updateAvailable() ? __('general.update_available') : __('general.up_to_date'))
->group(__('general.links')),
]);
}
}
2 changes: 1 addition & 1 deletion app/Providers/FilamentServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function boot(): void
{
FilamentView::registerRenderHook(
PanelsRenderHook::GLOBAL_SEARCH_BEFORE,
fn (): string => Blade::render("@livewire('topbar.run-speedtest-action')"),
fn (): string => Blade::render("@livewire('topbar.actions')"),
);
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"maennchen/zipstream-php": "^2.4",
"promphp/prometheus_client_php": "^2.14.1",
"saloonphp/laravel-plugin": "^3.7",
"secondnetwork/blade-tabler-icons": "^3.35.0",
"secondnetwork/blade-tabler-icons": "^3.35",
"spatie/laravel-json-api-paginate": "^1.16.3",
"spatie/laravel-query-builder": "^6.3.6",
"spatie/laravel-settings": "^3.6.0",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading