This commit is contained in:
jomjol
2021-09-25 08:08:21 +02:00
parent 68b0fb83ee
commit e63e940b96
3 changed files with 37 additions and 28 deletions

Binary file not shown.

View File

@@ -9,7 +9,7 @@ function getbasepath(){
{ {
// host = "http://192.168.2.219"; // jomjol interner test // host = "http://192.168.2.219"; // jomjol interner test
// host = "http://192.168.178.46"; // jomjol interner test // host = "http://192.168.178.46"; // jomjol interner test
host = "http://192.168.178.74"; // jomjol interner Real host = "http://192.168.178.22"; // jomjol interner Real
// host = "http://192.168.43.191"; // host = "http://192.168.43.191";
// host = "."; // jomjol interner localhost // host = "."; // jomjol interner localhost

View File

@@ -115,14 +115,23 @@ li.dropdown {
function LoadHostname() { function LoadHostname() {
_basepath = getbasepath(); _basepath = getbasepath();
var xhttp = new XMLHttpRequest(); var xhttp = new XMLHttpRequest();
try { xhttp.addEventListener('load', function(event) {
url = _basepath + '/version?type=Hostname'; if (xhttp.status >= 200 && xhttp.status < 300) {
xhttp.open("GET", url, false);
xhttp.send();
hostname = xhttp.responseText; hostname = xhttp.responseText;
document.title = "jomjol - AI on the edge - " + hostname; document.title = "jomjol - AI on the edge - " + hostname;
document.getElementById("id_title").innerHTML = "Digitizer - AI on the edge - " + hostname; document.getElementById("id_title").innerHTML = "Digitizer - AI on the edge - " + hostname;
} else {
console.warn(request.statusText, request.responseText);
}
});
// var xhttp = new XMLHttpRequest();
try {
url = _basepath + '/version?type=Hostname';
xhttp.open("GET", url, true);
xhttp.send();
} }
catch (error) catch (error)