@ -947,6 +947,11 @@ class Monitor extends BeanModel {
]);
}
/**
*Checkifmonitorisundermaintenance
*@param{number}monitorIDIDofmonitortocheck
*@returns{Promise<boolean>}
*/
staticasyncisUnderMaintenance(monitorID){
constmaintenance=awaitR.getRow("SELECT COUNT(*) AS count FROM monitor_maintenance mm JOIN maintenance ON mm.maintenance_id = maintenance.id WHERE mm.monitor_id = ? AND datetime(maintenance.start_date) <= datetime('now') AND datetime(maintenance.end_date) >= datetime('now') LIMIT 1",[monitorID]);