mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 09:04:27 +00:00
Remove 'loading' and 'error' states
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user