mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
Update server/model/monitor.js
Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
parent
7a46b44d25
commit
25262cfb91
1 changed files with 7 additions and 0 deletions
|
@ -796,6 +796,13 @@ class Monitor extends BeanModel {
|
|||
(previousBeatStatus === PENDING && currentBeatStatus === DOWN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this beat important for notifications?
|
||||
* @param {boolean} isFirstBeat Is this the first beat of this monitor?
|
||||
* @param {const} previousBeatStatus Status of the previous beat
|
||||
* @param {const} currentBeatStatus Status of the current beat
|
||||
* @returns {boolean} True if is an important beat else false
|
||||
*/
|
||||
static isImportantForNotification(isFirstBeat, previousBeatStatus, currentBeatStatus) {
|
||||
// * ? -> ANY STATUS = important [isFirstBeat]
|
||||
// UP -> PENDING = not important
|
||||
|
|
Loading…
Reference in a new issue