mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 06:27:04 +08:00
- Maintenance standardize datetime format to YYYY-MM-DD hh:mm:ss
- Import dayjs extensions one time only - Maintenance activeCondition centralize
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const { BeanModel } = require("redbean-node/dist/bean-model");
|
||||
const { R } = require("redbean-node");
|
||||
const dayjs = require("dayjs");
|
||||
const { log } = require("../../src/util");
|
||||
|
||||
class MaintenanceTimeslot extends BeanModel {
|
||||
|
||||
@@ -30,7 +31,9 @@ class MaintenanceTimeslot extends BeanModel {
|
||||
]);
|
||||
}
|
||||
|
||||
if (maintenance.strategy === "single") {
|
||||
if (maintenance.strategy === "manual") {
|
||||
log.debug("maintenance", "No need to generate timeslot for manual type");
|
||||
} else if (maintenance.strategy === "single") {
|
||||
let bean = R.dispense("maintenance_timeslot");
|
||||
bean.maintenance_id = maintenance.id;
|
||||
bean.start_date = maintenance.start_datetime;
|
||||
|
Reference in New Issue
Block a user