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