Compare commits

...

2 Commits

2 changed files with 6 additions and 3 deletions

View File

@ -32,7 +32,7 @@ Things I plan to add at some point or another:
* Buttons to operate on services à la nagstamon (recheck, connect via SSH, etc.) * Buttons to operate on services à la nagstamon (recheck, connect via SSH, etc.)
* Regexes to modify the output of services (to prune unecessary stuff) * Regexes to modify the output of services (to prune unecessary stuff)
* Filters to hide services (acked ones, or depending on regexes) * Filters to hide services (acked ones, or depending on regexes)
* Support for other (free as in free speech) monitoring servers * Support for other (as in free speech) monitoring servers
* Choose which columns are shown in services result * Choose which columns are shown in services result
* Better icinga2 support (use API because things are missing in the json output ?) * Better icinga2 support (use API because things are missing in the json output ?)

View File

@ -346,10 +346,13 @@ class Indicator extends PanelMenu.Button {
}); });
scrollBox.add_actor(tableBox); scrollBox.add_actor(tableBox);
for ( let entryCount of this.serverLogic.getProcessedStatus ( ) )
_status [ entryCount.status ] ++;
for ( let entry of this.serverLogic.getProcessedStatus ( ) ) for ( let entry of this.serverLogic.getProcessedStatus ( ) )
{ {
_status [ entry.status ] ++; if ( ( ! _status [ 'WARNING' ] && ! _status [ 'CRITICAL' ] && ! _status [ 'UNKNOWN' ] && entry.status == 'OK' ) ||
if ( entry.status != 'OK' ) ( ( _status [ 'WARNING' ] || _status [ 'CRITICAL' ] || _status [ 'UNKNOWN' ] ) && entry.status != 'OK' ) )
{ {
let infoBox = new St.BoxLayout({ let infoBox = new St.BoxLayout({
style_class: 'monito-service-line monito-service-line-' + entry.status, style_class: 'monito-service-line monito-service-line-' + entry.status,