fix: resolve all frontend lint errors for unused imports and type issues
- Remove unused type imports: SnapshotAlertConfig, PMGThresholdDefaults, RawOverrideConfig, BackupAlertConfig - Remove unused imports: Settings, Power, JSX, onMount, createEffect - Remove unused function _getUnitSuffix - Fix GuestDefaults type to avoid index signature conflict - Prefix unused catch variables with underscore - Fix StickyNote title prop by wrapping in span element
This commit is contained in:
parent
90a9b78e02
commit
3b36e4965f
7 changed files with 20 additions and 18 deletions
|
|
@ -253,7 +253,7 @@ export const AIChat: Component<AIChatProps> = (props) => {
|
||||||
await AIAPI.updateSettings({ autonomous_mode: newValue });
|
await AIAPI.updateSettings({ autonomous_mode: newValue });
|
||||||
setAutonomousMode(newValue);
|
setAutonomousMode(newValue);
|
||||||
notificationStore.success(newValue ? 'Autonomous mode enabled' : 'Autonomous mode disabled');
|
notificationStore.success(newValue ? 'Autonomous mode enabled' : 'Autonomous mode disabled');
|
||||||
} catch (e) {
|
} catch (_e) {
|
||||||
notificationStore.error('Failed to toggle autonomous mode');
|
notificationStore.error('Failed to toggle autonomous mode');
|
||||||
} finally {
|
} finally {
|
||||||
setIsTogglingAutonomous(false);
|
setIsTogglingAutonomous(false);
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
* Shows at the top of each section with editable threshold badges.
|
* 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 Settings from 'lucide-solid/icons/settings';
|
||||||
import RotateCcw from 'lucide-solid/icons/rotate-ccw';
|
import RotateCcw from 'lucide-solid/icons/rotate-ccw';
|
||||||
import Check from 'lucide-solid/icons/check';
|
import Check from 'lucide-solid/icons/check';
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
* Replaces wide table rows with a compact, mobile-friendly design.
|
* 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 ChevronDown from 'lucide-solid/icons/chevron-down';
|
||||||
import ChevronUp from 'lucide-solid/icons/chevron-up';
|
import ChevronUp from 'lucide-solid/icons/chevron-up';
|
||||||
import Settings from 'lucide-solid/icons/settings';
|
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 X from 'lucide-solid/icons/x';
|
||||||
import Bell from 'lucide-solid/icons/bell';
|
import Bell from 'lucide-solid/icons/bell';
|
||||||
import BellOff from 'lucide-solid/icons/bell-off';
|
import BellOff from 'lucide-solid/icons/bell-off';
|
||||||
import Power from 'lucide-solid/icons/power';
|
|
||||||
import ExternalLink from 'lucide-solid/icons/external-link';
|
import ExternalLink from 'lucide-solid/icons/external-link';
|
||||||
import StickyNote from 'lucide-solid/icons/sticky-note';
|
import StickyNote from 'lucide-solid/icons/sticky-note';
|
||||||
import { ThresholdBadge, ThresholdBadgeGroup } from './ThresholdBadge';
|
import { ThresholdBadge, ThresholdBadgeGroup } from './ThresholdBadge';
|
||||||
|
|
@ -189,7 +189,9 @@ export const ResourceCard: Component<ResourceCardProps> = (props) => {
|
||||||
|
|
||||||
{/* Has note indicator */}
|
{/* Has note indicator */}
|
||||||
<Show when={props.resource.note}>
|
<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>
|
</Show>
|
||||||
|
|
||||||
{/* Disabled badge */}
|
{/* Disabled badge */}
|
||||||
|
|
|
||||||
|
|
@ -69,15 +69,6 @@ const formatDisplayValue = (metric: string, value: number | undefined): string =
|
||||||
return String(value);
|
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
|
* Get readable label for a metric
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
* Provides a clean interface for toggling sections and remembering user preferences.
|
* 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';
|
const STORAGE_KEY = 'pulse-thresholds-collapsed-sections';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
import { Component, Show, createSignal, createEffect, JSX } from 'solid-js';
|
import { Component, Show, createSignal, createEffect, JSX } from 'solid-js';
|
||||||
import ChevronRight from 'lucide-solid/icons/chevron-right';
|
import ChevronRight from 'lucide-solid/icons/chevron-right';
|
||||||
import ChevronDown from 'lucide-solid/icons/chevron-down';
|
import ChevronDown from 'lucide-solid/icons/chevron-down';
|
||||||
import Settings from 'lucide-solid/icons/settings';
|
|
||||||
|
|
||||||
export interface CollapsibleSectionProps {
|
export interface CollapsibleSectionProps {
|
||||||
/** Unique identifier for the section */
|
/** Unique identifier for the section */
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { Alert } from '@/types/api';
|
import type { Alert } from '@/types/api';
|
||||||
import type { RawOverrideConfig, PMGThresholdDefaults, SnapshotAlertConfig, BackupAlertConfig } from '@/types/alerts';
|
// Alert types imported from shared alert types
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Resource Types
|
// Resource Types
|
||||||
|
|
@ -182,7 +182,16 @@ export interface EditingActions {
|
||||||
/**
|
/**
|
||||||
* Default threshold configuration for guests
|
* 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;
|
disableConnectivity?: boolean;
|
||||||
poweredOffSeverity?: 'warning' | 'critical';
|
poweredOffSeverity?: 'warning' | 'critical';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue