Commit Graph

1317 Commits

Author SHA1 Message Date
rcourtman df2aae0246 feat: add UpdatePlan and history types to frontend API
Add TypeScript interfaces and API methods for new update system:

**New Types:**
- UpdatePlan: Deployment-specific update plan with canAutoUpdate flag
- UpdateHistoryEntry: Complete audit log entry with all metadata

**New API Methods:**
- getUpdatePlan(version, channel?) - Get deployment-specific update plan
- getUpdateHistory(limit?, status?) - List update history with filters
- getUpdateHistoryEntry(eventId) - Get specific history entry details

These types match the backend Go structs and enable frontend
integration with the adapter-based update system.

Next: Implement UI components (confirmation modal, progress modal,
update banner enhancements, settings history panel).
2025-10-10 15:45:12 +00:00
rcourtman 5294ed8e4e feat: integrate update system with API endpoints
Wire up the adapter-based update system to HTTP API:

**Enhanced UpdateHandlers:**
- Initialize UpdateHistory and UpdaterRegistry
- Register all deployment adapters (systemd, proxmoxve, docker, aur)
- Handlers now have access to history and updater registry

**New API Endpoints:**
- GET /api/updates/plan?version=X - Get update plan for deployment
  * Returns canAutoUpdate, instructions, prerequisites, estimated time
  * Deployment-specific based on detected type
- GET /api/updates/history?limit=N&status=X - List update history
  * Supports filtering by status (success/failed/in_progress)
  * Returns audit log entries with full metadata
- GET /api/updates/history/entry?id=X - Get specific history entry
  * Retrieve detailed information about past update

**Existing Endpoints Still Work:**
- GET /api/updates/check - Check for available updates
- POST /api/updates/apply - Apply update (legacy manager)
- GET /api/updates/status - Get current update status

The system now supports both:
- Legacy update flow (existing install.sh wrapper in manager.go)
- New adapter-based flow (prepared for frontend integration)

Next: Frontend components to consume new endpoints.
2025-10-10 15:42:21 +00:00
rcourtman 2408d8004c feat: add update system foundation with adapter pattern
Add infrastructure for deployment-agnostic update management:

**Update History (Audit Log):**
- JSONL-based audit log (/var/lib/pulse/update-history.jsonl)
- Tracks all update attempts with full metadata
- In-memory cache for fast queries
- Schema designed for future DB migration

**Updater Interface:**
- Defines contract for deployment-specific update logic
- SupportsApply(), PrepareUpdate(), Execute(), Rollback()
- Registry pattern for managing multiple adapters
- Progress callbacks for real-time UI updates

**Adapters Implemented:**
- InstallShAdapter: Wraps install.sh (systemd/LXC)
  * Full automation support
  * Captures stdout/stderr to log files
  * Parses backup paths from output
  * Maintains install.sh as single source of truth
- DockerUpdater: Instruction-only (manual)
- AURUpdater: Instruction-only (package manager)

Key design decisions:
- install.sh remains unchanged (backward compatible)
- All update mechanisms funnel through adapters
- Audit log records all updates (manual + automated)
- Thin wrapper approach - no logic duplication

Next: Wire up API endpoints and frontend integration.
2025-10-10 15:39:47 +00:00
rcourtman fb21f4c909 feat: add version-aware update notifications for RC releases
Implement smart update checking that shows appropriate updates based on user's current version:
- RC users now see both newer RC releases AND newer stable releases
- Stable users continue to see only stable releases (RCs filtered out)
- Both channels use version-aware filtering (only show updates > current version)

Key changes:
- Modified getLatestReleaseForChannel to accept currentVer parameter
- Removed /releases/latest shortcut; both channels now fetch all releases
- RC channel tracks both newest RC and newest stable, returns highest
- Stable channel filters prereleases and returns first stable > currentVer
- Added comprehensive test suite with 15 test cases

Respects semver ordering where 4.22.0 > 4.22.0-rc.3 per RFC.

Consulted with Codex for architectural direction.
2025-10-10 15:20:34 +00:00
rcourtman 3d048ee7ba refactor: remove PMG content from Overview page to maintain PVE focus
Remove PMG instances from the Overview (dashboard) page to keep it
focused solely on PVE resources (VMs and containers). This provides
better separation of concerns, with each Proxmox product type having
its dedicated view:
- Overview tab: PVE nodes, VMs, and containers
- Mail Gateway tab: PMG instances with detailed metrics
- Storage tab: Storage resources
- Backups tab: PBS and backup data

Changes:
- Remove pmgInstances prop from NodeSummaryTable component
- Remove PMG type checks and rendering logic from node table
- Update UnifiedNodeSelector to match new interface
- Clean up PMG-related imports and type definitions
2025-10-10 15:12:03 +00:00
rcourtman 30fa3fd810 feat: add complete Proxmox Mail Gateway (PMG) monitoring support
Add comprehensive PMG monitoring with mail statistics, queue depth tracking,
spam distribution analysis, and quarantine monitoring. Includes full discovery
support and UI consistency improvements across all Proxmox products.

Backend:
- Add pkg/pmg package with complete API client for PMG operations
- Implement mail statistics collection (inbound/outbound, spam, virus, bounces)
- Add queue depth monitoring (active, deferred, hold, incoming queues)
- Support spam score distribution and quarantine totals
- Add PMG-specific discovery logic to differentiate from PVE on port 8006
- Extend mock data generator with realistic PMG instances and metrics
- Add PMG node configuration support in config system

Frontend:
- Create MailGateway.tsx component with detailed PMG dashboard
- Display mail flow statistics with time-series charts
- Show queue depth with color-coded warnings (>50 messages or >30min age)
- Add spam distribution histogram and quarantine status
- Support cluster node status with individual queue monitoring
- Add PMG to network discovery with purple branding and mail icon
- Implement conditional navigation (hide PMG tab when no instances configured)
- Standardize discovery UI controls across PVE/PBS/PMG settings pages

API:
- Add /api/config/pmg endpoints for node configuration
- Support PMG-specific monitoring toggles (mail stats, queues, quarantine)
- Extend system settings with PMG configuration options

Discovery:
- Detect PMG vs PVE on shared port 8006 using /api2/json/statistics/mail endpoint
- Return 'pmg' type for mail gateway servers in discovery results
- Update DiscoveryModal to display PMG servers with appropriate styling

This completes ecosystem monitoring support for all three Proxmox products:
Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
2025-10-10 14:30:51 +00:00
rcourtman 7ab425b07a Publish docker agent image via GHCR workflow 2025-10-10 07:44:34 +00:00
rcourtman ba023f46aa fix: remove unused formatDelayLabel function 2025-10-09 23:25:27 +00:00
rcourtman ba7a1df8aa chore: bump version to v4.22.0-rc.3 2025-10-09 23:24:03 +00:00
rcourtman 8464fba095 feat: improve alert delay UI with collapsible row and better UX
- Add collapsible toggle for alert delay settings row to reduce visual clutter
- Match delay input styling to global threshold inputs (w-16, text-sm)
- Auto-clear delay override when value matches default to avoid confusion
- Remove unnecessary clear button - users can clear by emptying the field
- Simplify placeholder from "5s" to "5" for clarity
2025-10-09 23:20:25 +00:00
rcourtman 7427a75117 feat: support standard Authorization header for API authentication
Add support for Authorization: Bearer <token> header as a fallback
for environments that strip custom headers like X-API-Token. Docker
agent now sends both headers for maximum compatibility.
2025-10-09 23:03:46 +00:00
rcourtman 95f99767e5 Surface shared storage on all nodes refs #522 2025-10-09 22:55:27 +00:00
rcourtman be0660a6ff Restore disk usage rendering for inactive guests refs #520 #522 2025-10-09 22:47:18 +00:00
rcourtman 53012f73ca Improve snapshot polling resiliency 2025-10-09 22:13:06 +00:00
rcourtman 6e3c77b609 fix: properly fix test and remove unused variables
- Bypass UpdateConfig in test to allow TimeThreshold=0
- Remove unused helper functions and variables completely
2025-10-09 16:20:56 +00:00
rcourtman 75ac4d6699 fix: resolve test failures and unused variables
- Fix TestAcknowledgePersistsThroughCheckMetric by setting TimeThreshold to 0
- Prefix unused variables with underscore in ThresholdsTable.tsx
2025-10-09 16:18:45 +00:00
rcourtman 44f52b5718 chore: bump version to v4.22.0-rc.2 2025-10-09 16:16:10 +00:00
rcourtman 667590519a feat: add per-metric alert delay configuration
Add sophisticated alert delay system with per-metric overrides:
- Global delay defaults per resource type (guest/node/storage/pbs)
- Per-metric delay overrides with UI controls
- Dynamic tooltips showing effective delay values
- Clear buttons to reset metric-specific overrides
- Temperature threshold defaults for nodes (80°C/75°C)
- Improved delay configuration persistence and normalization
2025-10-09 16:14:39 +00:00
rcourtman 42f20c5a77 Refine dashboard width handling 2025-10-09 11:47:21 +00:00
rcourtman 7c219e523f Fix TypeScript type errors in ThresholdsTable 2025-10-09 11:28:01 +00:00
rcourtman 30364a56cb Improve alert type safety and add docker container global toggle
- Add explicit typing for threshold records to handle undefined values
- Add temperature and docker threshold support to alert types
- Implement global toggle to disable all docker container alerts
- Add test coverage for docker container toggle behavior
- Add concurrency test for multi-instance node updates
2025-10-09 11:23:25 +00:00
rcourtman 7fdc849f99 Keep resource toggles in sync with global alert switch 2025-10-09 11:21:15 +00:00
rcourtman 5758f1e016 Improve alert notification routing and frontend alert visuals 2025-10-09 10:58:53 +00:00
rcourtman db24633c9e chore: bump version to v4.22.0 2025-10-09 08:21:32 +00:00
rcourtman 0b796ba32b Fix Proxmox memory usage accounting 2025-10-09 08:07:11 +00:00
rcourtman c1a4dc4095 Define print_warn helper in installer 2025-10-09 07:52:06 +00:00
rcourtman b72960ccce Update README messaging for Docker support 2025-10-08 21:54:16 +00:00
rcourtman 3242d3d529 Fix dashboard disk sorting and resolve lint warnings 2025-10-08 21:52:17 +00:00
rcourtman b674e88664 Wire global offline alert toggles 2025-10-08 18:56:07 +00:00
rcourtman 3f82b6a473 Include OIDC in exports and refresh guest metadata 2025-10-08 18:14:24 +00:00
rcourtman 6ac5c6ea73 refactor: improve acknowledged alert visual styling
- Replace "Ack" badges with subtle border indicators
- Add gray border highlight for acknowledged-only alerts
- Apply consistent styling across node cards, guest rows, and Docker containers
- Improve visual hierarchy by using borders instead of labels
2025-10-08 17:50:44 +00:00
rcourtman 4adab377b9 feat: prefill docker agent quick install token 2025-10-08 17:34:52 +00:00
rcourtman 8584ff7454 chore: update docker client to v28 2025-10-08 17:24:01 +00:00
rcourtman bf1e1ecaff chore: prepare v4.22.0-rc.1 2025-10-08 16:52:06 +00:00
rcourtman 4f69608b72 docs: align guides with current backend 2025-10-08 15:53:35 +00:00
rcourtman ba4500a022 tweak node display naming 2025-10-08 15:17:00 +00:00
rcourtman d053fef8fc frontend: remove list view status column 2025-10-08 14:08:26 +00:00
rcourtman 4b38ee1039 frontend: fix list view parent node detection 2025-10-08 13:59:43 +00:00
rcourtman 226796e859 frontend: show guest status in list view 2025-10-08 13:51:32 +00:00
rcourtman 127922fa23 installer: auto-detect latest debian template 2025-10-08 13:43:05 +00:00
rcourtman e22685b23d docs: document installing previous releases 2025-10-08 13:33:05 +00:00
rcourtman 0e002d7c2f installer: include openvswitch bridges in detection 2025-10-08 13:28:58 +00:00
rcourtman dcff5d7a67 docs: update docker compose guidance 2025-10-08 13:13:34 +00:00
rcourtman 76741cf921 Normalize websocket forwarded proto handling 2025-10-08 13:04:12 +00:00
rcourtman ae4189d016 Refine alert delay configuration UX 2025-10-08 12:56:44 +00:00
rcourtman 9b4a740626 Add per-resource powered-off alert severity control
Implement tri-state offline alert configuration (Off/Warning/Critical) for VMs, containers, and Docker containers with individual severity overrides and visual badge breakdown in alerts tab.

Changes:
- Add poweredOffSeverity field to resource models and override types
- Implement tri-state buttons (Off/Warn/Crit) in ResourceTable
- Add separate critical/warning badge counts in alerts tab
- Support per-resource severity overrides with proper defaults
- Include alert delay configuration column in thresholds table
- Update backend to honor per-resource severity levels
- Add proper state persistence in raw override config
2025-10-08 12:00:05 +00:00
rcourtman 307268353a Fix Docker tab state initialization 2025-10-08 09:52:59 +00:00
rcourtman ee75d5194f Fix Store to plain object conversion for activeAlerts
activeAlerts from websocket store is a SolidJS Store proxy, not a plain
Record. Spread it to plain object before passing to getAlertStyles to
prevent 't is not a function' error.
2025-10-08 09:07:06 +00:00
rcourtman 4405bdd344 Add null-safety for dockerHosts in DockerRoute
Prevent 'Cannot read properties of undefined (reading length)' by
ensuring dockerHosts defaults to empty array if undefined.
2025-10-08 09:05:21 +00:00
rcourtman 75fdf4441e Add null-safety check for groupedContainers in Docker component
Fix 'Cannot read properties of undefined (reading some)' error by
adding safety check before calling .some() on groupedContainers.

The error occurred when groupedContainers() returned undefined in edge
cases, causing .some() to fail. Now explicitly checking for truthy
value and non-empty array before calling .some().
2025-10-08 09:03:50 +00:00