mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 15:08:10 +01:00
Add keepalive
This commit is contained in:
parent
9dfa87ee60
commit
8b92198122
1 changed files with 49 additions and 0 deletions
|
@ -309,6 +309,13 @@ document.querySelectorAll(".action-show-logs").forEach((showLogs) => {
|
||||||
M.toast({html: 'Terminated process.'});
|
M.toast({html: 'Terminated process.'});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const keepalive = () => {
|
||||||
|
if (logSocket.readyState === logSocket.OPEN) {
|
||||||
|
logSocket.send('');
|
||||||
|
setTimeout(keepalive, 20000);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
keepalive();
|
||||||
modalInstance.options.onCloseStart = () => {
|
modalInstance.options.onCloseStart = () => {
|
||||||
logSocket.close();
|
logSocket.close();
|
||||||
};
|
};
|
||||||
|
@ -358,6 +365,13 @@ document.querySelectorAll(".action-upload").forEach((upload) => {
|
||||||
M.toast({html: 'Terminated process.'});
|
M.toast({html: 'Terminated process.'});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const keepalive = () => {
|
||||||
|
if (logSocket.readyState === logSocket.OPEN) {
|
||||||
|
logSocket.send('');
|
||||||
|
setTimeout(keepalive, 20000);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
keepalive();
|
||||||
modalInstance.options.onCloseStart = () => {
|
modalInstance.options.onCloseStart = () => {
|
||||||
logSocket.close();
|
logSocket.close();
|
||||||
};
|
};
|
||||||
|
@ -412,6 +426,13 @@ document.querySelectorAll(".action-validate").forEach((upload) => {
|
||||||
M.toast({html: 'Terminated process.'});
|
M.toast({html: 'Terminated process.'});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const keepalive = () => {
|
||||||
|
if (logSocket.readyState === logSocket.OPEN) {
|
||||||
|
logSocket.send('');
|
||||||
|
setTimeout(keepalive, 20000);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
keepalive();
|
||||||
modalInstance.options.onCloseStart = () => {
|
modalInstance.options.onCloseStart = () => {
|
||||||
logSocket.close();
|
logSocket.close();
|
||||||
};
|
};
|
||||||
|
@ -464,6 +485,13 @@ document.querySelectorAll(".action-compile").forEach((upload) => {
|
||||||
M.toast({html: 'Terminated process.'});
|
M.toast({html: 'Terminated process.'});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const keepalive = () => {
|
||||||
|
if (logSocket.readyState === logSocket.OPEN) {
|
||||||
|
logSocket.send('');
|
||||||
|
setTimeout(keepalive, 20000);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
keepalive();
|
||||||
modalInstance.options.onCloseStart = () => {
|
modalInstance.options.onCloseStart = () => {
|
||||||
logSocket.close();
|
logSocket.close();
|
||||||
};
|
};
|
||||||
|
@ -515,6 +543,13 @@ document.querySelectorAll(".action-clean-mqtt").forEach((btn) => {
|
||||||
M.toast({html: 'Terminated process.'});
|
M.toast({html: 'Terminated process.'});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const keepalive = () => {
|
||||||
|
if (logSocket.readyState === logSocket.OPEN) {
|
||||||
|
logSocket.send('');
|
||||||
|
setTimeout(keepalive, 20000);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
keepalive();
|
||||||
modalInstance.options.onCloseStart = () => {
|
modalInstance.options.onCloseStart = () => {
|
||||||
logSocket.close();
|
logSocket.close();
|
||||||
};
|
};
|
||||||
|
@ -563,6 +598,13 @@ document.querySelectorAll(".action-clean").forEach((btn) => {
|
||||||
M.toast({html: 'Terminated process.'});
|
M.toast({html: 'Terminated process.'});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const keepalive = () => {
|
||||||
|
if (logSocket.readyState === logSocket.OPEN) {
|
||||||
|
logSocket.send('');
|
||||||
|
setTimeout(keepalive, 20000);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
keepalive();
|
||||||
modalInstance.options.onCloseStart = () => {
|
modalInstance.options.onCloseStart = () => {
|
||||||
logSocket.close();
|
logSocket.close();
|
||||||
};
|
};
|
||||||
|
@ -611,6 +653,13 @@ document.querySelectorAll(".action-hass-config").forEach((btn) => {
|
||||||
M.toast({html: 'Terminated process.'});
|
M.toast({html: 'Terminated process.'});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const keepalive = () => {
|
||||||
|
if (logSocket.readyState === logSocket.OPEN) {
|
||||||
|
logSocket.send('');
|
||||||
|
setTimeout(keepalive, 20000);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
keepalive();
|
||||||
modalInstance.options.onCloseStart = () => {
|
modalInstance.options.onCloseStart = () => {
|
||||||
logSocket.close();
|
logSocket.close();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue