Node status checking

This commit is contained in:
2025-12-29 19:49:37 +01:00
parent 98c8e86872
commit 4d18edcffe
10 changed files with 59 additions and 95 deletions
@@ -1,33 +0,0 @@
import { cn } from "@/lib/utils";
interface StatusIndicatorProps {
status: "running" | "stopped" | "error" | "pending";
showLabel?: boolean;
size?: "sm" | "md";
}
const statusConfig = {
running: { label: "Running", className: "status-running" },
stopped: { label: "Stopped", className: "status-stopped" },
error: { label: "Error", className: "status-error" },
pending: { label: "Pending", className: "status-pending" },
};
export function StatusIndicator({ status, showLabel = false, size = "md" }: StatusIndicatorProps) {
const config = statusConfig[status];
return (
<div className="flex items-center gap-2">
<div
className={cn(
"rounded-full",
config.className,
size === "sm" ? "w-1.5 h-1.5" : "w-2 h-2"
)}
/>
{showLabel && (
<span className="text-xs text-muted-foreground">{config.label}</span>
)}
</div>
);
}