add telegram notification

This commit is contained in:
LouisLam
2021-07-09 14:14:03 +08:00
parent 04ec91d7a9
commit 3bdf174e90
11 changed files with 418 additions and 85 deletions

View File

@@ -23,7 +23,8 @@ export default {
heartbeatList: { },
importantHeartbeatList: { },
avgPingList: { },
uptimeList: { }
uptimeList: { },
notificationList: [],
}
},
@@ -36,6 +37,10 @@ export default {
this.monitorList = data;
});
socket.on('notificationList', (data) => {
this.notificationList = data;
});
socket.on('heartbeat', (data) => {
if (! (data.monitorID in this.heartbeatList)) {
this.heartbeatList[data.monitorID] = [];