mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Display Up/Down time in Device List (#9951)
* First attempt of Up/Down time * First attempt of Up/Down time * Moved to Time::formatInterval() * cleaning * last polled in casts * Cleaning the variants of formatUptime() * Cleaning in ./html/includes/dev-overview-data.inc.php * Cleaning in ./html/includes/dev-overview-data.inc.php * Cleaning in ./html/includes/dev-overview-data.inc.php * updated includes/polling/core.inc.php * updated includes/alerts.inc.php * clean accessors
This commit is contained in:
@@ -31,6 +31,7 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
use LibreNMS\Config;
|
||||
use LibreNMS\Util\Rewrite;
|
||||
use LibreNMS\Util\Url;
|
||||
use LibreNMS\Util\Time;
|
||||
|
||||
class DeviceController extends TableController
|
||||
{
|
||||
@@ -125,7 +126,7 @@ class DeviceController extends TableController
|
||||
'metrics' => $this->getMetrics($device),
|
||||
'hardware' => Rewrite::ciscoHardware($device),
|
||||
'os' => $this->getOsText($device),
|
||||
'uptime' => $device->formatUptime(true),
|
||||
'uptime' => Time::formatInterval($device->status ? $device->uptime : $device->last_polled->diffInSeconds(), 'short'),
|
||||
'location' => $this->getLocation($device),
|
||||
'actions' => $this->getActions($device),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user