File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 33namespace App \Filament \Widgets ;
44
55use App \Models \Result ;
6+ use App \Settings \GeneralSettings ;
67use Filament \Widgets \StatsOverviewWidget as BaseWidget ;
78use Filament \Widgets \StatsOverviewWidget \Card ;
89
@@ -12,8 +13,11 @@ protected function getCards(): array
1213 {
1314 $ result = Result::latest ()->first ();
1415
16+ $ settings = new GeneralSettings ();
17+
1518 return [
1619 Card::make ('Latest download ' , fn (): string => ! blank ($ result ) ? formatBits (formatBytesToBits ($ result ->download )).'ps ' : 'n/a ' )
20+ ->description ('Tested at: ' .optional ($ result )->created_at ->timezone ($ settings ->timezone )->format ($ settings ->time_format ))
1721 ->icon ('heroicon-o-download ' ),
1822 Card::make ('Latest upload ' , fn (): string => ! blank ($ result ) ? formatBits (formatBytesToBits ($ result ->upload )).'ps ' : 'n/a ' )
1923 ->icon ('heroicon-o-upload ' ),
You can’t perform that action at this time.
0 commit comments