mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-05 06:23:22 +00:00
fix(packages): add needsUpdate and isSecurityUpdate fields to package hosts
This commit is contained in:
@@ -126,6 +126,7 @@ router.get("/", async (req, res) => {
|
|||||||
osType: hp.hosts.os_type,
|
osType: hp.hosts.os_type,
|
||||||
currentVersion: hp.current_version,
|
currentVersion: hp.current_version,
|
||||||
availableVersion: hp.available_version,
|
availableVersion: hp.available_version,
|
||||||
|
needsUpdate: hp.needs_update,
|
||||||
isSecurityUpdate: hp.is_security_update,
|
isSecurityUpdate: hp.is_security_update,
|
||||||
})),
|
})),
|
||||||
stats: {
|
stats: {
|
||||||
|
|||||||
@@ -400,8 +400,8 @@ const PackageDetail = () => {
|
|||||||
{host.current_version || "Unknown"}
|
{host.current_version || "Unknown"}
|
||||||
</td>
|
</td>
|
||||||
<td className="px-6 py-4 whitespace-nowrap">
|
<td className="px-6 py-4 whitespace-nowrap">
|
||||||
{host.needs_update ? (
|
{host.needsUpdate ? (
|
||||||
host.is_security_update ? (
|
host.isSecurityUpdate ? (
|
||||||
<span className="badge-danger flex items-center gap-1 w-fit">
|
<span className="badge-danger flex items-center gap-1 w-fit">
|
||||||
<Shield className="h-3 w-3" />
|
<Shield className="h-3 w-3" />
|
||||||
Security Update
|
Security Update
|
||||||
@@ -418,8 +418,8 @@ const PackageDetail = () => {
|
|||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-secondary-500 dark:text-secondary-300">
|
<td className="px-6 py-4 whitespace-nowrap text-sm text-secondary-500 dark:text-secondary-300">
|
||||||
{host.last_updated
|
{host.lastUpdate
|
||||||
? formatRelativeTime(host.last_updated)
|
? formatRelativeTime(host.lastUpdate)
|
||||||
: "Never"}
|
: "Never"}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user