mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-26 23:12:34 +03:00
последний веб
This commit is contained in:
@@ -445,12 +445,15 @@
|
|||||||
if (data === "/end/layout.json") {
|
if (data === "/end/layout.json") {
|
||||||
deviceList[ws].lp = true;
|
deviceList[ws].lp = true;
|
||||||
for (let i = 0; i < deviceList.length; i++) {
|
for (let i = 0; i < deviceList.length; i++) {
|
||||||
|
//выполняем только для устройств online
|
||||||
|
//if (deviceList[i].status) {
|
||||||
if (deviceList[i].lp === false || deviceList[i].lp === undefined) {
|
if (deviceList[i].lp === false || deviceList[i].lp === undefined) {
|
||||||
layoutJsonArrayParced = false;
|
layoutJsonArrayParced = false;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
layoutJsonArrayParced = true;
|
layoutJsonArrayParced = true;
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
if (layoutJsonArrayParced) console.log("✔", "layoutJsonArray parced");
|
if (layoutJsonArrayParced) console.log("✔", "layoutJsonArray parced");
|
||||||
onParced();
|
onParced();
|
||||||
@@ -465,12 +468,15 @@
|
|||||||
paramsJson = paramsJson;
|
paramsJson = paramsJson;
|
||||||
deviceList[ws].pp = true;
|
deviceList[ws].pp = true;
|
||||||
for (let i = 0; i < deviceList.length; i++) {
|
for (let i = 0; i < deviceList.length; i++) {
|
||||||
|
//выполняем только для устройств online
|
||||||
|
//if (deviceList[i].status) {
|
||||||
if (deviceList[i].pp === false || deviceList[i].pp === undefined) {
|
if (deviceList[i].pp === false || deviceList[i].pp === undefined) {
|
||||||
paramsJsonParced = false;
|
paramsJsonParced = false;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
paramsJsonParced = true;
|
paramsJsonParced = true;
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
if (paramsJsonParced) console.log("✔", "paramsJson parced");
|
if (paramsJsonParced) console.log("✔", "paramsJson parced");
|
||||||
onParced();
|
onParced();
|
||||||
@@ -482,7 +488,7 @@
|
|||||||
let statusJson = JSON.parse(data);
|
let statusJson = JSON.parse(data);
|
||||||
udateStatusOfWidget(statusJson);
|
udateStatusOfWidget(statusJson);
|
||||||
sortingLayout();
|
sortingLayout();
|
||||||
//if (debug) console.log("[i]", statusJson);
|
if (debug) console.log("[i]", statusJson);
|
||||||
statusJsonParced = true;
|
statusJsonParced = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -536,8 +542,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function udateStatusOfAllWidgets() {
|
function udateStatusOfAllWidgets() {
|
||||||
console.log("[i]", "udate Status Of All Widgets");
|
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(paramsJson)) {
|
for (const [key, value] of Object.entries(paramsJson)) {
|
||||||
for (let i = 0; i < layoutJson.length; i++) {
|
for (let i = 0; i < layoutJson.length; i++) {
|
||||||
let topic = layoutJson[i].topic;
|
let topic = layoutJson[i].topic;
|
||||||
|
|||||||
Reference in New Issue
Block a user