diff --git a/Lora-Map/resources/js/menu.js b/Lora-Map/resources/js/menu.js
index 763b7e3..3979e10 100644
--- a/Lora-Map/resources/js/menu.js
+++ b/Lora-Map/resources/js/menu.js
@@ -69,6 +69,37 @@
adminlogin.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
adminlogin.send("user=" + encodeURI(document.getElementById("pannels_admin_name").value) + "&pass=" + encodeURI(document.getElementById("pannels_admin_pass").value));
},
+ UpdatePannelsInfo: function () {
+ document.getElementById("pannels_info").innerHTML = "";
+ if (Object.prototype.hasOwnProperty.call(MarkerObject.LocationData, this.statusToDevice)) {
+ var positionItem = MarkerObject.LocationData[this.statusToDevice];
+ var html = "
Name: " + positionItem["Name"] + "
";
+ html += "Batterie: " + positionItem["Battery"] + "V

";
+ if (positionItem["Fix"]) {
+ html += "GPS-Empfang
";
+ } else {
+ html += "kein GPS-Empfang
";
+ }
+ html += "" + positionItem["UTM"]["Base"] + " " + positionItem["UTM"]["FieldWidth"] + "" + positionItem["UTM"]["Width"] + " " + positionItem["UTM"]["FieldHeight"] + "" + positionItem["UTM"]["Height"] + "
";
+ html += "Höhe: " + positionItem["Height"].toFixed(1) + " m
";
+ html += "HDOP: " + positionItem["Hdop"].toFixed(1) + "
";
+ html += "Dezimal: " + positionItem["Latitude"].toFixed(5) + ", " + positionItem["Longitude"].toFixed(5) + "
";
+ html += "Letzter Wert: Vor: " + FunctionsObject.TimeCalculation(positionItem["Lastgpspostime"], "difftext") + "
";
+ html += "Update: " + FunctionsObject.TimeCalculation(positionItem["Recievedtime"], "str") + "
Vor: " + FunctionsObject.TimeCalculation(positionItem["Recievedtime"], "difftext") + "
";
+ html += "RSSI: " + positionItem["Rssi"] + ", SNR: " + positionItem["Snr"] + "
";
+ if (Object.prototype.hasOwnProperty.call(MarkerObject.PanicData, this.statusToDevice)) {
+ var panicData = MarkerObject.PanicData[this.statusToDevice];
+ if (panicData["ButtonPressed"].length > 0) {
+ html += "Alerts:";
+ for (var i = 0; i < panicData["ButtonPressed"].length; i++) {
+ html += "" + FunctionsObject.TimeCalculation(panicData["ButtonPressed"][i], "str") + " (vor " + FunctionsObject.TimeCalculation(panicData["ButtonPressed"][i], "difftext") + ")";
+ }
+ html += "
";
+ }
+ }
+ document.getElementById("pannels_info").innerHTML = html;
+ }
+ },
UpdateStatus: function () {
for (var id in MarkerObject.LocationData) {
if (Object.prototype.hasOwnProperty.call(MarkerObject.LocationData, id)) {
@@ -88,7 +119,7 @@
}
this._UpdateOverviewElement(positionItem, id);
}
- }
+ }
},
/// private functions
_UpdateOverviewElement: function (positionItem, id) {
@@ -159,37 +190,6 @@
document.getElementById("pannels_admin").innerHTML = "Adminpannel";
}
},
- _Update_pannels_info: function () {
- document.getElementById("pannels_info").innerHTML = "";
- if (Object.prototype.hasOwnProperty.call(MarkerObject.LocationData, this.statusToDevice)) {
- var positionItem = MarkerObject.LocationData[this.statusToDevice];
- var html = "Name: " + positionItem["Name"] + "
";
- html += "Batterie: " + positionItem["Battery"] + "V

";
- if (positionItem["Fix"]) {
- html += "GPS-Empfang
";
- } else {
- html += "kein GPS-Empfang
";
- }
- html += "" + positionItem["UTM"]["Base"] + " " + positionItem["UTM"]["FieldWidth"] + "" + positionItem["UTM"]["Width"] + " " + positionItem["UTM"]["FieldHeight"] + "" + positionItem["UTM"]["Height"] + "
";
- html += "Höhe: " + positionItem["Height"].toFixed(1) + " m
";
- html += "HDOP: " + positionItem["Hdop"].toFixed(1) + "
";
- html += "Dezimal: " + positionItem["Latitude"].toFixed(5) + ", " + positionItem["Longitude"].toFixed(5) + "
";
- html += "Letzter Wert: Vor: " + FunctionsObject.TimeCalculation(positionItem["Lastgpspostime"], "difftext") + "
";
- html += "Update: " + FunctionsObject.TimeCalculation(positionItem["Recievedtime"], "str") + "
Vor: " + FunctionsObject.TimeCalculation(positionItem["Recievedtime"], "difftext") + "
";
- html += "RSSI: " + positionItem["Rssi"] + ", SNR: " + positionItem["Snr"] + "
";
- if (Object.prototype.hasOwnProperty.call(MarkerObject.PanicData, this.statusToDevice)) {
- var panicData = MarkerObject.PanicData[this.statusToDevice];
- if (panicData["ButtonPressed"].length > 0) {
- html += "Alerts:";
- for (var i = 0; i < panicData["ButtonPressed"].length; i++) {
- html += "" + FunctionsObject.TimeCalculation(panicData["ButtonPressed"][i], "str") + " (vor " + FunctionsObject.TimeCalculation(panicData["ButtonPressed"][i], "difftext") + ")";
- }
- html += "
";
- }
- }
- document.getElementById("pannels_info").innerHTML = html;
- }
- },
_Update_pannels_admin: function () {
var testadmin = new XMLHttpRequest();
testadmin.onreadystatechange = function () {
@@ -207,7 +207,7 @@
var html = "";
for (var i = 0; i < json.length; i++) {
var walert = json[i];
- html += "" +
+ html += "
" +
"" + walert.Headline + "" +
"" + walert.Location + "" +
"" + walert.Body + (walert.Instructions !== "" ? "
" + walert.Instructions : "") + "" +