diff --git a/public_html/javascript/functions.js b/public_html/javascript/functions.js index 69497a179787593fdd88ea0bcbe6df4cb32bdf21..a2b55a0fe1354d1a70f96b8e5f703da15f40bf4c 100644 --- a/public_html/javascript/functions.js +++ b/public_html/javascript/functions.js @@ -289,7 +289,7 @@ var oUbdApps=new ubd( 'url': _getUrlWithTags, // remark: this is a function 'header': { "headers": oHeaders }, 'renderer': _getAllAppsStatus, - 'ttl': 0, + 'ttl': REFRESHTIME, } ); @@ -299,8 +299,5 @@ var oUbdApps=new ubd( oUbdTag.update(); oUbdApps.update(); -// cyclic updates of the app status view -window.setInterval("oUbdApps.update();", REFRESHTIME*1000); - // ---------------------------------------------------------------------- \ No newline at end of file diff --git a/public_html/javascript/ubd.class.js b/public_html/javascript/ubd.class.js index 49f54a4c86762f48bc34456ef0d4b7a3fc68bab5..2d8de8029c7f36d894d345e0452a9944a971c0b9 100644 --- a/public_html/javascript/ubd.class.js +++ b/public_html/javascript/ubd.class.js @@ -147,7 +147,7 @@ var ubd = function(){ // clearInterval(this._oTimer); if(this._iTTL) { let self = this; - self._oTimer=window.setTimeout(self.update, this._iTTL*1000); + self._oTimer=window.setTimeout( function(){ self.update() }, this._iTTL*1000); // self._oTimer=window.setInterval(self.update, this._iTTL*1000); } }, @@ -165,9 +165,9 @@ var ubd = function(){ return 0; } try{ - let response = await fetch(url, self._oHeader); + let response = await fetch(url, this._oHeader); if (response.ok) { - self._body=await response.json(); + this._body=await response.json(); this.render(); } else { @@ -183,7 +183,7 @@ var ubd = function(){ +'</div>'); console.error(e); } - + this.resetTimer(); } // ---------------------------------------------------------------------- diff --git a/public_html/main.css b/public_html/main.css index d07dc7917e6a7d93e0ba8ba1f0a45d1b91bcf40d..d6fde9db7cbe2d24ac9e066a9d23833388c31a70 100644 --- a/public_html/main.css +++ b/public_html/main.css @@ -64,7 +64,7 @@ td{vertical-align: top;} .app .url{font-size: 80%; font-weight: normal; margin-right: 2em;} .result0{background:#dfd !important; background: linear-gradient(#ded,#beb)!important; color:#383} -.result1{background:#eee !important; background: linear-gradient(#eee,#ddd)!important; color:#666;} +.result1{background:#eee !important; background: linear-gradient(#ede,#dbd)!important; color:#666;} .result2{background:#fff8d0 !important; background: linear-gradient(#fff0d0,#ffe0a0)!important; color:#870;} .result3{background:#fcd !important; background: linear-gradient(#fcd,#faa)!important; color:#800;}