WIP: Add options for chart period

Fix: Fix callback, add toast on error

Fix: Improve styling

Fix: Restore default chart behavior

Fix: Replace 1h with 3h

draft only
This commit is contained in:
Nelson Chan 2021-10-18 19:00:39 +08:00
parent c9549c0de2
commit b83c59e308
4 changed files with 111 additions and 16 deletions

View file

@ -644,6 +644,25 @@ exports.entryPage = "dashboard";
}
});
socket.on("getMonitorBeats", async (monitorID, period, callback) => {
try {
checkLogin(socket);
console.log(`Get Monitor Beats: ${monitorID} User ID: ${socket.userID}`);
await sendHeartbeatList(socket, monitorID, true, true, period);
callback({
ok: true
});
} catch (e) {
callback({
ok: false,
msg: e.message,
});
}
});
// Start or Resume the monitor
socket.on("resumeMonitor", async (monitorID, callback) => {
try {