Remove transient refresh bug

This commit is contained in:
Benjamin Drieu 2021-11-25 14:45:42 +01:00
parent 8812be23a6
commit e556871713
3 changed files with 6 additions and 9 deletions

View File

@ -199,12 +199,7 @@ class Indicator extends PanelMenu.Button {
updateStatus ( )
{
if ( ! this.serverLogic.refresh ( this ) )
{
this.warningBoxes[this.server].set_text ( '…' );
this.criticalBoxes[this.server].set_text ( '…' );
}
this.serverLogic.refresh ( this );
this.setupTimeout ( );
}
@ -302,9 +297,11 @@ class Indicator extends PanelMenu.Button {
this._box.remove_all_children();
if ( this.serverLogic.error )
if ( this.serverLogic.error || ! this.serverLogic.status )
{
this._box.add_child ( new St.Label ( { style_class: 'monito-network-error', text: this.serverLogic.error } ) );
this.warningBoxes[this.server].set_text ( '…' );
this.criticalBoxes[this.server].set_text ( '…' );
return;
}

View File

@ -96,7 +96,7 @@ class Icinga extends GenericServer {
this.extension.refreshUI ( this );
return this.status != { };
return ! this.error;
}
catch ( e )
{

View File

@ -76,7 +76,7 @@ class Icinga2 extends GenericServer {
}
this.extension.refreshUI ( this );
return this.status != { };
return ! this.error;
}
}