mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-08 10:00:12 -05:00
Adding Global Threshold Settings
This commit is contained in:
@@ -65,7 +65,13 @@ const AppSettingsSchema = mongoose.Schema(
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
},
|
||||
globalThresholds: {
|
||||
cpu: { type: Number },
|
||||
memory: { type: Number},
|
||||
disk: { type: Number},
|
||||
temperature: { type: Number},
|
||||
}
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
}
|
||||
|
||||
@@ -416,8 +416,16 @@ const updateAppSettingsBodyValidation = joi.object({
|
||||
systemEmailIgnoreTLS: joi.boolean(),
|
||||
systemEmailRequireTLS: joi.boolean(),
|
||||
systemEmailRejectUnauthorized: joi.boolean(),
|
||||
|
||||
globalThresholds: joi.object({
|
||||
cpu: joi.number().min(1).max(100).allow("").optional(),
|
||||
memory: joi.number().min(1).max(100).allow("").optional(),
|
||||
disk: joi.number().min(1).max(100).allow("").optional(),
|
||||
temperature: joi.number().min(1).max(150).allow("").optional(),
|
||||
}).optional(),
|
||||
});
|
||||
|
||||
|
||||
//****************************************
|
||||
// Status Page Validation
|
||||
//****************************************
|
||||
|
||||
Reference in New Issue
Block a user