diff --git a/internal/site/src/components/routes/system.tsx b/internal/site/src/components/routes/system.tsx index adc6f7adb..8c9596767 100644 --- a/internal/site/src/components/routes/system.tsx +++ b/internal/site/src/components/routes/system.tsx @@ -23,7 +23,7 @@ import { LazyZfsTable, } from "./system/lazy-tables" import { LoadAverageChart } from "./system/charts/load-average-chart" -import { ContainerIcon, CpuIcon, HardDriveIcon, NetworkIcon, TerminalSquareIcon } from "lucide-react" +import { ContainerIcon, CpuIcon, HardDriveIcon, NetworkIcon, PackageIcon, TerminalSquareIcon } from "lucide-react" import { GpuIcon } from "../ui/icons" import SystemdTable from "../systemd-table/systemd-table" import ContainersTable from "../containers-table/containers-table" @@ -83,6 +83,7 @@ export default memo(function SystemDetail({ id }: { id: string }) { if (hasGpu) tabs.push("gpu") if (hasContainers) tabs.push("containers") if (hasSystemd) tabs.push("services") + if (packageUpdates) tabs.push("updates") tabsRef.current = tabs // shared chart props @@ -208,6 +209,12 @@ export default memo(function SystemDetail({ id }: { id: string }) { Services )} + {packageUpdates && ( + + + Updates + + )} @@ -221,7 +228,6 @@ export default memo(function SystemDetail({ id }: { id: string }) { {pageBottomExtraMargin > 0 &&
} - {packageUpdates && }
@@ -302,6 +308,12 @@ export default memo(function SystemDetail({ id }: { id: string }) { {mountedTabs.has("services") && } )} + + {packageUpdates && ( + + {mountedTabs.has("updates") && } + + )} ) } diff --git a/internal/site/src/components/routes/system/package-updates-table.tsx b/internal/site/src/components/routes/system/package-updates-table.tsx index 8f99b8fe2..7041cce28 100644 --- a/internal/site/src/components/routes/system/package-updates-table.tsx +++ b/internal/site/src/components/routes/system/package-updates-table.tsx @@ -35,8 +35,8 @@ interface PackageUpdateRow extends PackageUpdate { change: VersionChange } -/** Sort order of version changes, largest first. */ -const changeRank: Record = { major: 4, minor: 3, patch: 2, revision: 1, other: 0 } +/** Sort order of version changes, so ascending puts major first. */ +const changeRank: Record = { major: 0, minor: 1, patch: 2, revision: 3, other: 4 } const changeVariant: Record = { major: "danger", @@ -107,7 +107,7 @@ function getColumns(securityKnown: boolean): ColumnDef[] { ), cell: ({ getValue }) => ( - {(getValue() as string) || "-"} + {(getValue() as string) || "-"} ), }, { @@ -120,7 +120,7 @@ function getColumns(securityKnown: boolean): ColumnDef[] { Available ), - cell: ({ getValue }) => {getValue() as string}, + cell: ({ getValue }) => {getValue() as string}, }, { id: "change",