= (p
- |
+ |
{renderDockerStatusBadge(summary.host.status)}
|
-
+ |
—}>
-
+ = 90 ? 'text-red-600 dark:text-red-400 font-bold' : summary.cpuPercent >= 80 ? 'text-orange-600 dark:text-orange-400 font-medium' : 'text-gray-600 dark:text-gray-400'}`}>
+ {formatPercent(summary.cpuPercent)}
+
+
+
+
|
-
+ |
—}>
-
+ = 85 ? 'text-red-600 dark:text-red-400 font-bold' : summary.memoryPercent >= 75 ? 'text-orange-600 dark:text-orange-400 font-medium' : 'text-gray-600 dark:text-gray-400'}`}>
+ {formatPercent(summary.memoryPercent)}
+
+
+
+
|
-
+ |
—}>
-
+ = 90 ? 'text-red-600 dark:text-red-400 font-bold' : summary.diskPercent >= 80 ? 'text-orange-600 dark:text-orange-400 font-medium' : 'text-gray-600 dark:text-gray-400'}`}>
+ {formatPercent(summary.diskPercent)}
+
+
+
+
|
-
+ |
0}
@@ -411,11 +426,10 @@ export const DockerHostSummaryTable: Component = (p
? 'px-1.5 py-0.5 rounded bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-400 font-medium'
: 'px-1.5 py-0.5 rounded bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 font-medium'
}
- title={`${
- agentOutdated
- ? 'Agent is outdated on this host'
- : 'Agent is up to date'
- }${summary.host.intervalSeconds ? `\nReporting interval: ${summary.host.intervalSeconds}s` : ''}`}
+ title={`${agentOutdated
+ ? 'Agent is outdated on this host'
+ : 'Agent is up to date'
+ }${summary.host.intervalSeconds ? `\nReporting interval: ${summary.host.intervalSeconds}s` : ''}`}
>
v{version()}
diff --git a/frontend-modern/src/components/Settings/UnifiedAgents.tsx b/frontend-modern/src/components/Settings/UnifiedAgents.tsx
index d441092..a2158a7 100644
--- a/frontend-modern/src/components/Settings/UnifiedAgents.tsx
+++ b/frontend-modern/src/components/Settings/UnifiedAgents.tsx
@@ -6,7 +6,7 @@ import { MonitoringAPI } from '@/api/monitoring';
import { SecurityAPI } from '@/api/security';
import { notificationStore } from '@/stores/notifications';
import type { SecurityStatus } from '@/types/config';
-import type { Host, HostLookupResponse, DockerHost } from '@/types/api';
+import type { HostLookupResponse } from '@/types/api';
import type { APITokenRecord } from '@/api/security';
import { HOST_AGENT_SCOPE, DOCKER_REPORT_SCOPE } from '@/constants/apiScopes';
import { copyToClipboard } from '@/utils/clipboard';
@@ -252,8 +252,8 @@ export const UnifiedAgents: Component = () => {
types: ('host' | 'docker')[];
status: string;
version?: string;
- lastSeen?: number | string;
- ip?: string;
+ lastSeen?: number;
+ isLegacy?: boolean;
}>();
// Process Host Agents
@@ -267,7 +267,7 @@ export const UnifiedAgents: Component = () => {
status: h.status || 'unknown',
version: h.agentVersion,
lastSeen: h.lastSeen,
- ip: h.ip
+ isLegacy: h.isLegacy
});
});
@@ -280,7 +280,8 @@ export const UnifiedAgents: Component = () => {
existing.types.push('docker');
}
// Update version/status if newer
- if (!existing.version && d.version) existing.version = d.version;
+ if (!existing.version && d.agentVersion) existing.version = d.agentVersion;
+ if (d.isLegacy) existing.isLegacy = true;
} else {
unified.set(key, {
id: d.id,
@@ -288,8 +289,9 @@ export const UnifiedAgents: Component = () => {
displayName: d.displayName,
types: ['docker'],
status: d.status || 'unknown',
- version: d.version || d.dockerVersion,
+ version: d.agentVersion || d.dockerVersion,
lastSeen: d.lastSeen,
+ isLegacy: d.isLegacy,
});
}
});
@@ -620,8 +622,8 @@ export const UnifiedAgents: Component = () => {
{(type) => (
{type === 'host' ? 'Host' : 'Docker'}
@@ -631,17 +633,22 @@ export const UnifiedAgents: Component = () => {
|
{agent.status}
|
{agent.version || '—'}
+
+
+ Legacy
+
+
|
- {formatRelativeTime(agent.lastSeen)}
+ {agent.lastSeen ? formatRelativeTime(agent.lastSeen) : '—'}
|
|