Skip to content

Commit

Permalink
WIP Network Stats
Browse files Browse the repository at this point in the history
  • Loading branch information
notAreYouScared committed Oct 19, 2024
1 parent 36b39ff commit ebfb033
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/Filament/App/Widgets/ServerNetworkChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ protected function getData(): array
$rx = collect($data)
->slice(-10)
->map(fn ($value, $key) => [
'rx' => Number::format($value['rx_bytes'], maxPrecision: 2, locale: auth()->user()->language),
'rx' => $value->rx_bytes,
'timestamp' => Carbon::createFromTimestamp($key, (auth()->user()->timezone ?? 'UTC'))->format('H:i:s'),
])
->all();


$tx = collect($data)
->slice(-10)
->map(fn ($value, $key) => [
'tx' => Number::format($value['tx_bytes'], maxPrecision: 2, locale: auth()->user()->language),
'tx' => $value->rx_bytes,
'timestamp' => Carbon::createFromTimestamp($key, (auth()->user()->timezone ?? 'UTC'))->format('H:i:s'),
])
->all();
Expand Down Expand Up @@ -76,15 +77,14 @@ protected function getOptions(): RawJs
display: false,
},
ticks: {
display: false,
display: true,
},
display: false, //debug
},
y: {
grid: {
display: false,
},
ticks: {
display: false,
callback: (value) => '954' + value,
display: true,
},
},
}
Expand Down

0 comments on commit ebfb033

Please sign in to comment.