mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Component Update - Status
- Align the component status field with the Nagios standard 0=ok, 1=warning, 2=critical - Modify existing modules to report these status' (Cisco-OTV) - Add/Modify Alerting Macros to use these status' - Add the a component status widget - update edit page to report these status'
This commit is contained in:
@@ -44,13 +44,27 @@
|
||||
event.preventDefault();
|
||||
$('.ignore-check').prop('checked', true);
|
||||
});
|
||||
$('#alert-select').click(function (event) {
|
||||
// select ignore buttons for all ports which are down
|
||||
$('#warning-select').click(function (event) {
|
||||
// select ignore button for all components that are in a warning state.
|
||||
event.preventDefault();
|
||||
$('[name^="status_"]').each(function () {
|
||||
var name = $(this).attr('name');
|
||||
var text = $(this).text();
|
||||
if (name && text == 'Alert') {
|
||||
if (name && text == 'Warning') {
|
||||
// get the component number from the object name
|
||||
var id = name.split('_')[1];
|
||||
// find its corresponding checkbox and toggle it
|
||||
$('input[name="ign_' + id + '"]').trigger('click');
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#critical-select').click(function (event) {
|
||||
// select ignore button for all components that are in a critical state.
|
||||
event.preventDefault();
|
||||
$('[name^="status_"]').each(function () {
|
||||
var name = $(this).attr('name');
|
||||
var text = $(this).text();
|
||||
if (name && text == 'Critical') {
|
||||
// get the component number from the object name
|
||||
var id = name.split('_')[1];
|
||||
// find its corresponding checkbox and toggle it
|
||||
|
Reference in New Issue
Block a user