Fix jwt-token
This commit is contained in:
@@ -103,24 +103,31 @@ const System = () => {
|
||||
<h4 className="font-medium text-gray-900 mb-3 truncate" title={name}>
|
||||
{name.replace('drone-detection-', '').replace('uamils-', '')}
|
||||
</h4>
|
||||
<div className="space-y-2 text-sm">
|
||||
<div className="flex justify-between">
|
||||
<span className="text-gray-500">CPU</span>
|
||||
<span className="font-medium">{metrics.cpu}</span>
|
||||
{metrics.error ? (
|
||||
<div className="text-sm text-red-600">
|
||||
<div className="font-medium">Not Available</div>
|
||||
<div className="text-xs mt-1">{metrics.message}</div>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-gray-500">Memory</span>
|
||||
<span className="font-medium">{metrics.memory.percentage}</span>
|
||||
) : (
|
||||
<div className="space-y-2 text-sm">
|
||||
<div className="flex justify-between">
|
||||
<span className="text-gray-500">CPU</span>
|
||||
<span className="font-medium">{metrics.cpu}</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-gray-500">Memory</span>
|
||||
<span className="font-medium">{metrics.memory.percentage}</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-gray-500">Network I/O</span>
|
||||
<span className="font-medium text-xs">{metrics.network}</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-gray-500">Disk I/O</span>
|
||||
<span className="font-medium text-xs">{metrics.disk}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-gray-500">Network I/O</span>
|
||||
<span className="font-medium text-xs">{metrics.network}</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-gray-500">Disk I/O</span>
|
||||
<span className="font-medium text-xs">{metrics.disk}</span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -233,26 +240,33 @@ const System = () => {
|
||||
</StatusCard>
|
||||
|
||||
<StatusCard title="System Resources" icon={CpuChipIcon}>
|
||||
<div className="space-y-3">
|
||||
<div>
|
||||
<div className="flex justify-between text-sm mb-1">
|
||||
<span className="text-gray-500">CPU Usage</span>
|
||||
<span className="font-medium">{systemInfo.system.cpu.usage}</span>
|
||||
{systemInfo.system.error ? (
|
||||
<div className="text-center text-red-600">
|
||||
<div className="font-medium">System metrics unavailable</div>
|
||||
<div className="text-xs mt-1">{systemInfo.system.message}</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-3">
|
||||
<div>
|
||||
<div className="flex justify-between text-sm mb-1">
|
||||
<span className="text-gray-500">CPU Usage</span>
|
||||
<span className="font-medium">{systemInfo.system.cpu.usage}</span>
|
||||
</div>
|
||||
<ProgressBar percentage={systemInfo.system.cpu.percentage} />
|
||||
</div>
|
||||
<ProgressBar percentage={systemInfo.system.cpu.percentage} />
|
||||
</div>
|
||||
<div>
|
||||
<div className="flex justify-between text-sm mb-1">
|
||||
<span className="text-gray-500">Memory</span>
|
||||
<span className="font-medium">{systemInfo.system.memory.used} / {systemInfo.system.memory.total}</span>
|
||||
<div>
|
||||
<div className="flex justify-between text-sm mb-1">
|
||||
<span className="text-gray-500">Memory</span>
|
||||
<span className="font-medium">{systemInfo.system.memory.used} / {systemInfo.system.memory.total}</span>
|
||||
</div>
|
||||
<ProgressBar percentage={systemInfo.system.memory.percentage} />
|
||||
</div>
|
||||
<div className="flex justify-between text-sm">
|
||||
<span className="text-gray-500">Disk</span>
|
||||
<span className="font-medium text-xs">{systemInfo.system.disk}</span>
|
||||
</div>
|
||||
<ProgressBar percentage={systemInfo.system.memory.percentage} />
|
||||
</div>
|
||||
<div className="flex justify-between text-sm">
|
||||
<span className="text-gray-500">Disk</span>
|
||||
<span className="font-medium text-xs">{systemInfo.system.disk}</span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</StatusCard>
|
||||
|
||||
<StatusCard title="Statistics" icon={ChartBarIcon}>
|
||||
@@ -290,11 +304,19 @@ const System = () => {
|
||||
{/* Container Metrics */}
|
||||
<div className="mb-8">
|
||||
<StatusCard title="Container Metrics" icon={ServerIcon}>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{Object.entries(systemInfo.containers).map(([name, metrics]) => (
|
||||
<ContainerCard key={name} name={name} metrics={metrics} />
|
||||
))}
|
||||
</div>
|
||||
{systemInfo.containers.error ? (
|
||||
<div className="text-center text-red-600 py-8">
|
||||
<XCircleIcon className="mx-auto h-12 w-12 text-red-400 mb-2" />
|
||||
<div className="font-medium">Docker containers not available</div>
|
||||
<div className="text-sm mt-1">{systemInfo.containers.message}</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{Object.entries(systemInfo.containers).map(([name, metrics]) => (
|
||||
<ContainerCard key={name} name={name} metrics={metrics} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</StatusCard>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user