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:
Muhammad Ibrahim
2025-11-16 22:50:41 +00:00
parent 8df6ca2342
commit 539bbb7fbc
24 changed files with 918 additions and 200 deletions

View File

@@ -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";