mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Support of "disable alerting" in availability map and device summary widget (#11022)
* Hide disabled alerting device from avaibility map * Hide disabled alerting device from avaibility map * Hide disabled alerting device from avaibility map * Hide disabled alerting device from avaibility map * Hide disabled alerting device from avaibility map * Hide disabled alerting device from avaibility map * Hide disabled alerting device from avaibility map * Hide disabled alerting device from avaibility map * Hide disabled alerting device from avaibility map * merge for last release * Hide disabled alerting device from avaibility map * Hide disabled alerting device from avaibility map * Hide disabled alerting device from avaibility map * Hide disabled alerting device from avaibility map * Widget device summary * Widget device summary * Widget device summary * Widget device summary * Widget device summary * Widget device summary * fix color in widget device summary * fix color in widget device summary * Commit to restart travis CI * Commit to restart travis CI
This commit is contained in:
@@ -50,13 +50,14 @@ class DeviceController extends TableController
|
||||
'state' => 'nullable|in:0,1,up,down',
|
||||
'disabled' => 'nullable|in:0,1',
|
||||
'ignore' => 'nullable|in:0,1',
|
||||
'disable_notify' => 'nullable|in:0,1',
|
||||
'group' => 'nullable|int',
|
||||
];
|
||||
}
|
||||
|
||||
protected function filterFields($request)
|
||||
{
|
||||
return ['os', 'version', 'hardware', 'features', 'type', 'status' => 'state', 'disabled', 'ignore', 'location_id' => 'location'];
|
||||
return ['os', 'version', 'hardware', 'features', 'type', 'status' => 'state', 'disabled', 'disable_notify', 'ignore', 'location_id' => 'location'];
|
||||
}
|
||||
|
||||
protected function searchFields($request)
|
||||
@@ -157,6 +158,8 @@ class DeviceController extends TableController
|
||||
{
|
||||
if ($device->disabled == 1) {
|
||||
return 'blackbg';
|
||||
} elseif ($device->disable_notify == 1) {
|
||||
return 'blackbg';
|
||||
} elseif ($device->ignore == 1) {
|
||||
return 'label-default';
|
||||
} elseif ($device->status == 0) {
|
||||
|
Reference in New Issue
Block a user