Remove 'loading' and 'error' states

This commit is contained in:
2025-10-26 19:12:35 +01:00
parent 2a1bebeb24
commit 75e7b628ca
3 changed files with 37 additions and 115 deletions

View File

@@ -2,7 +2,7 @@
import React from "react";
import { Badge } from "@/components/ui/badge";
import type { HealthStatus } from "@/types/instance";
import { CheckCircle, Loader2, XCircle, Clock, AlertCircle } from "lucide-react";
import { CheckCircle, Loader2, XCircle, Clock } from "lucide-react";
interface HealthBadgeProps {
health?: HealthStatus;
@@ -17,16 +17,12 @@ const HealthBadge: React.FC<HealthBadgeProps> = ({ health }) => {
switch (health.state) {
case "ready":
return <CheckCircle className="h-3 w-3" />;
case "loading":
return <Loader2 className="h-3 w-3 animate-spin" />;
case "starting":
return <Loader2 className="h-3 w-3 animate-spin" />;
case "restarting":
return <Loader2 className="h-3 w-3 animate-spin" />;
case "stopped":
return <Clock className="h-3 w-3" />;
case "error":
return <AlertCircle className="h-3 w-3" />;
case "failed":
return <XCircle className="h-3 w-3" />;
}
@@ -36,16 +32,12 @@ const HealthBadge: React.FC<HealthBadgeProps> = ({ health }) => {
switch (health.state) {
case "ready":
return "default";
case "loading":
return "outline";
case "starting":
return "outline";
case "restarting":
return "outline";
case "stopped":
return "secondary";
case "error":
return "destructive";
case "failed":
return "destructive";
}
@@ -55,16 +47,12 @@ const HealthBadge: React.FC<HealthBadgeProps> = ({ health }) => {
switch (health.state) {
case "ready":
return "Ready";
case "loading":
return "Loading";
case "starting":
return "Starting";
case "restarting":
return "Restarting";
case "stopped":
return "Stopped";
case "error":
return "Error";
case "failed":
return "Failed";
}