mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-20 05:30:59 -04:00
Merge remote-tracking branch 'origin/1.19.X'
# Conflicts: # package-lock.json # package.json # src/util-frontend.js
This commit is contained in:
commit
c47b6c5995
45 changed files with 624 additions and 2624 deletions
|
@ -38,7 +38,6 @@ class Monitor extends BeanModel {
|
|||
id: this.id,
|
||||
name: this.name,
|
||||
sendUrl: this.sendUrl,
|
||||
maintenance: await Monitor.isUnderMaintenance(this.id),
|
||||
};
|
||||
|
||||
if (this.sendUrl) {
|
||||
|
@ -765,6 +764,13 @@ class Monitor extends BeanModel {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a request using axios
|
||||
* @param {Object} options Options for Axios
|
||||
* @param {boolean} finalCall Should this be the final call i.e
|
||||
* don't retry on faliure
|
||||
* @returns {Object} Axios response
|
||||
*/
|
||||
async makeAxiosRequest(options, finalCall = false) {
|
||||
try {
|
||||
let res;
|
||||
|
@ -1246,6 +1252,7 @@ class Monitor extends BeanModel {
|
|||
return maintenance.count !== 0;
|
||||
}
|
||||
|
||||
/** Make sure monitor interval is between bounds */
|
||||
validate() {
|
||||
if (this.interval > MAX_INTERVAL_SECOND) {
|
||||
throw new Error(`Interval cannot be more than ${MAX_INTERVAL_SECOND} seconds`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue