mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-21 06:58:20 +00:00
added reboot required flag
added kernel running/installed version Added dasboard card and filteres for reboot fixed security qty updated on dnf
This commit is contained in:
@@ -533,6 +533,14 @@ router.post(
|
||||
.optional()
|
||||
.isString()
|
||||
.withMessage("Machine ID must be a string"),
|
||||
body("needsReboot")
|
||||
.optional()
|
||||
.isBoolean()
|
||||
.withMessage("Needs reboot must be a boolean"),
|
||||
body("rebootReason")
|
||||
.optional()
|
||||
.isString()
|
||||
.withMessage("Reboot reason must be a string"),
|
||||
],
|
||||
async (req, res) => {
|
||||
try {
|
||||
@@ -596,6 +604,10 @@ router.post(
|
||||
updateData.system_uptime = req.body.systemUptime;
|
||||
if (req.body.loadAverage) updateData.load_average = req.body.loadAverage;
|
||||
|
||||
// Reboot Status
|
||||
if (req.body.needsReboot !== undefined)
|
||||
updateData.needs_reboot = req.body.needsReboot;
|
||||
|
||||
// If this is the first update (status is 'pending'), change to 'active'
|
||||
if (host.status === "pending") {
|
||||
updateData.status = "active";
|
||||
|
||||
Reference in New Issue
Block a user