mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-23 17:23:02 +00:00
Fix gear icon
This commit is contained in:
@@ -694,19 +694,6 @@ export default function Page() {
|
|||||||
header: () => <span className="p-3">{t("healthCheck")}</span>,
|
header: () => <span className="p-3">{t("healthCheck")}</span>,
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const status = row.original.hcHealth || "unknown";
|
const status = row.original.hcHealth || "unknown";
|
||||||
const isEnabled = row.original.hcEnabled;
|
|
||||||
|
|
||||||
const getStatusColor = (status: string) => {
|
|
||||||
switch (status) {
|
|
||||||
case "healthy":
|
|
||||||
return "green";
|
|
||||||
case "unhealthy":
|
|
||||||
return "red";
|
|
||||||
case "unknown":
|
|
||||||
default:
|
|
||||||
return "secondary";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const getStatusText = (status: string) => {
|
const getStatusText = (status: string) => {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
@@ -720,19 +707,7 @@ export default function Page() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getStatusIcon = (status: string) => {
|
return (
|
||||||
switch (status) {
|
|
||||||
case "healthy":
|
|
||||||
return <CircleCheck className="w-3 h-3" />;
|
|
||||||
case "unhealthy":
|
|
||||||
return <CircleX className="w-3 h-3" />;
|
|
||||||
case "unknown":
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="flex items-center justify-center w-full">
|
<div className="flex items-center justify-center w-full">
|
||||||
{row.original.siteType === "newt" ? (
|
{row.original.siteType === "newt" ? (
|
||||||
<Button
|
<Button
|
||||||
@@ -742,12 +717,16 @@ export default function Page() {
|
|||||||
openHealthCheckDialog(row.original)
|
openHealthCheckDialog(row.original)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Settings className="h-4 w-4" />
|
<div
|
||||||
<div className="flex items-center gap-1">
|
className={`flex items-center gap-2 ${status === "healthy" ? "text-green-500" : status === "unhealthy" ? "text-destructive" : "text-neutral-500"}`}
|
||||||
{getStatusIcon(status)}
|
>
|
||||||
|
<div
|
||||||
|
className={`w-2 h-2 rounded-full ${status === "healthy" ? "bg-green-500" : status === "unhealthy" ? "bg-destructive" : "bg-neutral-500"}`}
|
||||||
|
></div>
|
||||||
{getStatusText(status)}
|
{getStatusText(status)}
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
) : (
|
) : (
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user