mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-26 15:02:21 +03:00
541 версия
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.5.0</title>
|
||||
<title>IoT Manager 4.5.1</title>
|
||||
|
||||
<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>
|
||||
|
||||
<body></body>
|
||||
|
||||
@@ -49,7 +49,7 @@ export default {
|
||||
module: true,
|
||||
toplevel: true,
|
||||
unsafe_arrows: true,
|
||||
drop_console: false,
|
||||
drop_console: true,
|
||||
drop_debugger: true,
|
||||
},
|
||||
output: { quote_style: 1 },
|
||||
|
||||
@@ -44,18 +44,15 @@
|
||||
const LOG_MAX_MESSAGES = 100;
|
||||
let reconnectTimeout = 60; //период проверки соединения с устройством
|
||||
let remainingTimeout = reconnectTimeout;
|
||||
let connecting = true;
|
||||
let tickerTask;
|
||||
let preventReconnect = false;
|
||||
const waitingAckTimeout = 18000; //время ожидания ответа от устройства
|
||||
const rebootingTimeout = 30000;
|
||||
const updatingTimeout = 130000;
|
||||
let rebootOrUpdateProcess = false;
|
||||
let rebootTimer;
|
||||
let opened = true;
|
||||
let preventMove = false;
|
||||
let screenSize;
|
||||
const blobDebug = false;
|
||||
const devMode = true;
|
||||
const devMode = false;
|
||||
|
||||
let percent;
|
||||
|
||||
@@ -977,7 +974,12 @@
|
||||
tickerTask = setTimeout(wsTestMsgTask, 1000);
|
||||
if (!preventReconnect) {
|
||||
remainingTimeout--;
|
||||
if (socketConnected) showAwaitingCircle = false;
|
||||
if (rebootOrUpdateProcess && socketConnected) {
|
||||
rebootOrUpdateProcess = false;
|
||||
showAwaitingCircle = false;
|
||||
reconnectTimeout = 60;
|
||||
remainingTimeout = reconnectTimeout;
|
||||
}
|
||||
percent = scale(remainingTimeout, reconnectTimeout, 0, 0, 100);
|
||||
if (remainingTimeout <= 0) {
|
||||
if (debug) console.log("[i]", "----timer tick----");
|
||||
@@ -988,10 +990,6 @@
|
||||
wsConnect(device.ws);
|
||||
wsEventAdd(device.ws);
|
||||
} else {
|
||||
if (device.ws === selectedWs) {
|
||||
//clearInterval(tickerTask);
|
||||
connecting = true;
|
||||
}
|
||||
wsSendMsg(device.ws, "/tst|");
|
||||
ack(device.ws, false);
|
||||
}
|
||||
@@ -1149,6 +1147,7 @@
|
||||
}
|
||||
|
||||
function rebootEsp() {
|
||||
rebootOrUpdateProcess = true;
|
||||
if (debug) console.log("[i]", "reboot...");
|
||||
wsSendMsg(selectedWs, "/reboot|");
|
||||
markDeviceStatus(selectedWs, false);
|
||||
@@ -1158,6 +1157,16 @@
|
||||
remainingTimeout = reconnectTimeout;
|
||||
}
|
||||
|
||||
function updateBuild(path) {
|
||||
rebootOrUpdateProcess = true;
|
||||
console.log(path);
|
||||
wsSendMsg(selectedWs, "/update|" + path);
|
||||
showAwaitingCircle = true;
|
||||
socketConnected = false;
|
||||
reconnectTimeout = 20;
|
||||
remainingTimeout = reconnectTimeout;
|
||||
}
|
||||
|
||||
function applicationReboot() {
|
||||
console.log("[i]", "reboot svelte...");
|
||||
for (const [key, value] of Object.entries(pageReady)) {
|
||||
@@ -1169,13 +1178,6 @@
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function rebootingTask() {
|
||||
clearTimeout(rebootTimer);
|
||||
clearData();
|
||||
connectToAllDevices();
|
||||
showAwaitingCircle = false;
|
||||
}
|
||||
|
||||
function cancelAlarm(alarmKey) {
|
||||
console.log("[x]", alarmKey);
|
||||
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) {
|
||||
console.log("order: ", id, key, value);
|
||||
let json = {
|
||||
|
||||
Reference in New Issue
Block a user