Fleet UI: Fix unreleased app store app timestamp broken (#28934)

This commit is contained in:
RachelElysia
2025-05-08 09:16:51 -04:00
committed by GitHub
parent 729fdd2c56
commit 5ec2deba9c
2 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -365,7 +365,7 @@ export interface ISoftwareInstallVersion {
export interface IHostSoftwarePackage {
name: string;
self_service: boolean;
icon_url: string;
icon_url: string | null;
version: string;
last_install: ISoftwareLastInstall | null;
categories?: SoftwareCategory[];
@@ -45,8 +45,11 @@ const STATUS_CONFIG: Record<
installed: {
iconName: "success",
displayText: "Installed",
tooltip: ({ lastInstalledAt = "" }) =>
`Software is installed (${dateAgo(lastInstalledAt as string)}).`,
tooltip: ({ lastInstalledAt = null }) => {
return `Software is installed${
lastInstalledAt ? ` (${dateAgo(lastInstalledAt)})` : ""
}.`;
},
},
pending_install: {
iconName: "pending-outline",
@@ -56,7 +59,7 @@ const STATUS_CONFIG: Record<
failed_install: {
iconName: "error",
displayText: "Failed",
tooltip: ({ lastInstalledAt = "" }) => (
tooltip: ({ lastInstalledAt = null }) => (
<>
Software failed to install
{lastInstalledAt ? ` (${dateAgo(lastInstalledAt)})` : ""}. Select{" "}
@@ -300,7 +303,9 @@ export const generateSoftwareTableHeaders = ({
<InstallerStatus
status={cellProps.row.original.status}
last_install={
cellProps.row.original.software_package?.last_install || null
cellProps.row.original.software_package?.last_install ||
cellProps.row.original.app_store_app?.last_install ||
null
}
onShowInstallerDetails={onShowInstallerDetails}
/>