Commit Graph

1291 Commits

Author SHA1 Message Date
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
rcourtman 6a71a3dda1 Fix activeAlerts undefined error in Docker route
Create DockerRoute component that properly accesses activeAlerts from
WebSocketContext instead of trying to use a non-existent signal.

The issue was that activeAlerts is provided by useWebSocket() as a
Record<string, Alert> store, not available directly in App component
scope. Dashboard and other components use useWebSocket() hook to access
it properly.

Changes:
- Add DockerRoute wrapper component that uses WebSocketContext
- Extract activeAlerts from wsContext along with state
- Pass activeAlerts Record to DockerHosts component correctly
2025-10-08 08:59:42 +00:00
rcourtman 60486b3842 Fix undefined error in Docker alert highlighting
Add null-safety checks and default values to prevent 'Cannot read
properties of undefined' error when accessing alertStyles.

Changes:
- Add comprehensive defaultAlertStyles object with all required properties
- Wrap getAlertStyles call in try-catch with fallback to defaults
- Add optional chaining (?.) when accessing alertStyles properties
- Extract severity to variable before use to avoid repeated null checks
2025-10-08 08:56:28 +00:00
rcourtman 1a501be435 Add alert border highlighting to Docker container rows
Match the visual alert highlighting used in the Proxmox guest table
(GuestRow) for Docker containers. When a Docker container has an active
unacknowledged alert, the row now displays:
- Colored background (red for critical, yellow for warning)
- 4px colored left border (inset box-shadow)
- Matching severity-based styling

Changes:
- Import getAlertStyles utility and Alert type in DockerHosts component
- Add activeAlerts prop to DockerHostsProps interface
- Add alert styling logic to DockerContainerRow (showAlertHighlight,
  alertAccentColor, rowStyle with box-shadow)
- Pass activeAlerts from App.tsx to DockerHosts component
- Thread activeAlerts prop through to all DockerContainerRow instances
2025-10-08 08:54:47 +00:00
rcourtman df7bc21caf Improve alert duration tracking and add time threshold UI
This commit addresses issues reported in #470 related to alert duration
tracking, time threshold configuration, and email notification debugging.

Backend Changes:
- Preserve alert StartTime in preserveAlertState() to maintain accurate
  duration calculations across monitoring cycles
- Add debug logging to track alert creation times and duration preservation
- Add comprehensive logging to notification pipeline for email delivery
  tracking including SMTP config, cooldown status, and delivery attempts

Frontend Changes:
- Add TimeThresholdSettings component to display and configure per-resource-type
  alert delays (VMs/Containers, Nodes, Storage, PBS)
- Integrate time threshold UI into Thresholds tab with clear labels explaining
  "seconds above threshold before triggering"
- Add informational help text about how alert delays work

Related to #470
2025-10-08 08:51:02 +00:00
rcourtman a4569875b8 Fix temperature collection for cluster nodes and FQDNs
Issues fixed:
- Temperature collection was using node name instead of actual hostname/IP
- SSH warnings were contaminating JSON output from sensors command
- ClusterEndpoint IPs were not being utilized for SSH connections

Changes:
1. Use ClusterEndpoint IP/Host for cluster nodes instead of node name
2. Use Host URL from config for standalone nodes
3. Fallback to node name for simple DNS/hosts setups
4. Use cmd.Output() instead of cmd.CombinedOutput() to avoid SSH stderr warnings

This resolves issue #101 where users with FQDNs (e.g., pve2.some.domain)
couldn't collect temperatures, and handles duplicate node names across
multiple Proxmox instances.
2025-10-08 08:36:58 +00:00
rcourtman 104b163ac7 Add UI toggle for physical disk monitoring to prevent HDD spin-up
Physical disk monitoring is now disabled by default with a clear UI toggle for users who want to enable it.

**The Problem:**
Pulse was polling `/nodes/{node}/disks/list` every 10 seconds to check physical disk SMART data, causing idle HDDs to constantly spin up.

**The Solution:**
- Physical disk monitoring OFF by default (no HDD spin-up)
- New UI toggle in node edit modal under "Advanced monitoring"
- Clear warning: "This will cause HDDs to spin up from standby"
- When enabled, polls every 5 minutes (configurable via PhysicalDiskPollingMinutes)
- Storage pool monitoring (ZFS/LVM) still active and catches most disk failures

**UI Implementation:**
- Added monitorPhysicalDisks checkbox to PVE node settings
- Help text explains HDD spin-up behavior
- Field properly saved/loaded when editing nodes
- Only shown for PVE nodes (not PBS)

**Backend:**
- MonitorPhysicalDisks defaults to false
- Configurable polling interval (default 5 min)
- Interval-based polling with per-instance tracking
- Skips polls when interval hasn't elapsed

Users can now make an informed choice about disk monitoring vs. HDD power management.

Fixes #514
2025-10-08 08:16:43 +00:00
rcourtman e6bbd384a7 Fix critical alert system issues: cooldown, cleanup, and pending alerts
**Issues Fixed:**

1. **Cooldown period not enforced** - Added LastNotified tracking and shouldNotifyAfterCooldown()
   - New alerts are notified immediately and LastNotified is set
   - Existing alerts re-notify only after cooldown period passes
   - Critical escalations bypass cooldown for immediate notification
   - Cooldown check respects quiet hours configuration

2. **No re-notification for existing alerts** - Alert updates now check cooldown
   - Alerts stuck above threshold now re-notify after cooldown expires
   - Level escalation to critical triggers immediate re-notification
   - Prevents alert fatigue while ensuring critical issues aren't missed

3. **alertRateLimit memory leak** - Added cleanup in Cleanup() method
   - Entries older than 1 hour are removed every 10 minutes
   - Empty entries are deleted entirely to prevent map growth
   - Prevents unbounded memory consumption

4. **Pending alerts not cleared on threshold disable** - Fixed in reevaluateActiveAlertsLocked()
   - When threshold is disabled/removed, pending alerts are now cleared
   - Prevents phantom pending state for disabled metrics
   - Logged for debugging

**Implementation Details:**
- Added LastNotified field to Alert struct with proper cloning
- Cooldown enforced separately from rate limiting (MaxAlertsHour)
- Quiet hours verified working correctly (non-critical only)
- All changes maintain thread safety with existing mutex patterns
2025-10-07 21:40:43 +00:00
rcourtman 05eaa1f2c6 Remove redundant header from thresholds table
- Parent tab already has 'Alert Thresholds' title and description
- Avoid repeating the same messaging twice
2025-10-07 21:33:49 +00:00
rcourtman 281718fb10 Add page header to thresholds tab for better visual hierarchy
- Add title 'Alert thresholds' with description
- Matches layout pattern from schedule tab
- Improves page structure and user understanding
2025-10-07 21:32:45 +00:00
rcourtman 9fa191b575 Remove color override props from Toggle component
- Remove checkedClass, uncheckedClass, disabledClass, and knobClass props
- Make toggle colors consistent and non-overridable across the entire app
- Prevents inconsistent styling from prop overrides
- Enforces single source of truth for toggle appearance
- Breaking change but no usage found in codebase
2025-10-07 21:29:14 +00:00
rcourtman 427b0b8345 Remove all red/green toggle color overrides in resource tables
- Remove checkedClass/uncheckedClass overrides from all resource row toggles
- Remove custom disabledClass overrides to use consistent defaults
- All toggles now use the improved blue/gray color scheme from TogglePrimitive
- Ensures consistent toggle styling across all table rows
2025-10-07 21:27:33 +00:00
rcourtman c2f7ccf332 Improve global defaults row styling in threshold tables
- Change background from bright blue to subtle gray for less visual weight
- Use standard border instead of thick blue border-b-2
- Remove custom red/green toggle colors to use default blue/gray
- Update label from bold blue to semibold gray for consistency
- Increase input text size from text-xs to text-sm for readability
- Add proper focus states with blue ring on inputs
- Add explicit text color for better contrast
2025-10-07 21:26:01 +00:00
rcourtman eac39daba9 Extract StatusBadge component to eliminate duplicate code
- Create shared StatusBadge component with consistent styling
- Replace inline badge implementations in ResourceTable with shared component
- Update badge colors: blue for enabled (not green), gray for disabled (not red)
- Change from rounded-full to rounded-md for more refined appearance
- Remove borders and reduce font weight for cleaner look
- Reduces ~60 lines of duplicate code
2025-10-07 20:53:08 +00:00
rcourtman 6ed1bddf93 Improve alerts schedule page layout and iOS toggle styling
- Add header with title and description to schedule tab for better context
- Improve reset button styling with larger text, proper shadow, and better placement
- Change grid breakpoint from lg to xl for better spacing
- Fix iOS toggle to use proper blue/gray colors instead of red/green
- Improve toggle knob positioning using padding instead of absolute positioning
- Add proper shadow and smooth animations to toggle
- Remove borders from toggle for cleaner iOS appearance
2025-10-07 20:48:37 +00:00
rcourtman b80c0428c9 Add alert count badge to Alerts tab with green checkmark
- Show red badge with count of unacknowledged alerts on Alerts tab
- Display green checkmark when no unacknowledged alerts exist
- Sync activeAlerts array to state for reactive badge updates
- Filter badge count to only show unacknowledged alerts

The badge provides immediate visibility of pending alerts without
needing to navigate to the Alerts page.
2025-10-07 20:42:21 +00:00
rcourtman 56e38f1463 Add active alert count badge to Alerts tab
Display the number of active alerts in a red badge on the Alerts tab to give
users immediate visibility of pending issues without needing to navigate to
the Alerts page.
2025-10-07 20:32:28 +00:00
rcourtman 52edbd4e78 Fix Docker alert cleanup and email provider UI
- Add HandleDockerHostRemoved to properly clean up all alerts and tracking
  when Docker hosts are removed from config
- Implement pruneStaleDockerAlerts to automatically clear orphaned Docker
  alerts during sync cycles
- Clean up restart tracking and exit code maps in addition to state confirmations
- Add comprehensive test coverage for Docker host removal cleanup
- Improve email provider select layout with consistent styling and instruction boxes
- Fix RemoveDockerHost to handle missing hosts gracefully and still clear alerts
2025-10-07 20:31:00 +00:00
rcourtman e12f9cd29a Expose docker global thresholds inline 2025-10-07 20:07:02 +00:00
rcourtman 4d6ea7c48a Unify Docker thresholds with platform tables 2025-10-07 20:02:06 +00:00
rcourtman 21d756ab1b Align Docker thresholds layout 2025-10-07 19:53:43 +00:00
rcourtman ff1ceb99ee Refine alerts thresholds layout 2025-10-07 19:46:54 +00:00
rcourtman a78b9a6d78 Tighten header tab layout 2025-10-07 18:57:06 +00:00
rcourtman c8c9108a93 Adjust header tab separation 2025-10-07 18:28:39 +00:00
rcourtman a1c9545260 Refine navigation styling and table alignment 2025-10-07 18:19:05 +00:00
rcourtman dcc82031b9 Simplify tab bar grouping layout 2025-10-07 17:07:46 +00:00
rcourtman f2c87701b8 Declutter alerts tabs by relying on banner context 2025-10-07 17:02:35 +00:00