Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix: resolve all frontend lint errors for unused imports and type issues

rcourtmanf09e427c18aa
diff --git a/frontend-modern/src/components/AI/AIChat.tsx b/frontend-modern/src/components/AI/AIChat.tsx
index 77f76a9ecf..19aa563493 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<AIChatProps> = (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 38b6429dc3..93b8575a50 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 63f05bcf87..d88e76732f 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<ResourceCardProps> = (props) => {
{/* Has note indicator */}
<Show when={props.resource.note}>
- <StickyNote class="w-3.5 h-3.5 text-yellow-500" title={props.resource.note} />
+ <span title={props.resource.note}>
+ <StickyNote class="w-3.5 h-3.5 text-yellow-500" />
+ </span>
</Show>
{/* 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 e96a31ca65..a3b1af499e 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 ac7a0f880e..9e28f932ae 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 1e77e58190..dd6edb95f4 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 c37d7fcb77..959e1fc1f3 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';
}