diff --git a/frontend/src/pages/HostDetail.jsx b/frontend/src/pages/HostDetail.jsx index c45db48..0e2338e 100644 --- a/frontend/src/pages/HostDetail.jsx +++ b/frontend/src/pages/HostDetail.jsx @@ -46,6 +46,7 @@ const HostDetail = () => { const [isEditingFriendlyName, setIsEditingFriendlyName] = useState(false) const [editedFriendlyName, setEditedFriendlyName] = useState('') const [showAllUpdates, setShowAllUpdates] = useState(false) + const [activeTab, setActiveTab] = useState('host') const { data: host, isLoading, error, refetch } = useQuery({ queryKey: ['host', hostId], @@ -180,476 +181,531 @@ const HostDetail = () => { const isStale = new Date() - new Date(host.lastUpdate) > 24 * 60 * 60 * 1000 return ( -
Friendly Name
-System Hostname
-{host.hostname}
-Host Group
- {host.hostGroup ? ( - - {host.hostGroup.name} - - ) : ( - - Ungrouped - - )} -Operating System
-{host.osType} {host.osVersion}
-IP Address
-{host.ip}
-Architecture
-{host.architecture}
-Last Update
-{formatRelativeTime(host.lastUpdate)}
-
- Agent Version
-{host.agentVersion}
-{host.stats.totalPackages}
-Total Packages
-{host.stats.securityUpdates}
-Security Updates
-CPU Model
-{host.cpuModel}
-CPU Cores
-{host.cpuCores}
-RAM Installed
-{host.ramInstalled} GB
-Swap Size
-{host.swapSize} GB
-Size: {disk.size}
- {disk.mountpoint && ( -Mount: {disk.mountpoint}
- )} -Gateway IP
-{host.gatewayIp}
-DNS Servers
-{dns}
- ))} -Network Interfaces
-{iface.name}
- ))} -Kernel Version
-{host.kernelVersion}
-SELinux Status
- - {host.selinuxStatus} - -System Uptime
-{host.systemUptime}
-Load Average
-- {host.loadAverage.map((load, index) => ( - - {load.toFixed(2)} - {index < host.loadAverage.length - 1 && ', '} - - ))} -
-| - Status - | -- Date - | -- Packages - | -- Security - | -
|---|---|---|---|
|
-
-
-
- {update.status === 'success' ? 'Success' : 'Failed'}
-
-
- |
- - {formatDate(update.timestamp)} - | -- {update.packagesCount} - | -
- {update.securityCount > 0 ? (
-
-
- ) : (
- -
- )}
- |
-
{host.stats.totalPackages}
+Total Packages
+{host.stats.outdatedPackages}
+Outdated Packages
+{host.stats.securityUpdates}
+Security Updates
+