Display OK lines in case no errors (so as to allow recheck and friends

This commit is contained in:
Benjamin Drieu 2021-11-29 18:15:18 +01:00 committed by Benjamin Drieu
parent 83c27bf84a
commit b207dd2fc7

View File

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