Files
AI-on-the-edge-device/sd-card/html/overview.html
Slider0007 5dc7bb949a Show alternative images for states "Initialization" and "Take Image" (#1858)
* Show image for flow not started + take image

* Update

* Adding new images

* .

* Avoid multiple Access-Control-Allow-Origin * (#1859)

* Avoid multiple Access-Control-Allow-Origin *

* Adapt loglevel to debug

* Update build.yaml

* .

* New state "initialization (delayed)", renaming

* Overview: Renamed "Status" + switched position

* Improve data logging on errors (#1839)

* use error level for log if "Rate to High" or "Negative Rate"

* remove redundant data logging

* .

* .

* update time also in case of an error

* move calculation of difference to the top as discussed in PR 1839

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Heap tracing (#1861)

* Update sdkconfig.esp32cam-dev-task-analysis.defaults

* Update defines.h

* Update platformio.ini

* Update main.cpp

* Update defines.h

* Update ClassFlowCNNGeneral.cpp

* Update platformio.ini

* disable HIMEM (external > 4mb ram) not used (#1864)

#force disable HIMEM as not used in default config, can be enabled with [env:esp32cam-dev-himem]
#free 256kb of internal memory :
#I (2112) esp_himem: Initialized. Using last 8 32KB address blocks for bank switching on 4352 KB of physical memory.
CONFIG_SPIRAM_BANKSWITCH_ENABLE=n
#CONFIG_SPIRAM_BANKSWITCH_RESERVE is not set

* Update ota_page.html (#1866)

Fixed the firework to match the actual button text.
Fixed other random typos.

* add AlignmentAlgo=off option (#1867)

* Replace outdated wiki links, wording (#1871)

* Revert "add AlignmentAlgo=off option (#1867)" (#1876)

This reverts commit 3de4cc7c56.

* fixed typo (#1881)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Show WIFI signal text labels / Log RSSI value to logfile (#1877)

* Overview: WIFI RSSI strength text labels

* Log RSSI value (debug level)

* Typo

* Update config.ini (#1880)

* Update Changelog.md for  release (#1892)

Co-authored-by: github-actions <github-actions@github.com>

* Update Changelog.md

* Remove newline in version (#1891)

* remove newline in version

* .

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: CaCO3 <caco3@ruinelli.ch>
Co-authored-by: Nicolas Liaudat <nliaudat@users.noreply.github.com>
Co-authored-by: AngryApostrophe <89547888+AngryApostrophe@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2023-01-22 12:12:56 +01:00

260 lines
6.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>Overview</title>
<meta charset="utf-8">
<style>
.tg {border-collapse:collapse;border-spacing:0;width:100%;color: darkslategray;border: inset;height:585px;}
.tg td{font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
.tg th{height: 50px;font-size:24px;font-weight:bold;text-align:left;padding:0px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;background-color:#f0f0f0}
.tg .tg-1{width:700px;font-size:20px;font-family:Arial, Helvetica, sans-serif !important;border: inset;}
.tg .tg-2{font-size:20px;font-family:Arial, Helvetica, sans-serif !important;border: inset;}
.tg .tg-3{height: 15px;font-size:14px;font-family:Arial, Helvetica, sans-serif !important;border: inset;}
</style>
</head>
<body style="font-family: arial">
<table class="tg">
<tr>
<td class="tg-1" rowspan="9" style="vertical-align: top"><div id="img"></div></td>
<th class="th">Value:</th>
</tr>
<tr>
<td class="tg-2">
<div id="value"></div>
</td>
</tr>
<tr>
<th class="th">Previous Value:</th>
</tr>
<tr>
<td class="tg-2">
<div id="prevalue"></div>
</td>
</tr>
<tr>
<th class="th">Raw Value:</th>
</tr>
<tr>
<td class="tg-2">
<div id="raw"></div>
</td>
</tr>
<tr>
<th class="th">Status:</th>
</tr>
<tr>
<td class="tg-2">
<div id="error"></div>
</td>
</tr>
<tr>
<td class="tg-3">
<div id="statusflow" ></div>
<div id="timestamp" ></div>
<div id="cputemp" ></div>
<div id="rssi" ></div>
<div>
<span id="uptime" ></span>
<span id="round" ></span>
</div>
</td>
</tr>
</table>
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
<script type="text/javascript">
function addZero(i) {
if (i < 10) {
i = "0" + i;
}
return i;
}
$(document).ready(function() {
LoadData();
LoadROIImage();
});
function LoadData(){
loadValue("value", "value");
loadValue("raw", "raw");
loadValue("prevalue", "prevalue");
loadValue("error", "error", "font-size:8px");
loadStatus();
loadCPUTemp();
loadRSSI();
loadUptime();
loadRoundCounter();
}
function LoadROIImage(){
var d = new Date();
var timestamp = d.getTime();
var h = addZero(d.getHours());
var m = addZero(d.getMinutes());
var s = addZero(d.getSeconds());
$('#img').html('<img src=' + getDomainname() + '/img_tmp/alg_roi.jpg?timestamp='+ timestamp +'" max-height:555px; display:block; margin-left:auto; margin-right:auto;"></img>');
$('#timestamp').html("Last Page Refresh:" + (h + ":" + m + ":" + s));
}
function Refresh() {
setTimeout (function() {
LoadData();
LoadROIImage();
Refresh();
}, 300000);
}
function loadStatus() {
url = domainname + '/statusflow';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var _rsp = xhttp.responseText;
$('#statusflow').html("State: " + _rsp);
}
}
xhttp.open("GET", url, true);
xhttp.send();
}
function loadCPUTemp() {
url = domainname + '/cpu_temperature';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var _rsp = xhttp.responseText;
$('#cputemp').html("CPU Temperature: " +_rsp);
}
}
xhttp.open("GET", url, true);
xhttp.send();
}
function loadRSSI() {
url = domainname + '/rssi';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var _rsp = xhttp.responseText;
var _rspVal = _rsp.split("d")[0]
if (_rspVal >= -55) {
$('#rssi').html("WIFI Signal: Excellent (" + _rsp + ")");
}
else if (_rspVal < -55 && _rspVal >= -67) {
$('#rssi').html("WIFI Signal: Good (" + _rsp + ")");
}
else if (_rspVal < -67 && _rspVal >= -78) {
$('#rssi').html("WIFI Signal: Fair (" + _rsp + ")");
}
else if (_rspVal < -78 && _rspVal >= -85) {
$('#rssi').html("WIFI Signal: Weak (" + _rsp + ")");
}
else {
$('#rssi').html("WIFI Signal: Unreliable (" + _rsp + ")");
}
}
}
xhttp.open("GET", url, true);
xhttp.send();
}
function loadUptime() {
url = domainname + '/uptime';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var _rsp = xhttp.responseText;
$('#uptime').html("Uptime: " + _rsp);
}
}
xhttp.open("GET", url, true);
xhttp.send();
}
function loadRoundCounter() {
url = domainname + '/info?type=Round';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var _rsp = xhttp.responseText;
$('#round').html("(Round: " + _rsp + ")");
}
}
xhttp.open("GET", url, true);
xhttp.send();
}
function loadValue(_type, _div, _style) {
url = domainname + '/value?all=true&type=' + _type;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var _rsp = xhttp.responseText;
var _split = _rsp.split("\r");
if (typeof _style == undefined)
out = "<table>";
else
out = "<table style=\"" + _style + "\">";
if (_split.length == 1)
{
var _zer = ZerlegeZeile(_split[0], "\t")
if (_zer.length > 1)
out = _zer[1];
else
out = "";
}
else
{
for (var j = 0; j < _split.length; ++j)
{
var _zer = ZerlegeZeile(_split[j], "\t")
if (_zer.length == 1)
out = out + "<tr><td>" + _zer[0] + "</td><td> </td></tr>";
else
out = out + "<tr><td>" + _zer[0] + "</td><td>" + _zer[1] + "</td></tr>";
}
out = out + "</table>"
}
document.getElementById(_div).innerHTML = out;
}
};
xhttp.open("GET", url, true);
xhttp.send();
}
function init(){
domainname = getDomainname();
Refresh();
}
init();
</script>
</body>
</html>