From 9be9a6756753491fe6f0d1e2ff1386b03ce5f37b Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <49808844+DmitryBorisenko33@users.noreply.github.com> Date: Tue, 1 Mar 2022 00:34:02 +0100 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=D0=B4=D0=BD?= =?UTF-8?q?=D0=B8=D0=B9=20=D0=B2=D0=B5=D0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.svelte | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 0debb70..ba40e93 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -445,12 +445,15 @@ if (data === "/end/layout.json") { deviceList[ws].lp = true; for (let i = 0; i < deviceList.length; i++) { + //выполняем только для устройств online + //if (deviceList[i].status) { if (deviceList[i].lp === false || deviceList[i].lp === undefined) { layoutJsonArrayParced = false; break; } else { layoutJsonArrayParced = true; } + //} } if (layoutJsonArrayParced) console.log("✔", "layoutJsonArray parced"); onParced(); @@ -465,12 +468,15 @@ paramsJson = paramsJson; deviceList[ws].pp = true; for (let i = 0; i < deviceList.length; i++) { + //выполняем только для устройств online + //if (deviceList[i].status) { if (deviceList[i].pp === false || deviceList[i].pp === undefined) { paramsJsonParced = false; break; } else { paramsJsonParced = true; } + //} } if (paramsJsonParced) console.log("✔", "paramsJson parced"); onParced(); @@ -482,7 +488,7 @@ let statusJson = JSON.parse(data); udateStatusOfWidget(statusJson); sortingLayout(); - //if (debug) console.log("[i]", statusJson); + if (debug) console.log("[i]", statusJson); statusJsonParced = true; } } @@ -536,8 +542,6 @@ } function udateStatusOfAllWidgets() { - console.log("[i]", "udate Status Of All Widgets"); - for (const [key, value] of Object.entries(paramsJson)) { for (let i = 0; i < layoutJson.length; i++) { let topic = layoutJson[i].topic;