From 443a06cec688d2fcadd5bbc25f956935cef511cc Mon Sep 17 00:00:00 2001 From: ochenstarik-ui Date: Mon, 20 Jul 2026 22:42:55 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20AgentCard=20=D1=87=D0=B8=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D1=8F,=20h-full,?= =?UTF-8?q?=20max-w-screen-2xl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.tsx | 2 +- frontend/src/components/agents/AgentCard.tsx | 61 +++++++++----------- 2 files changed, 28 insertions(+), 35 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 16c704d..1bd2b96 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -25,7 +25,7 @@ export default function App() { -
+
diff --git a/frontend/src/components/agents/AgentCard.tsx b/frontend/src/components/agents/AgentCard.tsx index 1a94861..7fdb297 100644 --- a/frontend/src/components/agents/AgentCard.tsx +++ b/frontend/src/components/agents/AgentCard.tsx @@ -1,57 +1,50 @@ -import { Cpu, Activity } from 'lucide-react' +import { motion } from 'framer-motion' export function AgentCard({ agent }: { agent: any }) { - const statusColor = { - online: 'bg-emerald-500', - busy: 'bg-amber-500', - offline: 'bg-zinc-500', - }[agent.status] || 'bg-emerald-500' - const tokenPercent = Math.round((agent.tokens_used / agent.tokens_limit) * 100) const budgetPercent = Math.round((agent.budget_used / agent.budget_limit) * 100) return ( -
+ {/* Header */}
-
+
{agent.name}
-
{agent.runtime} · {agent.model}
- {agent.provider && ( -
- {agent.provider} - {agent.account} -
- )} +
{agent.runtime} · {agent.model}
-
{agent.status}
+
+ {agent.healthy !== false ? 'ONLINE' : 'OFFLINE'} +
+
+ + {/* Account */} +
+ {agent.provider} + {agent.account}
{/* Metrics */} -
+
-
- - CPU % -
-
{agent.cpu}
+
{agent.cpu}
+
CPU %
-
- - RUNS -
-
{agent.active_runs || agent.activeRuns}
+
{agent.activeRuns}
+
RUNS
- {/* Limits */} -
+ {/* Usage */} +
-
+
Tokens {agent.tokens_used?.toLocaleString()} / {agent.tokens_limit?.toLocaleString()}
@@ -61,7 +54,7 @@ export function AgentCard({ agent }: { agent: any }) {
-
+
Budget ${agent.budget_used} / ${agent.budget_limit}
@@ -73,10 +66,10 @@ export function AgentCard({ agent }: { agent: any }) { -
+ ) }