diff --git a/frontend-modern/src/components/Dashboard/GuestRow.tsx b/frontend-modern/src/components/Dashboard/GuestRow.tsx index 44e17b48d..8c6017d39 100644 --- a/frontend-modern/src/components/Dashboard/GuestRow.tsx +++ b/frontend-modern/src/components/Dashboard/GuestRow.tsx @@ -205,39 +205,27 @@ function NetworkInfoCell(props: { ipAddresses: string[]; networkInterfaces: Netw ); } -// OS detection helper - returns icon type and color based on OS name -type OSType = 'windows' | 'ubuntu' | 'debian' | 'alpine' | 'centos' | 'fedora' | 'arch' | 'nixos' | 'opensuse' | 'gentoo' | 'linux' | 'freebsd' | 'unknown'; +// OS detection helper - simplified to just Linux vs Windows +type OSType = 'windows' | 'linux' | 'unknown'; function detectOSType(osName: string): OSType { const lower = osName.toLowerCase(); if (lower.includes('windows')) return 'windows'; - if (lower.includes('ubuntu')) return 'ubuntu'; - if (lower.includes('debian') || lower.includes('devuan')) return 'debian'; - if (lower.includes('alpine')) return 'alpine'; - if (lower.includes('centos') || lower.includes('rocky') || lower.includes('alma') || lower.includes('rhel') || lower.includes('red hat')) return 'centos'; - if (lower.includes('fedora')) return 'fedora'; - if (lower.includes('arch')) return 'arch'; - if (lower.includes('nixos')) return 'nixos'; - if (lower.includes('opensuse') || lower.includes('suse')) return 'opensuse'; - if (lower.includes('gentoo')) return 'gentoo'; - if (lower.includes('freebsd') || lower.includes('openbsd') || lower.includes('netbsd')) return 'freebsd'; - if (lower.includes('linux') || lower.includes('gnu')) return 'linux'; + // All Linux distros, BSDs, and Unix-likes -> linux + if (lower.includes('linux') || lower.includes('debian') || lower.includes('ubuntu') || + lower.includes('alpine') || lower.includes('centos') || lower.includes('fedora') || + lower.includes('arch') || lower.includes('nixos') || lower.includes('suse') || + lower.includes('gentoo') || lower.includes('rhel') || lower.includes('rocky') || + lower.includes('alma') || lower.includes('devuan') || lower.includes('gnu') || + lower.includes('freebsd') || lower.includes('openbsd') || lower.includes('netbsd')) { + return 'linux'; + } return 'unknown'; } const OS_COLORS: Record = { windows: 'text-blue-500', - ubuntu: 'text-orange-500', - debian: 'text-red-500', - alpine: 'text-blue-400', - centos: 'text-purple-500', - fedora: 'text-blue-600', - arch: 'text-cyan-500', - nixos: 'text-sky-400', - opensuse: 'text-green-500', - gentoo: 'text-violet-400', - linux: 'text-yellow-500', - freebsd: 'text-red-600', + linux: 'text-gray-600 dark:text-gray-400', unknown: 'text-gray-400', }; @@ -270,98 +258,16 @@ function OSInfoCell(props: { osName: string; osVersion: string; agentVersion: st setShowTooltip(false); }; - // SVG icons for different OS types - const OSIcon = () => { + // Simple text labels + const OSLabel = () => { const type = osType(); - const iconClass = `w-3.5 h-3.5 ${colorClass()}`; - switch (type) { case 'windows': - return ( - - - - ); - case 'ubuntu': - return ( - - - - - - - ); - case 'debian': - return ( - - - - ); - case 'alpine': - return ( - - - - ); - case 'centos': - case 'fedora': - return ( - - - - ); - case 'arch': - return ( - - - - ); - case 'nixos': - // Snowflake-like icon for NixOS - return ( - - - - - ); - case 'opensuse': - // Chameleon-inspired icon for openSUSE - return ( - - - - - - ); - case 'gentoo': - // G-like icon for Gentoo - return ( - - - - ); - case 'freebsd': - return ( - - - - - ); + return Windows; case 'linux': - return ( - - - - ); + return Linux; default: - // Generic server/computer icon - return ( - - - - - - ); + return -; } }; @@ -372,7 +278,7 @@ function OSInfoCell(props: { osName: string; osVersion: string; agentVersion: st onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave} > - +