mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2026-01-31 06:40:49 +03:00
test1
This commit is contained in:
@@ -1,10 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xml:lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>AI on the edge</title>
|
||||
|
||||
<style>
|
||||
/* Add these styles to your existing CSS file or in a <style> tag in the head */
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
background-color: #d8d8d8;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.footer-section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.footer-section img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.donation-cards img {
|
||||
height: 20px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
|
||||
<link rel="apple-touch-icon" href="watermeter.svg?v=$COMMIT_HASH" />
|
||||
<title>AI on the edge</title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="style.css?v=$COMMIT_HASH" type="text/css" >
|
||||
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
|
||||
@@ -16,6 +42,8 @@
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<script type="text/javascript">var domainname = getDomainname();</script>
|
||||
|
||||
<script>
|
||||
var streamPopup;
|
||||
var streamFlashlight = false;
|
||||
@@ -69,30 +97,6 @@
|
||||
return "";
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
/* Add these styles to your existing CSS file or in a <style> tag in the head */
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
background-color: #d8d8d8;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.footer-section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.footer-section img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.donation-cards img {
|
||||
height: 20px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -107,7 +111,6 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<div class="menu" onmouseover="resetMenu()">
|
||||
<ul>
|
||||
<li><a href="#" onclick="loadPage('overview.html?v=$COMMIT_HASH');">Overview</a></li>
|
||||
@@ -129,10 +132,9 @@
|
||||
<li style="width: 260px"><a href="#" onclick="loadPage('edit_config.html?v=$COMMIT_HASH');">Configuration</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a>Data<i class="arrow down"></i></a>
|
||||
<ul class="submenu">
|
||||
<li><a href="#" onclick="loadPage(getDomainname() + '/value?full');">Recognition</a></li>
|
||||
<li><a href="#" onclick="loadPage(domainname + '/value?full');">Recognition</a></li>
|
||||
<li><a>Livestream <i class="arrow right"></i></a>
|
||||
<ul>
|
||||
<li><a href="#" onclick="start_livestream(false);">Live Stream (Light off)</a></li>
|
||||
@@ -141,29 +143,33 @@
|
||||
</li>
|
||||
<li><a href="#" onclick="loadPage('graph.html?v=$COMMIT_HASH');">Data Graph</a></li>
|
||||
<li><a href="#" onclick="loadPage('data.html?v=$COMMIT_HASH');">Data Table</a></li>
|
||||
<li><a href="#" onclick="loadPage(getDomainname() + '/fileserver/log/data/');">Data Files</a></li>
|
||||
<li><a href="#" onclick="loadPage(domainname + '/fileserver/log/data/');">Data Files</a></li>
|
||||
<li><a href="#" onclick="loadPage('data_export.html?v=$COMMIT_HASH');">Data Export</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li><a>System <i class="arrow down"></i></a>
|
||||
<ul class="submenu">
|
||||
<li><a href="#" onclick="loadPage('backup.html?v=$COMMIT_HASH');">Backup/Restore</a></li>
|
||||
<li><a href="#" onclick="loadPage('ota_page.html?v=$COMMIT_HASH');">OTA Update</a></li>
|
||||
<li><a href="#" onclick="loadPage('log.html?v=$COMMIT_HASH');">Log Viewer</a></li>
|
||||
<li><a href="#" onclick="loadPage(getDomainname() + '/fileserver/');">File Server</a></li>
|
||||
<li><a href="#" onclick="loadPage(domainname + '/fileserver/');">File Server</a></li>
|
||||
<li><a href="#" onclick="loadPage('reboot_page.html?v=$COMMIT_HASH');">Reboot</a></li>
|
||||
<li><a href="#" onclick="loadPage('info.html?v=$COMMIT_HASH');">Info</a></li>
|
||||
<li><a href="https://jomjol.github.io/AI-on-the-edge-device-docs/" target="_blank">Help</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li id="ManualControl" style="display:none;"><a>Manual Control <i class="arrow down"></i></a> <!-- Workaround: Hide menu if no entry is available -->
|
||||
<ul class="submenu" style="width: 300px">
|
||||
<li><a href="#" onclick="flow_start()">Start Round</a></li>
|
||||
<li id="HASendDiscovery" style="width: 300px" style="display:none;"><a href="#" onclick="HA_send_discovery()">Resend Homeassistant Discovery</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li style="float: right; padding-right: 10px;">
|
||||
<div style="font-size: 12px; color: white; padding-top: 20px;" id="system_date"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -193,82 +199,114 @@
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<script type="text/javascript">
|
||||
LoadHostname();
|
||||
LoadFwVersion();
|
||||
LoadWebUiVersion();
|
||||
HA_send_discovery_visibility();
|
||||
|
||||
if (getCookie("page") == "" || getCookie("page") == "reboot_page.html?v=$COMMIT_HASH") {
|
||||
document.cookie = "page=overview.html?v=$COMMIT_HASH" + "; path=/";
|
||||
}
|
||||
console.log("Loading page: " + getCookie("page"));
|
||||
document.getElementById('maincontent').src = getCookie("page");
|
||||
|
||||
|
||||
function flow_start() {
|
||||
var url = getDomainname() + '/flow_start';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
firework.launch(xhttp.responseText, 'success', 5000);
|
||||
/*if (xhttp.responseText.substring(0,3) == "001") {
|
||||
firework.launch('Flow start triggered', 'success', 5000);
|
||||
window.location.reload();
|
||||
}
|
||||
else if (xhttp.responseText.substring(0,3) == "002") {
|
||||
firework.launch('Flow start scheduled. Start after round is completed', 'success', 5000);
|
||||
}
|
||||
else if (xhttp.responseText.substring(0,3) == "099") {
|
||||
firework.launch('Flow start triggered, but start not possible (no flow task available)', 'danger', 5000);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
xhttp.open("GET", url, true);
|
||||
xhttp.send();
|
||||
}
|
||||
|
||||
|
||||
function HA_send_discovery_visibility() {
|
||||
loadConfig(domainname);
|
||||
ParseConfig();
|
||||
category = getConfigCategory();
|
||||
param = getConfigParameters();
|
||||
<script type="text/javascript">
|
||||
var param, category;
|
||||
|
||||
if (category["MQTT"]["enabled"] && param["MQTT"]["HomeassistantDiscovery"].value1 == "true") {
|
||||
document.getElementById("ManualControl").style.display="";
|
||||
document.getElementById("HASendDiscovery").style.display="";
|
||||
function updateTime() {
|
||||
var _system_date = new Date();
|
||||
|
||||
var _year = _system_date.getFullYear();
|
||||
var _month = _system_date.getMonth() + 1;
|
||||
var _day = _system_date.getDate();
|
||||
|
||||
var _hours = _system_date.getHours();
|
||||
var _minutes = _system_date.getMinutes();
|
||||
var _seconds = _system_date.getSeconds();
|
||||
|
||||
if (_month < 10) {_month = '0' + _month;}
|
||||
if (_day < 10) {_day = '0' + _day;}
|
||||
|
||||
if (_hours < 10) {_hours = '0' + _hours;}
|
||||
if (_minutes < 10) {_minutes = '0' + _minutes;}
|
||||
if (_seconds < 10) {_seconds = '0' + _seconds;}
|
||||
|
||||
var day_in_week = _system_date.getDay();
|
||||
var weekday = new Array("Sonntag", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
|
||||
|
||||
var _date = weekday[day_in_week] + ", " + _day + "." + _month + "." + _year + " " + _hours + ":" + _minutes + ":" + _seconds;
|
||||
document.getElementById('system_date').innerHTML = _date;
|
||||
|
||||
setTimeout(updateTime, 1);
|
||||
}
|
||||
|
||||
function flow_start() {
|
||||
var url = domainname + '/flow_start';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
firework.launch(xhttp.responseText, 'success', 5000);
|
||||
/*if (xhttp.responseText.substring(0,3) == "001") {
|
||||
firework.launch('Flow start triggered', 'success', 5000);
|
||||
window.location.reload();
|
||||
}
|
||||
else if (xhttp.responseText.substring(0,3) == "002") {
|
||||
firework.launch('Flow start scheduled. Start after round is completed', 'success', 5000);
|
||||
}
|
||||
else if (xhttp.responseText.substring(0,3) == "099") {
|
||||
firework.launch('Flow start triggered, but start not possible (no flow task available)', 'danger', 5000);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
xhttp.open("GET", url, true);
|
||||
xhttp.send();
|
||||
}
|
||||
|
||||
function HA_send_discovery_visibility() {
|
||||
loadConfig(domainname);
|
||||
ParseConfig();
|
||||
|
||||
category = getConfigCategory();
|
||||
param = getConfigParameters();
|
||||
|
||||
if (category["MQTT"]["enabled"] && param["MQTT"]["HomeassistantDiscovery"].value1 == "true") {
|
||||
document.getElementById("ManualControl").style.display="";
|
||||
document.getElementById("HASendDiscovery").style.display="";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function HA_send_discovery() {
|
||||
console.log("Homeassistant Discovery topic sending scheduled");
|
||||
var url = getDomainname() + '/mqtt_publish_discovery';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
firework.launch('Sending Homeassistant discovery topics scheduled. It will get sent in the step "Publish to MQTT" of the next digitization round', 'success', 5000);
|
||||
}
|
||||
}
|
||||
xhttp.open("GET", url, true);
|
||||
xhttp.send();
|
||||
}
|
||||
function HA_send_discovery() {
|
||||
console.log("Homeassistant Discovery topic sending scheduled");
|
||||
var url = domainname + '/mqtt_publish_discovery';
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
firework.launch('Sending Homeassistant discovery topics scheduled. It will get sent in the step "Publish to MQTT" of the next digitization round', 'success', 5000);
|
||||
}
|
||||
}
|
||||
xhttp.open("GET", url, true);
|
||||
xhttp.send();
|
||||
}
|
||||
|
||||
function start_livestream(streamFlashlight) {
|
||||
if (streamPopup) {
|
||||
streamPopup.close();
|
||||
}
|
||||
function start_livestream(streamFlashlight) {
|
||||
if (streamPopup) {
|
||||
streamPopup.close();
|
||||
}
|
||||
|
||||
if (streamFlashlight) {
|
||||
streamPopup = window.open(getDomainname() + '/stream?flashlight=true','LivestreamWithlight',streamWindowFeatures);
|
||||
}
|
||||
else {
|
||||
streamPopup = window.open(getDomainname() + '/stream','Livestream',streamWindowFeatures);
|
||||
}
|
||||
if (streamFlashlight) {
|
||||
streamPopup = window.open(domainname + '/stream?flashlight=true','LivestreamWithlight',streamWindowFeatures);
|
||||
}
|
||||
else {
|
||||
streamPopup = window.open(domainname + '/stream','Livestream',streamWindowFeatures);
|
||||
}
|
||||
|
||||
streamPopup.focus();
|
||||
}
|
||||
</script>
|
||||
streamPopup.focus();
|
||||
}
|
||||
|
||||
function init() {
|
||||
LoadHostname();
|
||||
LoadFwVersion();
|
||||
LoadWebUiVersion();
|
||||
HA_send_discovery_visibility();
|
||||
|
||||
if (getCookie("page") == "" || getCookie("page") == "reboot_page.html?v=$COMMIT_HASH") {
|
||||
document.cookie = "page=overview.html?v=$COMMIT_HASH" + "; path=/";
|
||||
}
|
||||
console.log("Loading page: " + getCookie("page"));
|
||||
document.getElementById('maincontent').src = getCookie("page");
|
||||
|
||||
updateTime();
|
||||
}
|
||||
init();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
Reference in New Issue
Block a user