|
@@ -159,7 +159,7 @@
|
|
|
</li>
|
|
</li>
|
|
|
<li id="ManualControl" style="display:none;"><a>Manual Control <i class="arrow down"></i></a> <!-- Workaround: Hide menu if no entry is available -->
|
|
<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">
|
|
<ul class="submenu" style="width: 300px">
|
|
|
- <!--<li><a href="#" onclick="flow_start()">Start Round</a></li>--> <!-- Needs to be adapted on code side first to ensure proper user feedback -->
|
|
|
|
|
|
|
+ <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>
|
|
<li id="HASendDiscovery" style="width: 300px" style="display:none;"><a href="#" onclick="HA_send_discovery()">Resend Homeassistant Discovery</a></li>
|
|
|
</ul>
|
|
</ul>
|
|
|
</li>
|
|
</li>
|
|
@@ -170,6 +170,7 @@
|
|
|
|
|
|
|
|
<span id="Version" style="font-size: 10px; margin-top: -5px;padding-left: 10px;">Loading version...</span>
|
|
<span id="Version" style="font-size: 10px; margin-top: -5px;padding-left: 10px;">Loading version...</span>
|
|
|
|
|
|
|
|
|
|
+<!-- # Disabled footer, since it wastes a lot of space and the images are broken
|
|
|
<div class="footer">
|
|
<div class="footer">
|
|
|
<div class="footer-section">
|
|
<div class="footer-section">
|
|
|
<span>Support & Contact Us</span>
|
|
<span>Support & Contact Us</span>
|
|
@@ -189,7 +190,7 @@
|
|
|
<img src="https://github.com/jomjol/AI-on-the-edge-device/images/paypal.png" alt="PayPal" style="width: 60px; height: auto;">
|
|
<img src="https://github.com/jomjol/AI-on-the-edge-device/images/paypal.png" alt="PayPal" style="width: 60px; height: auto;">
|
|
|
</a>
|
|
</a>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
|
LoadHostname();
|
|
LoadHostname();
|
|
@@ -203,13 +204,14 @@
|
|
|
console.log("Loading page: " + getCookie("page"));
|
|
console.log("Loading page: " + getCookie("page"));
|
|
|
document.getElementById('maincontent').src = getCookie("page");
|
|
document.getElementById('maincontent').src = getCookie("page");
|
|
|
|
|
|
|
|
- /*
|
|
|
|
|
|
|
+
|
|
|
function flow_start() {
|
|
function flow_start() {
|
|
|
var url = getDomainname() + '/flow_start';
|
|
var url = getDomainname() + '/flow_start';
|
|
|
var xhttp = new XMLHttpRequest();
|
|
var xhttp = new XMLHttpRequest();
|
|
|
xhttp.onreadystatechange = function() {
|
|
xhttp.onreadystatechange = function() {
|
|
|
if (this.readyState == 4 && this.status == 200) {
|
|
if (this.readyState == 4 && this.status == 200) {
|
|
|
- if (xhttp.responseText.substring(0,3) == "001") {
|
|
|
|
|
|
|
+ firework.launch(xhttp.responseText, 'success', 5000);
|
|
|
|
|
+ /*if (xhttp.responseText.substring(0,3) == "001") {
|
|
|
firework.launch('Flow start triggered', 'success', 5000);
|
|
firework.launch('Flow start triggered', 'success', 5000);
|
|
|
window.location.reload();
|
|
window.location.reload();
|
|
|
}
|
|
}
|
|
@@ -218,13 +220,13 @@
|
|
|
}
|
|
}
|
|
|
else if (xhttp.responseText.substring(0,3) == "099") {
|
|
else if (xhttp.responseText.substring(0,3) == "099") {
|
|
|
firework.launch('Flow start triggered, but start not possible (no flow task available)', 'danger', 5000);
|
|
firework.launch('Flow start triggered, but start not possible (no flow task available)', 'danger', 5000);
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
xhttp.open("GET", url, true);
|
|
xhttp.open("GET", url, true);
|
|
|
xhttp.send();
|
|
xhttp.send();
|
|
|
}
|
|
}
|
|
|
- */
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
function HA_send_discovery_visibility() {
|
|
function HA_send_discovery_visibility() {
|
|
|
loadConfig(domainname);
|
|
loadConfig(domainname);
|