Fixed filtering for regular / security updates pie chart on the dashboard

This commit is contained in:
Muhammad Ibrahim
2025-10-07 21:13:22 +01:00
parent 2a1eed1354
commit 831adf3038
3 changed files with 14 additions and 16 deletions

View File

@@ -145,9 +145,13 @@ router.get(
];
// Package update priority distribution
const regularUpdates = Math.max(
0,
totalOutdatedPackages - securityUpdates,
);
const packageUpdateDistribution = [
{ name: "Security", count: securityUpdates },
{ name: "Regular", count: totalOutdatedPackages - securityUpdates },
{ name: "Regular", count: regularUpdates },
];
res.json({