Fix no usage_summary for services not active yet, minor improvements to traffic graph

This commit is contained in:
Deon George 2021-03-16 11:30:37 +11:00
parent b01976a6ae
commit 84fa5f6546
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
2 changed files with 7 additions and 4 deletions

View File

@ -136,9 +136,9 @@ class Adsl extends ServiceType implements ServiceItem,ServiceUsage
/**
* Find the last date any traffic was recorded for a service
*
* @return AdslTraffic
* @return AdslTraffic|null
*/
private function usage_last_date(): AdslTraffic
private function usage_last_date(): ?AdslTraffic
{
return $this->traffic
->sortBy('date')

View File

@ -10,7 +10,7 @@
<thead>
<tr>
<th>Period</th>
<th class="text-right">Traffic</th>
<th class="text-right">Traffic <small>(GB)</small></th>
</tr>
</thead>
<tbody>
@ -41,7 +41,10 @@
Highcharts.setOptions({
global: {
timezoneOffset: timezone
timezoneOffset: timezone,
},
lang: {
thousandsSep: ','
}
});