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:
Aaron Daniels
2016-03-10 17:30:32 +10:00
parent 919b50f76b
commit 52455e1128
10 changed files with 181 additions and 25 deletions

View File

@@ -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