mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-26 23:12:34 +03:00
рабочие графики
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
|
||||
<title>IoT Manager 4.3.2</title>
|
||||
<title>IoT Manager 4.3.4</title>
|
||||
|
||||
<link rel="icon" type="image/png" href="/favicon.ico" />
|
||||
<link rel="stylesheet" href="/build/bundle.css" />
|
||||
<link rel="stylesheet" href="/build/bundle.css?434" />
|
||||
|
||||
<script defer src="/build/bundle.js"></script>
|
||||
<script defer src="/build/bundle.js?434"></script>
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
|
||||
@@ -208,10 +208,6 @@
|
||||
append(data) {
|
||||
if (this.flag) this.blob.append(data);
|
||||
}
|
||||
|
||||
//set setWs(ws) {
|
||||
// this.ws = ws;
|
||||
//}
|
||||
}
|
||||
|
||||
let configJsonPacket = new blobToJson("/st/config.json", "/end/config.json", "config.json");
|
||||
@@ -444,13 +440,11 @@
|
||||
}
|
||||
//сборщик chartJson пакетов
|
||||
if (data.includes("/st/chart.json|")) {
|
||||
//let topic = deleteBeforeDelimiter(data, "|");
|
||||
//console.log("[i] chart", topic);
|
||||
chartJsonFlag[ws] = true;
|
||||
}
|
||||
if (data.includes("/end/chart.json|")) {
|
||||
let topic = deleteBeforeDelimiter(data, "|");
|
||||
console.log("[i] chart", topic);
|
||||
let json = JSON.parse(deleteBeforeDelimiter(data, "|"));
|
||||
console.log("[i] chart blob", json.topic, json.maxCount);
|
||||
chartJsonFlag[ws] = false;
|
||||
var bb = chartJsonBlob.getBlob();
|
||||
let chartJsonReader = new FileReader();
|
||||
@@ -462,15 +456,24 @@
|
||||
let arr = JSON.parse(chartJsonResult);
|
||||
let status = {};
|
||||
status.status = arr;
|
||||
status.topic = topic;
|
||||
status.topic = json.topic;
|
||||
status.maxCount = json.maxCount;
|
||||
apdateWidgetByArray(status);
|
||||
if (debug) console.log("✔", "chartJson parced", status);
|
||||
if (debug) console.log("✔ B", "chartJson parced", status);
|
||||
}
|
||||
};
|
||||
chartJsonBlob.clear();
|
||||
}
|
||||
if (data.includes("/string/chart.json|")) {
|
||||
let tmp = deleteBeforeDelimiter(data, "|");
|
||||
if (IsJsonParse(tmp)) {
|
||||
let json = JSON.parse(tmp);
|
||||
console.log("✔ S", "chartJson parced");
|
||||
apdateWidgetByArray(json);
|
||||
}
|
||||
}
|
||||
//сборщик statusJson сообщений
|
||||
if (data.includes('"status"')) {
|
||||
if (data.includes('"status"') && !data.includes("/string/chart.json|")) {
|
||||
if (IsJsonParse(data)) {
|
||||
let statusJson = JSON.parse(data);
|
||||
if (Array.isArray(statusJson.status)) {
|
||||
@@ -530,27 +533,21 @@
|
||||
|
||||
if (debug) console.log("✔✔", "config page parced");
|
||||
}
|
||||
if (currentPageName === "/connection|") {
|
||||
if (parcedFlags.ssidJson && parcedFlags.settingsJson && parcedFlags.errorsJson) {
|
||||
clearParcedFlags();
|
||||
if (debug) console.log("✔✔", "connection page parced");
|
||||
pageReady.connection = true;
|
||||
}
|
||||
if (currentPageName === "/connection|" && parcedFlags.ssidJson && parcedFlags.settingsJson && parcedFlags.errorsJson) {
|
||||
clearParcedFlags();
|
||||
if (debug) console.log("✔✔", "connection page parced");
|
||||
pageReady.connection = true;
|
||||
}
|
||||
if (currentPageName === "/list|") {
|
||||
if (parcedFlags.deviceListJson) {
|
||||
clearParcedFlags();
|
||||
if (debug) console.log("✔✔", "list page parced");
|
||||
pageReady.list = true;
|
||||
}
|
||||
if (currentPageName === "/list|" && parcedFlags.deviceListJson) {
|
||||
clearParcedFlags();
|
||||
if (debug) console.log("✔✔", "list page parced");
|
||||
pageReady.list = true;
|
||||
}
|
||||
if (currentPageName === "/system|") {
|
||||
if (parcedFlags.errorsJson && parcedFlags.settingsJson) {
|
||||
clearParcedFlags();
|
||||
getVersionsList();
|
||||
if (debug) console.log("✔✔", "system page parced");
|
||||
pageReady.system = true;
|
||||
}
|
||||
if (currentPageName === "/system|" && parcedFlags.errorsJson && parcedFlags.settingsJson) {
|
||||
clearParcedFlags();
|
||||
getVersionsList();
|
||||
if (debug) console.log("✔✔", "system page parced");
|
||||
pageReady.system = true;
|
||||
}
|
||||
if (currentPageName === "/dev|" && parcedFlags.errorsJson && parcedFlags.settingsJson && configJsonPacket.isParced && itemsJsonPacket.isParced) {
|
||||
clearParcedFlags();
|
||||
|
||||
@@ -41,14 +41,14 @@
|
||||
//console.log("[i]", "=======================================================");
|
||||
prevStatus = widget.status;
|
||||
|
||||
for (let i = 0; i < widget.status.length; i++) {
|
||||
//if (i === 0 && widget.status[i].x === 0 && widget.status[i].y1 === 0) {
|
||||
// clearCart();
|
||||
// widget.status = [];
|
||||
// console.log("[i]", "clear cart data");
|
||||
// return;
|
||||
//}
|
||||
if (widget.maxCount === 0) {
|
||||
clearCart();
|
||||
widget.status = [];
|
||||
console.log("[i]", "clear cart data");
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = 0; i < widget.status.length; i++) {
|
||||
if (i === 0) {
|
||||
labels[i] = getDDMM(widget.status[i].x);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user