Fix input of the statusOfLastHeartbeat function

pull/4587/head
Bas Wieringa 2 months ago
parent 26e234c132
commit 488504c3fd

@ -190,11 +190,11 @@ export default {
/** /**
* Returns the status of the last heartbeat * Returns the status of the last heartbeat
* @param {object} monitor Monitor to get status for * @param {number} monitorId Id of the monitor to get status for
* @returns {number} Status of the last heartbeat * @returns {number} Status of the last heartbeat
*/ */
statusOfLastHeartbeat(monitor) { statusOfLastHeartbeat(monitorId) {
let heartbeats = this.$root.heartbeatList[this.monitorId] ?? []; let heartbeats = this.$root.heartbeatList[monitorId] ?? [];
let lastHeartbeat = heartbeats[heartbeats.length - 1]; let lastHeartbeat = heartbeats[heartbeats.length - 1];
return lastHeartbeat?.status; return lastHeartbeat?.status;
}, },

Loading…
Cancel
Save