rcourtman
72af7bed5e
style: Apply gofmt to 37 files
...
Standardize code formatting across test files and monitor.go.
No functional changes.
2025-12-02 17:21:48 +00:00
rcourtman
73e5ff0914
Add unit tests for dockeragent runtime detection functions
...
Test coverage for:
- detectRuntime: 11 test cases covering podman/docker detection via
endpoint path, InitBinary, ServerVersion, DriverStatus, SecurityOptions
- buildRuntimeCandidates: 6 test cases verifying candidate ordering,
deduplication, and preference-based filtering
- randomDuration: 5 test cases for boundary conditions and randomness
- determineSelfUpdateArch: validates architecture detection output
Coverage increased from 17.5% to 21.4%.
2025-11-30 08:47:46 +00:00
rcourtman
73e5352812
Add unit tests for extractPodmanMetadata and detectHostRemovedError (dockeragent)
...
- TestExtractPodmanMetadata: 14 test cases covering pod metadata, infra
containers, compose metadata, auto-update settings, user namespace
handling, whitespace trimming, and precedence rules
- TestDetectHostRemovedError: 11 test cases covering JSON parsing,
case-insensitive matching, error code validation, and edge cases
Coverage improved from 11.7% to 14.7% for internal/dockeragent.
2025-11-30 05:03:31 +00:00
rcourtman
cf17d327f1
Add unit tests for dockeragent utility functions
...
Tests for calculateCPUPercent, calculateMemoryUsage, safeFloat,
parseTime, trimLeadingSlash, and summarizeBlockIO. 28 test cases
covering edge cases like zero deltas, cache handling, NaN/Inf,
and case-insensitive op matching.
Coverage improved from 8.0% to 11.7%.
2025-11-29 22:18:10 +00:00
rcourtman
6eb1a10d9b
Refactor: Code cleanup and localStorage consolidation
...
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(-)
2025-11-04 21:50:46 +00:00
rcourtman
68ce8e7520
feat: finalize swarm service monitoring ( #598 )
2025-10-26 09:35:49 +00:00
rcourtman
8e83eaf823
Add container state filtering to Docker agent
2025-10-25 21:40:59 +00:00
rcourtman
f46ff1792b
Fix settings security tab navigation
2025-10-11 23:29:47 +00:00