File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1111use App \Filament \Widgets \RecentUploadChartWidget ;
1212use App \Filament \Widgets \RecentUploadLatencyChartWidget ;
1313use App \Filament \Widgets \StatsOverviewWidget ;
14+ use Carbon \Carbon ;
15+ use Cron \CronExpression ;
1416use Filament \Actions \Action ;
1517use Filament \Actions \ActionGroup ;
1618use Filament \Notifications \Notification ;
@@ -24,6 +26,19 @@ class Dashboard extends BasePage
2426
2527 protected static string $ view = 'filament.pages.dashboard ' ;
2628
29+ public function getSubheading (): ?string
30+ {
31+ if (blank (config ('speedtest.schedule ' ))) {
32+ return __ ('No speedtests scheduled. ' );
33+ }
34+
35+ $ cronExpression = new CronExpression (config ('speedtest.schedule ' ));
36+
37+ $ nextRunDate = Carbon::parse ($ cronExpression ->getNextRunDate (timeZone: config ('app.display_timezone ' )))->format (config ('app.datetime_format ' ));
38+
39+ return 'Next speedtest at: ' .$ nextRunDate ;
40+ }
41+
2742 protected function getHeaderActions (): array
2843 {
2944 return [
You can’t perform that action at this time.
0 commit comments