mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-25 18:59:04 +02:00
parent
bfaf000dba
commit
5cf5b56f24
@ -177,12 +177,16 @@
|
|||||||
onVisibilityChange: function (event) {
|
onVisibilityChange: function (event) {
|
||||||
var icinga = event.data.self.icinga;
|
var icinga = event.data.self.icinga;
|
||||||
|
|
||||||
if !!(document.visibilityState === undefined || document.visibilityState === 'visible') {
|
if (icinga.loader.autorefreshEnabled === true || icinga.autorefreshSuspended === true) {
|
||||||
icinga.logger.info('Page visible, enabling auto-refresh');
|
if (document.visibilityState === undefined || document.visibilityState === 'visible') {
|
||||||
icinga.loader.enableAutorefresh()
|
icinga.autorefreshSuspended = false;
|
||||||
} else {
|
icinga.logger.info('Page visible, enabling auto-refresh');
|
||||||
icinga.logger.info('Page invisible, disabling auto-refresh');
|
icinga.loader.enableAutorefresh()
|
||||||
icinga.loader.disableAutorefresh()
|
} else {
|
||||||
|
icinga.autorefreshSuspended = true;
|
||||||
|
icinga.logger.info('Page invisible, disabling auto-refresh');
|
||||||
|
icinga.loader.disableAutorefresh()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
this.iconCache = {};
|
this.iconCache = {};
|
||||||
|
|
||||||
this.autorefreshEnabled = true;
|
this.autorefreshEnabled = true;
|
||||||
|
|
||||||
|
this.autorefreshSuspended = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
Icinga.Loader.prototype = {
|
Icinga.Loader.prototype = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user