mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-12 22:47:01 +03:00
overview_add_date_and_time (#3398)
* overview_add_date_and_time * Update overview.html --------- Co-authored-by: CaCO3 <caco3@ruinelli.ch>
This commit is contained in:
@@ -118,6 +118,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-4">
|
||||
<div id="sntp_date" ></div>
|
||||
<div id="timestamp" ></div>
|
||||
<div id="cputemp" ></div>
|
||||
<div id="rssi" ></div>
|
||||
@@ -153,6 +154,7 @@
|
||||
loadValue("prevalue", "prevalue", "border-collapse: collapse; width: 100%");
|
||||
loadValue("error", "error", "border-collapse: collapse; width: 100%");
|
||||
loadStatus();
|
||||
loadSntpDate();
|
||||
loadCPUTemp();
|
||||
loadRSSI();
|
||||
loadUptime();
|
||||
@@ -234,6 +236,20 @@
|
||||
xhttp.send();
|
||||
}
|
||||
|
||||
function loadSntpDate() {
|
||||
url = domainname + '/date';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function () {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
var _rsp = xhttp.responseText;
|
||||
$('#sntp_date').html("Date/Time on device: " + _rsp);
|
||||
}
|
||||
}
|
||||
|
||||
xhttp.open("GET", url, true);
|
||||
xhttp.send();
|
||||
}
|
||||
|
||||
function loadUptime() {
|
||||
url = domainname + '/uptime';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
|
||||
Reference in New Issue
Block a user