From 9a07f271ffb638f40f83a87bbe17deac26b0253a Mon Sep 17 00:00:00 2001 From: CaCO3 Date: Mon, 1 May 2023 22:38:30 +0200 Subject: [PATCH] Cleanup web UI (#2378) * fix wrong index on backup log * remove no longer used files/functions * improve logging on Alignment Mark Update --------- Co-authored-by: CaCO3 --- sd-card/html/backup.html | 2 +- sd-card/html/common.js | 8 +------ sd-card/html/gethost.js | 41 -------------------------------- sd-card/html/readconfigcommon.js | 4 ++-- sd-card/html/wlan_config.html | 1 + 5 files changed, 5 insertions(+), 51 deletions(-) delete mode 100644 sd-card/html/gethost.js diff --git a/sd-card/html/backup.html b/sd-card/html/backup.html index c55c3d3d..8e04bc5f 100644 --- a/sd-card/html/backup.html +++ b/sd-card/html/backup.html @@ -105,7 +105,7 @@ function fetchFiles(urls, filesData, index, retry, zipFilename) { // console.log(url + " started (" + index + "/" + urls.length + ")"); if (retry == 0) { - setStatus(" - " + getFilenameFromUrl(urls[index]) + " (" + index + "/" + urls.length + ")..."); + setStatus(" - " + getFilenameFromUrl(urls[index]) + " (" + (index+1) + "/" + urls.length + ")..."); } else { setStatus("   Retrying (" + retry + ")..."); diff --git a/sd-card/html/common.js b/sd-card/html/common.js index bd0eea35..79dc5bb1 100644 --- a/sd-card/html/common.js +++ b/sd-card/html/common.js @@ -1,13 +1,7 @@ /* The UI can also be run locally, but you have to set the IP of your devide accordingly. * And you also might have to disable CORS in your webbrowser! */ -var domainname_for_testing = "192.168.178.23"; - - - -function gethost_Version(){ - return "1.0.0 - 20200910"; -} +var domainname_for_testing = "192.168.1.153"; /* Returns the domainname with prepended protocol. diff --git a/sd-card/html/gethost.js b/sd-card/html/gethost.js deleted file mode 100644 index d838b629..00000000 --- a/sd-card/html/gethost.js +++ /dev/null @@ -1,41 +0,0 @@ - -function gethost_Version(){ - return "1.0.0 - 20200910"; -} - - -function getbasepath(){ - var host = window.location.hostname; - if (((host == "127.0.0.1") || (host == "localhost") || (host == "")) -// && ((window.location.port == "80") || (window.location.port == "")) - ) - - { -// host = "http://192.168.2.219"; // jomjol interner test -// host = "http://192.168.178.46"; // jomjol interner test - host = "http://192.168.178.44"; // jomjol interner Real -// host = "http://192.168.43.191"; -// host = "."; // jomjol interner localhost - - } - else - { - host = window.location.protocol + "//" + host; - if (window.location.port != "") { - host = host + ":" + window.location.port; - } - } - - return host; -} - -function UpdatePage(_dosession = true){ - var zw = location.href; - zw = zw.substr(0, zw.indexOf("?")); - if (_dosession) { - window.location = zw + '?session=' + Math.floor((Math.random() * 1000000) + 1); - } - else { - window.location = zw; - } -} diff --git a/sd-card/html/readconfigcommon.js b/sd-card/html/readconfigcommon.js index f256df8e..ff74c7a6 100644 --- a/sd-card/html/readconfigcommon.js +++ b/sd-card/html/readconfigcommon.js @@ -264,7 +264,7 @@ function MakeContrastImageZW(zw, _enhance, _domainname){ return true; } else { - firework.launch("Device is busy, please try again when the round got completed!", 'warning', 10000); + firework.launch("Device is busy, please try again when the Digitalization Round got completed!", 'warning', 10000); return false; } } @@ -293,7 +293,7 @@ function MakeRefZW(zw, _domainname){ return true; } else { - firework.launch("Device is busy, please try again when the round got completed!", 'warning', 10000); + firework.launch("Device is busy, please try again when the Digitalization Round got completed!", 'warning', 10000); return false; } } diff --git a/sd-card/html/wlan_config.html b/sd-card/html/wlan_config.html index f49828ae..5ac570f9 100644 --- a/sd-card/html/wlan_config.html +++ b/sd-card/html/wlan_config.html @@ -3,6 +3,7 @@ +