Skip to content
Snippets Groups Projects
Commit 7d9056b1 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

add refresh button

parent 9f016da6
No related branches found
No related tags found
1 merge request!5Abstract ubd class
...@@ -19,6 +19,7 @@ const AM_ICONS={ ...@@ -19,6 +19,7 @@ const AM_ICONS={
'connect': '🔌', 'connect': '🔌',
'tag': '🏷️', 'tag': '🏷️',
'delete': '', 'delete': '',
'refresh': '🪃'
}; };
const OUT_ID_MAIN='header-section'; const OUT_ID_MAIN='header-section';
const OUT_ID_APPS='app-section'; const OUT_ID_APPS='app-section';
...@@ -186,6 +187,7 @@ function _getAllAppsStatus(aAllData){ ...@@ -186,6 +187,7 @@ function _getAllAppsStatus(aAllData){
+':'+_2digits(oDate.getMinutes()) +':'+_2digits(oDate.getMinutes())
+':'+_2digits(oDate.getSeconds()) +':'+_2digits(oDate.getSeconds())
+' (update every '+REFRESHTIME+' sec)' +' (update every '+REFRESHTIME+' sec)'
+'<button onclick="oUbdApps.update(); return false;"> '+AM_ICONS['refresh']+' refresh now </button>'
// +'</p>'; // +'</p>';
// let aAllData=JSON.parse(sData); // let aAllData=JSON.parse(sData);
var appOut=''; var appOut='';
...@@ -309,6 +311,8 @@ function initInstance(i){ ...@@ -309,6 +311,8 @@ function initInstance(i){
} }
); );
oUbdTag.render('<h2><span>⏳</span></h2>');
oUbdApps.render('<h2><span>⏳</span></h2>');
let sInstances=''; let sInstances='';
for (var j=0; j<AM_INSTANCES.length; j++){ for (var j=0; j<AM_INSTANCES.length; j++){
...@@ -325,8 +329,10 @@ function initInstance(i){ ...@@ -325,8 +329,10 @@ function initInstance(i){
document.getElementById(OUT_ID_MAIN).innerHTML= sInstances; document.getElementById(OUT_ID_MAIN).innerHTML= sInstances;
// fill in initial values ... and update based on given ttl // fill in initial values ... and update based on given ttl
window.setTimeout("oUbdTag.update();", 50); oUbdTag.update();
window.setTimeout("oUbdApps.update();", 400); oUbdApps.update();
// window.setTimeout("oUbdTag.update();", 50);
// window.setTimeout("oUbdApps.update();", 40);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment