mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-22 17:38:57 +08:00
implement uptime
This commit is contained in:
@@ -17,18 +17,11 @@ export default {
|
||||
},
|
||||
allowLoginDialog: false, // Allowed to show login dialog, but "loggedIn" have to be true too. This exists because prevent the login dialog show 0.1s in first before the socket server auth-ed.
|
||||
loggedIn: false,
|
||||
monitorList: [
|
||||
|
||||
],
|
||||
heartbeatList: {
|
||||
|
||||
},
|
||||
importantHeartbeatList: {
|
||||
|
||||
},
|
||||
avgPingList: {
|
||||
|
||||
}
|
||||
monitorList: { },
|
||||
heartbeatList: { },
|
||||
importantHeartbeatList: { },
|
||||
avgPingList: { },
|
||||
uptimeList: { }
|
||||
}
|
||||
},
|
||||
|
||||
@@ -85,6 +78,10 @@ export default {
|
||||
this.avgPingList[monitorID] = data
|
||||
});
|
||||
|
||||
socket.on('uptime', (monitorID, type, data) => {
|
||||
this.uptimeList[`${monitorID}_${type}`] = data
|
||||
});
|
||||
|
||||
socket.on('importantHeartbeatList', (monitorID, data) => {
|
||||
if (! (monitorID in this.importantHeartbeatList)) {
|
||||
this.importantHeartbeatList[monitorID] = data;
|
||||
|
Reference in New Issue
Block a user