@@ -45,9 +45,9 @@ protected function getCards(): array
4545
4646 if (! $ previous ) {
4747 return [
48- Stat::make ('Latest download ' , fn (): string => ! blank ($ this ->result ) ? Number::fileSizeBits (bits: $ this ->result ->download_bits , precision: 2 , perSecond: true ) : 'n/a ' )
48+ Stat::make ('Latest download ' , fn (): string => ! blank ($ this ->result ) ? Number::toBitRate (bits: $ this ->result ->download_bits , precision: 2 ) : 'n/a ' )
4949 ->icon ('heroicon-o-arrow-down-tray ' ),
50- Stat::make ('Latest upload ' , fn (): string => ! blank ($ this ->result ) ? Number::fileSizeBits (bits: $ this ->result ->upload_bits , precision: 2 , perSecond: true ) : 'n/a ' )
50+ Stat::make ('Latest upload ' , fn (): string => ! blank ($ this ->result ) ? Number::toBitRate (bits: $ this ->result ->upload_bits , precision: 2 ) : 'n/a ' )
5151 ->icon ('heroicon-o-arrow-up-tray ' ),
5252 Stat::make ('Latest ping ' , fn (): string => ! blank ($ this ->result ) ? number_format ($ this ->result ->ping , 2 ).' ms ' : 'n/a ' )
5353 ->icon ('heroicon-o-clock ' ),
@@ -59,12 +59,12 @@ protected function getCards(): array
5959 $ pingChange = percentChange ($ this ->result ->ping , $ previous ->ping , 2 );
6060
6161 return [
62- Stat::make ('Latest download ' , fn (): string => ! blank ($ this ->result ) ? Number::fileSizeBits (bits: $ this ->result ->download_bits , precision: 2 , perSecond: true ) : 'n/a ' )
62+ Stat::make ('Latest download ' , fn (): string => ! blank ($ this ->result ) ? Number::toBitRate (bits: $ this ->result ->download_bits , precision: 2 ) : 'n/a ' )
6363 ->icon ('heroicon-o-arrow-down-tray ' )
6464 ->description ($ downloadChange > 0 ? $ downloadChange .'% faster ' : abs ($ downloadChange ).'% slower ' )
6565 ->descriptionIcon ($ downloadChange > 0 ? 'heroicon-m-arrow-trending-up ' : 'heroicon-m-arrow-trending-down ' )
6666 ->color ($ downloadChange > 0 ? 'success ' : 'danger ' ),
67- Stat::make ('Latest upload ' , fn (): string => ! blank ($ this ->result ) ? Number::fileSizeBits (bits: $ this ->result ->upload_bits , precision: 2 , perSecond: true ) : 'n/a ' )
67+ Stat::make ('Latest upload ' , fn (): string => ! blank ($ this ->result ) ? Number::toBitRate (bits: $ this ->result ->upload_bits , precision: 2 ) : 'n/a ' )
6868 ->icon ('heroicon-o-arrow-up-tray ' )
6969 ->description ($ uploadChange > 0 ? $ uploadChange .'% faster ' : abs ($ uploadChange ).'% slower ' )
7070 ->descriptionIcon ($ uploadChange > 0 ? 'heroicon-m-arrow-trending-up ' : 'heroicon-m-arrow-trending-down ' )
0 commit comments