mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-09-13 10:49:21 +00:00
✨ feat: improve Kubernetes resource monitoring
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { StatusBadge, type StatusTone } from "@/components/status-badge";
|
||||
|
||||
const phaseTones: Record<string, StatusTone> = {
|
||||
Running: "success",
|
||||
Succeeded: "success",
|
||||
Failed: "error",
|
||||
Pending: "warning",
|
||||
Unknown: "neutral",
|
||||
};
|
||||
|
||||
export function K8sPhaseBadge({ phase }: { phase?: string }) {
|
||||
if (!phase) {
|
||||
return <StatusBadge>Unknown</StatusBadge>;
|
||||
}
|
||||
|
||||
return <StatusBadge tone={phaseTones[phase] ?? "neutral"}>{phase}</StatusBadge>;
|
||||
}
|
||||
Reference in New Issue
Block a user