From 848de2568b303c673eb138deba5a373a6fb5d64f Mon Sep 17 00:00:00 2001 From: Benjamin Drieu Date: Mon, 29 Nov 2021 18:15:18 +0100 Subject: [PATCH] Display OK lines in case no errors (so as to allow recheck and friends --- extension.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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,