Updated Status indicator

This commit is contained in:
headlessdev
2025-04-21 12:40:55 +02:00
parent df2c788b0b
commit a1a5e5e299
3 changed files with 43 additions and 22 deletions

View File

@@ -73,6 +73,7 @@ import {
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip"
import { StatusIndicator } from "@/components/status-indicator";
interface Application {
id: number;
@@ -440,20 +441,9 @@ export default function Dashboard() {
>
<CardHeader>
<div className="absolute top-2 right-2">
<div
className={`w-4 h-4 rounded-full flex items-center justify-center ${
app.online ? "bg-green-700" : "bg-red-700"
}`}
title={app.online ? "Online" : "Offline"}
>
<div
className={`w-2 h-2 rounded-full ${
app.online ? "bg-green-500" : "bg-red-500"
}`}
/>
</div>
<StatusIndicator isOnline={app.online} />
</div>
<div className="flex items-center justify-between w-full">
<div className="flex items-center justify-between w-full mt-4 mb-4">
<div className="flex items-center">
<div className="w-16 h-16 flex-shrink-0 flex items-center justify-center rounded-md">
{app.icon ? (

View File

@@ -58,7 +58,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
import { Checkbox } from "@/components/ui/checkbox"
import { ScrollArea } from "@/components/ui/scroll-area"
import { DynamicIcon } from "lucide-react/dynamic"
import { StatusIndicator } from "@/components/status-indicator"
interface Server {
id: number
name: string
@@ -832,14 +832,7 @@ export default function Dashboard() {
<CardHeader>
{server.monitoring && (
<div className="absolute top-2 right-2">
<div
className={`w-4 h-4 rounded-full flex items-center justify-center ${server.online ? "bg-green-700" : "bg-red-700"}`}
title={server.online ? "Online" : "Offline"}
>
<div
className={`w-2 h-2 rounded-full ${server.online ? "bg-green-500" : "bg-red-500"}`}
/>
</div>
<StatusIndicator isOnline={server.online} />
</div>
)}
<div className="flex items-center justify-between w-full">