mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-15 16:06:54 +03:00
Hide "manual flow start"
This commit is contained in:
@@ -120,9 +120,9 @@
|
|||||||
<li><a href="#" onclick="loadPage('info.html?v=$COMMIT_HASH');">Info</a></li>
|
<li><a href="#" onclick="loadPage('info.html?v=$COMMIT_HASH');">Info</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a>Manual Control <i class="arrow down"></i></a>
|
<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">
|
<ul class="submenu">
|
||||||
<li><a href="#" onclick="flow_start()">Start Round</a></li>
|
<!--<li><a href="#" onclick="flow_start()">Start Round</a></li>--> <!-- Needs to be adapted on code side first to ensure proper user feedback -->
|
||||||
<li id="HASendDiscovery" style="display:none;"><a href="#" onclick="HA_send_discovery()">Resend HA Discovery</a></li>
|
<li id="HASendDiscovery" style="display:none;"><a href="#" onclick="HA_send_discovery()">Resend HA Discovery</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
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();
|
||||||
@@ -166,6 +166,7 @@
|
|||||||
xhttp.open("GET", url, true);
|
xhttp.open("GET", url, true);
|
||||||
xhttp.send();
|
xhttp.send();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
function HA_send_discovery_visiblilty() {
|
function HA_send_discovery_visiblilty() {
|
||||||
@@ -173,9 +174,11 @@
|
|||||||
ParseConfig();
|
ParseConfig();
|
||||||
category = getConfigCategory();
|
category = getConfigCategory();
|
||||||
param = getConfigParameters();
|
param = getConfigParameters();
|
||||||
if (category["MQTT"]["enabled"] && param["MQTT"]["HomeassistantDiscovery"]["value1"] == "true")
|
if (category["MQTT"]["enabled"] && param["MQTT"]["HomeassistantDiscovery"]["value1"] == "true") {
|
||||||
|
document.getElementById("ManualControl").style.display="";
|
||||||
document.getElementById("HASendDiscovery").style.display="";
|
document.getElementById("HASendDiscovery").style.display="";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function HA_send_discovery() {
|
function HA_send_discovery() {
|
||||||
|
|||||||
Reference in New Issue
Block a user