diff --git a/frontend-modern/src/components/AI/AIChat.tsx b/frontend-modern/src/components/AI/AIChat.tsx index 77f76a9..19aa563 100644 --- a/frontend-modern/src/components/AI/AIChat.tsx +++ b/frontend-modern/src/components/AI/AIChat.tsx @@ -253,7 +253,7 @@ export const AIChat: Component = (props) => { await AIAPI.updateSettings({ autonomous_mode: newValue }); setAutonomousMode(newValue); notificationStore.success(newValue ? 'Autonomous mode enabled' : 'Autonomous mode disabled'); - } catch (e) { + } catch (_e) { notificationStore.error('Failed to toggle autonomous mode'); } finally { setIsTogglingAutonomous(false); diff --git a/frontend-modern/src/components/Alerts/Thresholds/components/GlobalDefaultsRow.tsx b/frontend-modern/src/components/Alerts/Thresholds/components/GlobalDefaultsRow.tsx index 38b6429..93b8575 100644 --- a/frontend-modern/src/components/Alerts/Thresholds/components/GlobalDefaultsRow.tsx +++ b/frontend-modern/src/components/Alerts/Thresholds/components/GlobalDefaultsRow.tsx @@ -5,7 +5,7 @@ * Shows at the top of each section with editable threshold badges. */ -import { Component, Show, For, createSignal, createEffect, createMemo } from 'solid-js'; +import { Component, Show, For, createSignal, createMemo } from 'solid-js'; import Settings from 'lucide-solid/icons/settings'; import RotateCcw from 'lucide-solid/icons/rotate-ccw'; import Check from 'lucide-solid/icons/check'; diff --git a/frontend-modern/src/components/Alerts/Thresholds/components/ResourceCard.tsx b/frontend-modern/src/components/Alerts/Thresholds/components/ResourceCard.tsx index 63f05bc..d88e767 100644 --- a/frontend-modern/src/components/Alerts/Thresholds/components/ResourceCard.tsx +++ b/frontend-modern/src/components/Alerts/Thresholds/components/ResourceCard.tsx @@ -5,7 +5,7 @@ * Replaces wide table rows with a compact, mobile-friendly design. */ -import { Component, Show, For, createSignal, createMemo, JSX } from 'solid-js'; +import { Component, Show, For, createSignal, createMemo } from 'solid-js'; import ChevronDown from 'lucide-solid/icons/chevron-down'; import ChevronUp from 'lucide-solid/icons/chevron-up'; import Settings from 'lucide-solid/icons/settings'; @@ -14,7 +14,7 @@ import Check from 'lucide-solid/icons/check'; import X from 'lucide-solid/icons/x'; import Bell from 'lucide-solid/icons/bell'; import BellOff from 'lucide-solid/icons/bell-off'; -import Power from 'lucide-solid/icons/power'; + import ExternalLink from 'lucide-solid/icons/external-link'; import StickyNote from 'lucide-solid/icons/sticky-note'; import { ThresholdBadge, ThresholdBadgeGroup } from './ThresholdBadge'; @@ -189,7 +189,9 @@ export const ResourceCard: Component = (props) => { {/* Has note indicator */} - + + + {/* Disabled badge */} diff --git a/frontend-modern/src/components/Alerts/Thresholds/components/ThresholdBadge.tsx b/frontend-modern/src/components/Alerts/Thresholds/components/ThresholdBadge.tsx index e96a31c..a3b1af4 100644 --- a/frontend-modern/src/components/Alerts/Thresholds/components/ThresholdBadge.tsx +++ b/frontend-modern/src/components/Alerts/Thresholds/components/ThresholdBadge.tsx @@ -69,15 +69,6 @@ const formatDisplayValue = (metric: string, value: number | undefined): string = return String(value); }; -/** - * Get the unit suffix for a metric - */ -const getUnitSuffix = (metric: string): string => { - if (['cpu', 'memory', 'disk', 'usage'].includes(metric)) return '%'; - if (metric === 'temperature') return '°C'; - if (['diskRead', 'diskWrite', 'networkIn', 'networkOut'].includes(metric)) return ' MB/s'; - return ''; -}; /** * Get readable label for a metric diff --git a/frontend-modern/src/components/Alerts/Thresholds/hooks/useCollapsedSections.ts b/frontend-modern/src/components/Alerts/Thresholds/hooks/useCollapsedSections.ts index ac7a0f8..9e28f93 100644 --- a/frontend-modern/src/components/Alerts/Thresholds/hooks/useCollapsedSections.ts +++ b/frontend-modern/src/components/Alerts/Thresholds/hooks/useCollapsedSections.ts @@ -5,7 +5,7 @@ * Provides a clean interface for toggling sections and remembering user preferences. */ -import { createSignal, createEffect, onMount } from 'solid-js'; +import { createSignal, createEffect } from 'solid-js'; const STORAGE_KEY = 'pulse-thresholds-collapsed-sections'; diff --git a/frontend-modern/src/components/Alerts/Thresholds/sections/CollapsibleSection.tsx b/frontend-modern/src/components/Alerts/Thresholds/sections/CollapsibleSection.tsx index 1e77e58..dd6edb9 100644 --- a/frontend-modern/src/components/Alerts/Thresholds/sections/CollapsibleSection.tsx +++ b/frontend-modern/src/components/Alerts/Thresholds/sections/CollapsibleSection.tsx @@ -8,7 +8,7 @@ import { Component, Show, createSignal, createEffect, JSX } from 'solid-js'; import ChevronRight from 'lucide-solid/icons/chevron-right'; import ChevronDown from 'lucide-solid/icons/chevron-down'; -import Settings from 'lucide-solid/icons/settings'; + export interface CollapsibleSectionProps { /** Unique identifier for the section */ diff --git a/frontend-modern/src/components/Alerts/Thresholds/types.ts b/frontend-modern/src/components/Alerts/Thresholds/types.ts index c37d7fc..959e1fc 100644 --- a/frontend-modern/src/components/Alerts/Thresholds/types.ts +++ b/frontend-modern/src/components/Alerts/Thresholds/types.ts @@ -6,7 +6,7 @@ */ import type { Alert } from '@/types/api'; -import type { RawOverrideConfig, PMGThresholdDefaults, SnapshotAlertConfig, BackupAlertConfig } from '@/types/alerts'; +// Alert types imported from shared alert types // ============================================================================ // Resource Types @@ -182,7 +182,16 @@ export interface EditingActions { /** * Default threshold configuration for guests */ -export interface GuestDefaults extends ThresholdValues { +export interface GuestDefaults { + cpu?: number; + memory?: number; + disk?: number; + diskRead?: number; + diskWrite?: number; + networkIn?: number; + networkOut?: number; + temperature?: number; + usage?: number; disableConnectivity?: boolean; poweredOffSeverity?: 'warning' | 'critical'; }