mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-26 23:12:34 +03:00
последняя
This commit is contained in:
@@ -246,18 +246,19 @@
|
|||||||
});
|
});
|
||||||
socket[ws].addEventListener("message", function (event) {
|
socket[ws].addEventListener("message", function (event) {
|
||||||
let data = event.data.toString();
|
let data = event.data.toString();
|
||||||
//if (debug) console.log("[i]", "data:", data);
|
if (debug) console.log("[i]", "data:", data);
|
||||||
if (data.includes("[log]")) {
|
|
||||||
data = data.replace("[log]", "");
|
//if (data.includes("[log]")) {
|
||||||
addCoreMsg(data);
|
// data = data.replace("[log]", "");
|
||||||
//if (debug) console.log("[i]", "log data:", data);
|
// addCoreMsg(data);
|
||||||
} else if (data.includes("[/setup.json]")) {
|
// //if (debug) console.log("[i]", "log data:", data);
|
||||||
if (debug) console.log("[i]", "config data:", data);
|
//} else if (data.includes("[/setup.json]")) {
|
||||||
data = data.replace("[/setup.json]", "");
|
// if (debug) console.log("[i]", "config data:", data);
|
||||||
data = JSON.parse(data);
|
// data = data.replace("[/setup.json]", "");
|
||||||
config.push(data);
|
// data = JSON.parse(data);
|
||||||
config = config;
|
// config.push(data);
|
||||||
}
|
// config = config;
|
||||||
|
//}
|
||||||
});
|
});
|
||||||
socket[ws].addEventListener("close", (event) => {
|
socket[ws].addEventListener("close", (event) => {
|
||||||
if (debug) console.log("[e]", ip, "connection closed");
|
if (debug) console.log("[e]", ip, "connection closed");
|
||||||
|
|||||||
Reference in New Issue
Block a user