diff --git a/src/components/CertificateStatus.tsx b/src/components/CertificateStatus.tsx index daf373783..8271ccb60 100644 --- a/src/components/CertificateStatus.tsx +++ b/src/components/CertificateStatus.tsx @@ -12,6 +12,7 @@ type CertificateStatusProps = { autoFetch?: boolean; showLabel?: boolean; className?: string; + disableRestartButton?: boolean; onRefresh?: () => void; polling?: boolean; pollingInterval?: number; @@ -23,6 +24,7 @@ export default function CertificateStatus({ fullDomain, autoFetch = true, showLabel = true, + disableRestartButton = false, className = "", onRefresh, polling = false, @@ -153,7 +155,7 @@ export default function CertificateStatus({ variant="ghost" className="p-0 w-3 h-auto align-middle" onClick={handleRefresh} - disabled={refreshing} + disabled={refreshing || disableRestartButton} title={t("restartCertificate", { defaultValue: "Restart Certificate" })} diff --git a/src/components/ResourceInfoBox.tsx b/src/components/ResourceInfoBox.tsx index ad3cb5f34..4ceadb4f7 100644 --- a/src/components/ResourceInfoBox.tsx +++ b/src/components/ResourceInfoBox.tsx @@ -1,7 +1,7 @@ "use client"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; -import { ShieldCheck, ShieldOff, Eye, EyeOff } from "lucide-react"; +import { ShieldCheck, ShieldOff, Eye, EyeOff, CheckCircle2, XCircle, Clock } from "lucide-react"; import { useResourceContext } from "@app/hooks/useResourceContext"; import CopyToClipboard from "@app/components/CopyToClipboard"; import { @@ -18,8 +18,7 @@ import { useEnvContext } from "@app/hooks/useEnvContext"; type ResourceInfoBoxType = {}; export default function ResourceInfoBox({}: ResourceInfoBoxType) { - const { resource, authInfo, updateResource } = useResourceContext(); - const { env } = useEnvContext(); + const { resource, authInfo } = useResourceContext(); const t = useTranslations(); @@ -29,9 +28,7 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) { {/* 4 cols because of the certs */} - + {t("identifier")} @@ -155,6 +152,35 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) { )} + + {t("health")} + + {resource.health === "healthy" && ( +
+ + {t("resourcesTableHealthy")} +
+ )} + {resource.health === "degraded" && ( +
+ + {t("resourcesTableDegraded")} +
+ )} + {resource.health === "unhealthy" && ( +
+ + {t("resourcesTableUnhealthy")} +
+ )} + {(!resource.health || resource.health === "unknown") && ( +
+ + {t("resourcesTableUnknown")} +
+ )} +
+
{t("visibility")}