refactor(tests): Enhance DNS testing functionality and streamline component structure
refactor(ui): Improve loading states and descriptions in service and app detail dialogs
- Replaced all polling with Server-Sent Events (SSE) for real-time updates
- Created unified global SSE endpoint at /api/v1/events
- Implemented SSE broadcasting for operations, central status, and dnsmasq events
- Added SSE manager with wildcard subscription support for global events
- Created useGlobalSSE hook with singleton connection management
- Updated all frontend hooks to use SSE instead of polling:
- useApps: SSE for app deployments and status
- useSetupStatus: SSE for setup operations
- useNodes: SSE for node management
- useDnsmasq: SSE for DNS configuration
- useCentralStatus: SSE for central daemon status
- useServices: SSE for service management
- useOperations: SSE for long-running operations
- Fixed CORS configuration for wild-central.lan access
- Fixed SSE connection loop issues with proper state management
- Added client-side event filtering for instance-specific updates
- Increased React Query staleTime since SSE provides real-time updates
- Added proper cleanup and reconnection logic with timeouts
This eliminates all polling overhead and provides instant UI updates
when cluster state changes occur.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
The CPU percentage was showing incorrect values (e.g., 10,000% instead of 10%)
because the parseResourceQuantity function wasn't properly converting CPU cores
to millicores. CPU values specified as whole numbers (e.g., "1" for 1 core) were
being treated as 1 millicore instead of 1000 millicores.
Split parseResourceQuantity into separate parseCPUQuantity and parseMemoryQuantity
functions to properly handle the different unit conversions:
- CPU values without "m" suffix are now converted from cores to millicores (×1000)
- CPU values with "m" suffix remain in millicores
- Memory parsing remains unchanged
This ensures consistent millicore units for accurate percentage calculations.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>