More work on webserver
This commit is contained in:
14
web/index.js
14
web/index.js
@@ -68,10 +68,11 @@
|
||||
}
|
||||
function update() {
|
||||
let now = (new Date()).getTime();
|
||||
let is_connected = (lastUpdate + 3 * updateInterval) > now;
|
||||
let ce = document.getElementById('connected');
|
||||
let cl = document.getElementById('conn_label');
|
||||
if (ce) {
|
||||
if ((lastUpdate + 3 * updateInterval) > now) {
|
||||
if (is_connected) {
|
||||
ce.classList.add('ok');
|
||||
cl.textContent = 'connected';
|
||||
}
|
||||
@@ -108,10 +109,12 @@
|
||||
resetForm();
|
||||
}
|
||||
})
|
||||
// check if any dynamic list needs update
|
||||
for (let l in dynLists) {
|
||||
if (loadDynList(l)) {
|
||||
updateDynLists(l, configDefinitions)
|
||||
if (is_connected) {
|
||||
// check if any dynamic list needs update
|
||||
for (let l in dynLists) {
|
||||
if (loadDynList(l)) {
|
||||
updateDynLists(l, configDefinitions)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -942,6 +945,7 @@
|
||||
forEl('#adminPassInput', function (el) {
|
||||
el.value = '';
|
||||
});
|
||||
alert("Admin password not cached anymore.");
|
||||
}
|
||||
function ensurePass() {
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
Reference in New Issue
Block a user