Remove transient refresh bug
This commit is contained in:
parent
8812be23a6
commit
e556871713
11
extension.js
11
extension.js
@ -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;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ class Icinga extends GenericServer {
|
||||
|
||||
this.extension.refreshUI ( this );
|
||||
|
||||
return this.status != { };
|
||||
return ! this.error;
|
||||
}
|
||||
catch ( e )
|
||||
{
|
||||
|
@ -76,7 +76,7 @@ class Icinga2 extends GenericServer {
|
||||
}
|
||||
|
||||
this.extension.refreshUI ( this );
|
||||
return this.status != { };
|
||||
return ! this.error;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user