Mark Devices in Maintenance Mode (#11092)

* Mark Devices in Maintenance Mode

* code climate fix
This commit is contained in:
SourceDoctor
2020-02-02 15:33:01 +01:00
committed by GitHub
parent ee72fa4d3c
commit c07678d55f
6 changed files with 38 additions and 3 deletions

View File

@ -32,6 +32,7 @@ use LibreNMS\Config;
use LibreNMS\Util\Rewrite;
use LibreNMS\Util\Url;
use LibreNMS\Util\Time;
use LibreNMS\Alert\AlertUtil;
class DeviceController extends TableController
{
@ -127,6 +128,7 @@ class DeviceController extends TableController
return [
'extra' => $this->getLabel($device),
'status' => $this->getStatus($device),
'maintenance' => AlertUtil::isMaintenance($device->device_id),
'icon' => '<img src="' . asset($device->icon) . '" title="' . pathinfo($device->icon, PATHINFO_FILENAME) . '">',
'hostname' => $this->getHostname($device),
'metrics' => $this->getMetrics($device),