fix(packages): add needsUpdate and isSecurityUpdate fields to package hosts

This commit is contained in:
tigattack
2025-10-01 22:10:19 +01:00
parent fffc571453
commit 757feab9cd
2 changed files with 5 additions and 4 deletions

View File

@@ -126,6 +126,7 @@ router.get("/", async (req, res) => {
osType: hp.hosts.os_type,
currentVersion: hp.current_version,
availableVersion: hp.available_version,
needsUpdate: hp.needs_update,
isSecurityUpdate: hp.is_security_update,
})),
stats: {

View File

@@ -400,8 +400,8 @@ const PackageDetail = () => {
{host.current_version || "Unknown"}
</td>
<td className="px-6 py-4 whitespace-nowrap">
{host.needs_update ? (
host.is_security_update ? (
{host.needsUpdate ? (
host.isSecurityUpdate ? (
<span className="badge-danger flex items-center gap-1 w-fit">
<Shield className="h-3 w-3" />
Security Update
@@ -418,8 +418,8 @@ const PackageDetail = () => {
)}
</td>
<td className="px-6 py-4 whitespace-nowrap text-sm text-secondary-500 dark:text-secondary-300">
{host.last_updated
? formatRelativeTime(host.last_updated)
{host.lastUpdate
? formatRelativeTime(host.lastUpdate)
: "Never"}
</td>
</tr>