This commit includes comprehensive codebase cleanup and refactoring: ## Code Cleanup - Remove dead TypeScript code (types/monitoring.ts - 194 lines duplicate) - Remove unused Go functions (GetClusterNodes, MigratePassword, GetClusterHealthInfo) - Clean up commented-out code blocks across multiple files - Remove unused TypeScript exports (helpTextClass, private tag color helpers) - Delete obsolete test files and components ## localStorage Consolidation - Centralize all storage keys into STORAGE_KEYS constant - Update 5 files to use centralized keys: * utils/apiClient.ts (AUTH, LEGACY_TOKEN) * components/Dashboard/Dashboard.tsx (GUEST_METADATA) * components/Docker/DockerHosts.tsx (DOCKER_METADATA) * App.tsx (PLATFORMS_SEEN) * stores/updates.ts (UPDATES) - Benefits: Single source of truth, prevents typos, better maintainability ## Previous Work Committed - Docker monitoring improvements and disk metrics - Security enhancements and setup fixes - API refactoring and cleanup - Documentation updates - Build system improvements ## Testing - All frontend tests pass (29 tests) - All Go tests pass (15 packages) - Production build successful - Zero breaking changes Total: 186 files changed, 5825 insertions(+), 11602 deletions(-)
20 lines
709 B
TypeScript
20 lines
709 B
TypeScript
// Constants used throughout the application
|
|
|
|
// Polling and update intervals (in milliseconds)
|
|
export const POLLING_INTERVALS = {
|
|
DEFAULT: 5000, // 5 seconds - default polling interval
|
|
RECONNECT_BASE: 1000, // 1 second - base reconnect delay
|
|
RECONNECT_MAX: 30000, // 30 seconds - max reconnect delay
|
|
DATA_FLASH: 1000, // 1 second - data update indicator flash duration
|
|
TOAST_DURATION: 5000, // 5 seconds - default toast notification duration
|
|
} as const;
|
|
|
|
// WebSocket configuration
|
|
export const WEBSOCKET = {
|
|
PING_INTERVAL: 25000, // 25 seconds - WebSocket ping interval
|
|
MESSAGE_TYPES: {
|
|
INITIAL_STATE: 'initialState',
|
|
RAW_DATA: 'rawData',
|
|
ERROR: 'error',
|
|
} as const,
|
|
} as const;
|