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
parent 208e901566
commit 848de2568b

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,