diff --git a/public/index.html b/public/index.html index 71e902e..a312eb5 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ - IoT Manager 4.2.2 + IoT Manager 4.2.3 diff --git a/src/App.svelte b/src/App.svelte index ce388ad..fcc6899 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -38,12 +38,12 @@ let opened = false; let preventMove = false; let showWidjetJson = false; - let devMode = true; + let devMode = false; //****************************************************variable section**********************************************************/ //******************************************************************************************************************************/ let myip = document.location.hostname; - if (devMode) myip = "192.168.88.225"; + if (devMode) myip = "192.168.1.196"; //Flags let firstDevListRequest = true; @@ -1270,7 +1270,7 @@ display: flex; align-items: center; position: fixed; - z-index: 1; + z-index: 2; top: 10px; left: 20px; width: 20px; @@ -1301,6 +1301,7 @@ display: block; position: fixed; visibility: hidden; + z-index: 1; top: 0; left: -100%; width: 150px; /* размер выхода бокового меню */ diff --git a/src/widgets/Chart.svelte b/src/widgets/Chart.svelte index fc553a0..6413f40 100644 --- a/src/widgets/Chart.svelte +++ b/src/widgets/Chart.svelte @@ -32,35 +32,35 @@ $: widget.status, collectDataToArr(); function collectDataToArr() { - if (widget.status) { - if (Array.isArray(widget.status)) { - //отсекаем лишние события изменения переменной widget - if (prevSatus !== widget.status) { - console.log("[i]", "collecting chart data to array, topic:", widget.topic); - let incomingDataArr = widget.status; + if (widget.status && Array.isArray(widget.status)) { + //отсекаем лишние события изменения переменной widget + if (prevSatus !== widget.status) { + console.log("[i]", "collecting chart data to array, topic:", widget.topic); + let incomingDataArr = widget.status; - console.log("[i]", "array:", incomingDataArr); + console.log("[i]", "array:", incomingDataArr); - collectingDataArray = [...collectingDataArray, ...incomingDataArr]; + collectingDataArray = [...collectingDataArray, ...incomingDataArr]; - for (let i = 0; i < collectingDataArray.length; i++) { - labels[i] = getHHMM(collectingDataArray[i].x); - values[i] = [collectingDataArray[i].y1]; - } - - datachart = { - labels: labels, - datasets: [ - { - name: widget.descr, - values: values, - }, - ], - }; - prevSatus = widget.status; - datachart = datachart; + for (let i = 0; i < collectingDataArray.length; i++) { + labels[i] = getHHMM(collectingDataArray[i].x); + values[i] = [collectingDataArray[i].y1]; } + + datachart = { + labels: labels, + datasets: [ + { + name: widget.descr, + values: values, + }, + ], + }; + prevSatus = widget.status; + datachart = datachart; } + } else { + console.log("[i]", "skipping event, topic:", widget.topic); } } @@ -70,4 +70,6 @@ } + +