mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-26 23:12:34 +03:00
541 версия
This commit is contained in:
@@ -4,12 +4,12 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||||
|
|
||||||
<title>IoT Manager 4.5.0</title>
|
<title>IoT Manager 4.5.1</title>
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="/favicon.ico" />
|
<link rel="icon" type="image/png" href="/favicon.ico" />
|
||||||
<link rel="stylesheet" href="/build/bundle.css?450" />
|
<link rel="stylesheet" href="/build/bundle.css?451" />
|
||||||
|
|
||||||
<script defer src="/build/bundle.js?450"></script>
|
<script defer src="/build/bundle.js?451"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body></body>
|
<body></body>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export default {
|
|||||||
module: true,
|
module: true,
|
||||||
toplevel: true,
|
toplevel: true,
|
||||||
unsafe_arrows: true,
|
unsafe_arrows: true,
|
||||||
drop_console: false,
|
drop_console: true,
|
||||||
drop_debugger: true,
|
drop_debugger: true,
|
||||||
},
|
},
|
||||||
output: { quote_style: 1 },
|
output: { quote_style: 1 },
|
||||||
|
|||||||
@@ -44,18 +44,15 @@
|
|||||||
const LOG_MAX_MESSAGES = 100;
|
const LOG_MAX_MESSAGES = 100;
|
||||||
let reconnectTimeout = 60; //период проверки соединения с устройством
|
let reconnectTimeout = 60; //период проверки соединения с устройством
|
||||||
let remainingTimeout = reconnectTimeout;
|
let remainingTimeout = reconnectTimeout;
|
||||||
let connecting = true;
|
|
||||||
let tickerTask;
|
|
||||||
let preventReconnect = false;
|
let preventReconnect = false;
|
||||||
const waitingAckTimeout = 18000; //время ожидания ответа от устройства
|
const waitingAckTimeout = 18000; //время ожидания ответа от устройства
|
||||||
const rebootingTimeout = 30000;
|
let rebootOrUpdateProcess = false;
|
||||||
const updatingTimeout = 130000;
|
|
||||||
let rebootTimer;
|
let rebootTimer;
|
||||||
let opened = true;
|
let opened = true;
|
||||||
let preventMove = false;
|
let preventMove = false;
|
||||||
let screenSize;
|
let screenSize;
|
||||||
const blobDebug = false;
|
const blobDebug = false;
|
||||||
const devMode = true;
|
const devMode = false;
|
||||||
|
|
||||||
let percent;
|
let percent;
|
||||||
|
|
||||||
@@ -977,7 +974,12 @@
|
|||||||
tickerTask = setTimeout(wsTestMsgTask, 1000);
|
tickerTask = setTimeout(wsTestMsgTask, 1000);
|
||||||
if (!preventReconnect) {
|
if (!preventReconnect) {
|
||||||
remainingTimeout--;
|
remainingTimeout--;
|
||||||
if (socketConnected) showAwaitingCircle = false;
|
if (rebootOrUpdateProcess && socketConnected) {
|
||||||
|
rebootOrUpdateProcess = false;
|
||||||
|
showAwaitingCircle = false;
|
||||||
|
reconnectTimeout = 60;
|
||||||
|
remainingTimeout = reconnectTimeout;
|
||||||
|
}
|
||||||
percent = scale(remainingTimeout, reconnectTimeout, 0, 0, 100);
|
percent = scale(remainingTimeout, reconnectTimeout, 0, 0, 100);
|
||||||
if (remainingTimeout <= 0) {
|
if (remainingTimeout <= 0) {
|
||||||
if (debug) console.log("[i]", "----timer tick----");
|
if (debug) console.log("[i]", "----timer tick----");
|
||||||
@@ -988,10 +990,6 @@
|
|||||||
wsConnect(device.ws);
|
wsConnect(device.ws);
|
||||||
wsEventAdd(device.ws);
|
wsEventAdd(device.ws);
|
||||||
} else {
|
} else {
|
||||||
if (device.ws === selectedWs) {
|
|
||||||
//clearInterval(tickerTask);
|
|
||||||
connecting = true;
|
|
||||||
}
|
|
||||||
wsSendMsg(device.ws, "/tst|");
|
wsSendMsg(device.ws, "/tst|");
|
||||||
ack(device.ws, false);
|
ack(device.ws, false);
|
||||||
}
|
}
|
||||||
@@ -1149,6 +1147,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function rebootEsp() {
|
function rebootEsp() {
|
||||||
|
rebootOrUpdateProcess = true;
|
||||||
if (debug) console.log("[i]", "reboot...");
|
if (debug) console.log("[i]", "reboot...");
|
||||||
wsSendMsg(selectedWs, "/reboot|");
|
wsSendMsg(selectedWs, "/reboot|");
|
||||||
markDeviceStatus(selectedWs, false);
|
markDeviceStatus(selectedWs, false);
|
||||||
@@ -1158,6 +1157,16 @@
|
|||||||
remainingTimeout = reconnectTimeout;
|
remainingTimeout = reconnectTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateBuild(path) {
|
||||||
|
rebootOrUpdateProcess = true;
|
||||||
|
console.log(path);
|
||||||
|
wsSendMsg(selectedWs, "/update|" + path);
|
||||||
|
showAwaitingCircle = true;
|
||||||
|
socketConnected = false;
|
||||||
|
reconnectTimeout = 20;
|
||||||
|
remainingTimeout = reconnectTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
function applicationReboot() {
|
function applicationReboot() {
|
||||||
console.log("[i]", "reboot svelte...");
|
console.log("[i]", "reboot svelte...");
|
||||||
for (const [key, value] of Object.entries(pageReady)) {
|
for (const [key, value] of Object.entries(pageReady)) {
|
||||||
@@ -1169,13 +1178,6 @@
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function rebootingTask() {
|
|
||||||
clearTimeout(rebootTimer);
|
|
||||||
clearData();
|
|
||||||
connectToAllDevices();
|
|
||||||
showAwaitingCircle = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function cancelAlarm(alarmKey) {
|
function cancelAlarm(alarmKey) {
|
||||||
console.log("[x]", alarmKey);
|
console.log("[x]", alarmKey);
|
||||||
errorsJson[alarmKey] = 0;
|
errorsJson[alarmKey] = 0;
|
||||||
@@ -1213,15 +1215,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateBuild(path) {
|
|
||||||
console.log(path);
|
|
||||||
wsSendMsg(selectedWs, "/update|" + path);
|
|
||||||
showAwaitingCircle = true;
|
|
||||||
socketConnected = false;
|
|
||||||
reconnectTimeout = 10;
|
|
||||||
//rebootTimer = setTimeout(rebootingTask, updatingTimeout);
|
|
||||||
}
|
|
||||||
|
|
||||||
function moduleOrder(id, key, value) {
|
function moduleOrder(id, key, value) {
|
||||||
console.log("order: ", id, key, value);
|
console.log("order: ", id, key, value);
|
||||||
let json = {
|
let json = {
|
||||||
|
|||||||
Reference in New Issue
Block a user