diff --git a/app/dashboard/Dashboard.tsx b/app/dashboard/Dashboard.tsx index b096e62..a514d2f 100644 --- a/app/dashboard/Dashboard.tsx +++ b/app/dashboard/Dashboard.tsx @@ -19,20 +19,23 @@ import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } import { Button } from "@/components/ui/button" interface StatsResponse { - serverCount: number + serverCountNoVMs: number + serverCountOnlyVMs: number applicationCount: number onlineApplicationsCount: number } export default function Dashboard() { - const [serverCount, setServerCount] = useState(0) + const [serverCountNoVMs, setServerCountNoVMs] = useState(0) + const [serverCountOnlyVMs, setServerCountOnlyVMs] = useState(0) const [applicationCount, setApplicationCount] = useState(0) const [onlineApplicationsCount, setOnlineApplicationsCount] = useState(0) const getStats = async () => { try { const response = await axios.post("/api/dashboard/get", {}) - setServerCount(response.data.serverCount) + setServerCountNoVMs(response.data.serverCountNoVMs) + setServerCountOnlyVMs(response.data.serverCountOnlyVMs) setApplicationCount(response.data.applicationCount) setOnlineApplicationsCount(response.data.onlineApplicationsCount) } catch (error: any) { @@ -78,8 +81,16 @@ export default function Dashboard() { Manage your server infrastructure -
{serverCount}
-

Active servers

+
+
+
{serverCountNoVMs}
+

Physical servers

+
+
+
{serverCountOnlyVMs}
+

VMs

+
+