From 35695891c44aa2321cd0c2c4b62a1aeb80ebe082 Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Wed, 20 Aug 2025 15:33:24 +0000 Subject: [PATCH] improve: make quick tip dismissible in alerts tab - Add dismissible X button to the Quick Tip in Alerts overview - Persist dismissed state in localStorage - Tip can be dismissed and won't show again on page refresh --- frontend-modern/src/pages/Alerts.tsx | 75 ++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 21 deletions(-) diff --git a/frontend-modern/src/pages/Alerts.tsx b/frontend-modern/src/pages/Alerts.tsx index a876eaf0c..66c706299 100644 --- a/frontend-modern/src/pages/Alerts.tsx +++ b/frontend-modern/src/pages/Alerts.tsx @@ -90,6 +90,16 @@ export function Alerts() { const [activeTab, setActiveTab] = createSignal('overview'); const [hasUnsavedChanges, setHasUnsavedChanges] = createSignal(false); + // Quick tip visibility state + const [showQuickTip, setShowQuickTip] = createSignal( + localStorage.getItem('hideAlertsQuickTip') !== 'true' + ); + + const dismissQuickTip = () => { + setShowQuickTip(false); + localStorage.setItem('hideAlertsQuickTip', 'true'); + }; + // Store references to child component data let destinationsRef: DestinationsRef = {}; let scheduleRef: ScheduleRef = {}; @@ -547,7 +557,12 @@ export function Alerts() { {/* Tab Content */}
- + @@ -609,7 +624,12 @@ export function Alerts() { } // Overview Tab - Shows current alert status -function OverviewTab(props: { overrides: Override[]; activeAlerts: Record }) { +function OverviewTab(props: { + overrides: Override[]; + activeAlerts: Record; + showQuickTip: () => boolean; + dismissQuickTip: () => void; +}) { // Loading states for buttons const [processingAlerts, setProcessingAlerts] = createSignal>(new Set()); @@ -690,27 +710,40 @@ function OverviewTab(props: { overrides: Override[]; activeAlerts: Record {/* Proxmox Tags Help */} -
-
- - - -
-

💡 Quick Tip: Control alerts directly in Proxmox!

-

- Add these tags to any VM/CT in Proxmox to control alert behavior without navigating to Pulse: -

-
    -
  • pulse-no-alerts - Completely silent - no alerts in UI or notifications
  • -
  • pulse-monitor-only - Shows alerts in UI but won't email/page you
  • -
  • pulse-relaxed - Use higher thresholds (95% CPU/RAM, 98% disk)
  • -
-

- Perfect for dev VMs, services that run hot (TrueNAS, databases), or temporary maintenance windows. -

+ +
+
+ + + +
+
+

💡 Quick Tip: Control alerts directly in Proxmox!

+ +
+

+ Add these tags to any VM/CT in Proxmox to control alert behavior without navigating to Pulse: +

+
    +
  • pulse-no-alerts - Completely silent - no alerts in UI or notifications
  • +
  • pulse-monitor-only - Shows alerts in UI but won't email/page you
  • +
  • pulse-relaxed - Use higher thresholds (95% CPU/RAM, 98% disk)
  • +
+

+ Perfect for dev VMs, services that run hot (TrueNAS, databases), or temporary maintenance windows. +

+
-
+ {/* Recent Alerts */}