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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Unify drawer shell across Workloads, Docker, and host detail drawers
rcourtmanc2c2fb05e203
diff --git a/frontend-modern/src/components/Workloads/GuestDrawer.tsx b/frontend-modern/src/components/Workloads/GuestDrawer.tsxindex 8995d19e47..cf4f5fbe0e 100644--- a/frontend-modern/src/components/Workloads/GuestDrawer.tsx+++ b/frontend-modern/src/components/Workloads/GuestDrawer.tsx@@ -1,5 +1,7 @@import { Component, Show, Suspense, createMemo } from 'solid-js';import { DiscoveryTab } from '../Discovery/DiscoveryTab';+import { StatusDot } from '@/components/shared/StatusDot';+import { getSimpleStatusIndicator } from '@/utils/status';import { getGuestDrawerHistoryFallbackMetrics, type GuestDrawerProps } from './guestDrawerModel';import { useGuestDrawerState } from './useGuestDrawerState';import { GuestDrawerHistory, GuestDrawerHistoryRangeSelect } from './GuestDrawerHistory';@@ -40,11 +42,25 @@ export const GuestDrawer: Component<GuestDrawerProps> = (props) => {getGuestDrawerHistoryFallbackMetrics(props.guest),);+ const headerIndicator = createMemo(() => getSimpleStatusIndicator(props.guest.status));+return (<section class="space-y-3" aria-labelledby={headingId()}>- <h2 id={headingId()} class="sr-only">- {props.guest.name} details- </h2>+ <div class="flex items-center gap-2 min-w-0">+ <StatusDot+ size="sm"+ variant={headerIndicator().variant}+ title={headerIndicator().label}+ ariaLabel={headerIndicator().label}+ />+ <h2+ id={headingId()}+ class="text-sm font-semibold text-base-content truncate m-0"+ title={props.guest.name}+ >+ {props.guest.name}+ </h2>+ </div>{/* Tabs */}<div class="mb-1 flex items-center justify-between gap-3 border-b border-border px-1"><div class="flex items-center gap-6">diff --git a/frontend-modern/src/components/Workloads/NodeDrawer.tsx b/frontend-modern/src/components/Workloads/NodeDrawer.tsxindex 5d174dc848..aa767719e6 100644--- a/frontend-modern/src/components/Workloads/NodeDrawer.tsx+++ b/frontend-modern/src/components/Workloads/NodeDrawer.tsx@@ -1,8 +1,12 @@-import { Show, createMemo, createSignal, type Component } from 'solid-js';+import { Show, Suspense, createMemo, createSignal, type Component } from 'solid-js';import type { HistoryTimeRange } from '@/api/charts';+import { DiscoveryTab } from '@/components/Discovery/DiscoveryTab';+import { StatusDot } from '@/components/shared/StatusDot';import type { Disk, Node } from '@/types/api';+import { getDiscoveryLoadingState } from '@/utils/discoveryPresentation';import { getNodeDisplayName } from '@/utils/nodes';+import { getSimpleStatusIndicator } from '@/utils/status';import { GuestDrawerHistory, GuestDrawerHistoryRangeSelect } from './GuestDrawerHistory';import { GUEST_DRAWER_HISTORY_DEFAULT_RANGE } from './guestDrawerModel';@@ -13,12 +17,18 @@ import {getNodeDrawerHistoryTarget,} from './nodeDrawerModel';+export interface NodeDrawerDiscoveryTarget {+ agentId: string;+ hostname?: string;+}+interface NodeDrawerProps {node: Node;disks?: Disk[];+ discoveryTarget?: NodeDrawerDiscoveryTarget;}-type NodeDrawerTab = 'overview' | 'history';+type NodeDrawerTab = 'overview' | 'history' | 'discovery';export const NodeDrawer: Component<NodeDrawerProps> = (props) => {const [activeTab, setActiveTab] = createSignal<NodeDrawerTab>('overview');@@ -30,12 +40,25 @@ export const NodeDrawer: Component<NodeDrawerProps> = (props) => {const displayName = createMemo(() => getNodeDisplayName(props.node));const historyTarget = createMemo(() => getNodeDrawerHistoryTarget(props.node));const fallbackMetrics = createMemo(() => getNodeDrawerHistoryFallbackMetrics(props.node));+ const headerIndicator = createMemo(() => getSimpleStatusIndicator(props.node.status));return (<section class="space-y-3" aria-labelledby={headingId()} data-testid="node-drawer">- <h2 id={headingId()} class="sr-only">- {displayName()} details- </h2>+ <div class="flex items-center gap-2 min-w-0">+ <StatusDot+ size="sm"+ variant={headerIndicator().variant}+ title={headerIndicator().label}+ ariaLabel={headerIndicator().label}+ />+ <h2+ id={headingId()}+ class="text-sm font-semibold text-base-content truncate m-0"+ title={displayName()}+ >+ {displayName()}+ </h2>+ </div><div class="mb-1 flex items-center justify-between gap-3 border-b border-border px-1"><div class="flex items-center gap-6">@@ -63,6 +86,22 @@ export const NodeDrawer: Component<NodeDrawerProps> = (props) => {<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-blue-600 dark:bg-blue-400 rounded-t-full" />)}</button>+ <Show when={props.discoveryTarget?.agentId}>+ <button+ type="button"+ onClick={() => setActiveTab('discovery')}+ class={`pb-2 text-sm font-medium transition-colors relative ${+ activeTab() === 'discovery'+ ? 'text-blue-600 dark:text-blue-400'+ : ' hover:text-muted'+ }`}+ >+ Discovery+ {activeTab() === 'discovery' && (+ <div class="absolute bottom-0 left-0 right-0 h-0.5 bg-blue-600 dark:bg-blue-400 rounded-t-full" />+ )}+ </button>+ </Show></div><Show when={activeTab() === 'history'}><div class="pb-1">@@ -83,6 +122,27 @@ export const NodeDrawer: Component<NodeDrawerProps> = (props) => {target={historyTarget()}/></Show>++ <Show when={activeTab() === 'discovery' && props.discoveryTarget?.agentId}>+ {(agentId) => (+ <Suspense+ fallback={+ <div class="flex items-center justify-center py-8">+ <div class="animate-spin h-6 w-6 border-2 border-blue-500 border-t-transparent rounded-full" />+ <span class="ml-2 text-sm text-muted">{getDiscoveryLoadingState().text}</span>+ </div>+ }+ >+ <DiscoveryTab+ resourceType="agent"+ agentId={agentId()}+ resourceId={agentId()}+ hostname={props.discoveryTarget?.hostname || displayName()}+ showManualRunAction+ />+ </Suspense>+ )}+ </Show></section>);};diff --git a/frontend-modern/src/components/shared/InfrastructureDetailsDrawer.tsx b/frontend-modern/src/components/shared/InfrastructureDetailsDrawer.tsxindex 46bf1acd46..964f63f947 100644--- a/frontend-modern/src/components/shared/InfrastructureDetailsDrawer.tsx+++ b/frontend-modern/src/components/shared/InfrastructureDetailsDrawer.tsx@@ -1,12 +1,15 @@-import { Component, Suspense } from 'solid-js';+import { Component, Suspense, createMemo } from 'solid-js';import { DiscoveryTab } from '../Discovery/DiscoveryTab';import { SystemInfoCard } from '@/components/shared/cards/SystemInfoCard';import { HardwareCard } from '@/components/shared/cards/HardwareCard';import { RootDiskCard } from '@/components/shared/cards/RootDiskCard';import { NetworkInterfacesCard } from '@/components/shared/cards/NetworkInterfacesCard';import { DisksCard } from '@/components/shared/cards/DisksCard';+import { StatusDot } from '@/components/shared/StatusDot';import { WebInterfaceUrlField } from '@/components/shared/WebInterfaceUrlField';import { getDiscoveryLoadingState } from '@/utils/discoveryPresentation';+import { getNodeDisplayName } from '@/utils/nodes';+import { getSimpleStatusIndicator } from '@/utils/status';import {resolveInfrastructureDetailsDrawerDiscoveryHostname,resolveInfrastructureDetailsDrawerMetadataId,@@ -19,9 +22,25 @@ export const InfrastructureDetailsDrawer: Component<InfrastructureDetailsDrawerPconst metadataId = () => resolveInfrastructureDetailsDrawerMetadataId(props.node, props.agent);const discoveryHostname = () =>resolveInfrastructureDetailsDrawerDiscoveryHostname(props.node, props.agent);+ const displayName = createMemo(() => getNodeDisplayName(props.node));+ const headerIndicator = createMemo(() => getSimpleStatusIndicator(props.node.status));return (<div class="space-y-3">+ <div class="flex items-center gap-2 min-w-0">+ <StatusDot+ size="sm"+ variant={headerIndicator().variant}+ title={headerIndicator().label}+ ariaLabel={headerIndicator().label}+ />+ <h2+ class="text-sm font-semibold text-base-content truncate m-0"+ title={displayName()}+ >+ {displayName()}+ </h2>+ </div>{/* Tabs */}<div class="flex items-center gap-6 border-b border-border px-1 mb-1"><buttondiff --git a/frontend-modern/src/features/docker/DockerHostDrawer.tsx b/frontend-modern/src/features/docker/DockerHostDrawer.tsxindex a996db2b89..97c5ab9634 100644--- a/frontend-modern/src/features/docker/DockerHostDrawer.tsx+++ b/frontend-modern/src/features/docker/DockerHostDrawer.tsx@@ -1,9 +1,14 @@-import { Show, createMemo, createSignal, type Component } from 'solid-js';+import { Show, Suspense, createMemo, createSignal, type Component } from 'solid-js';import type { HistoryTimeRange } from '@/api/charts';+import { DiscoveryTab } from '@/components/Discovery/DiscoveryTab';+import { StatusDot } from '@/components/shared/StatusDot';+import { getSimpleStatusIndicator } from '@/utils/status';import { GuestDrawerHistory, GuestDrawerHistoryRangeSelect } from '@/components/Workloads/GuestDrawerHistory';import { GUEST_DRAWER_HISTORY_DEFAULT_RANGE } from '@/components/Workloads/guestDrawerModel';+import { toDiscoveryConfig } from '@/components/Infrastructure/resourceDetailDiscoveryModel';import type { Resource } from '@/types/resource';+import { getDiscoveryLoadingState } from '@/utils/discoveryPresentation';import { asTrimmedString } from '@/utils/stringUtils';import { DockerHostDrawerOverview } from './DockerHostDrawerOverview';@@ -17,7 +22,7 @@ interface DockerHostDrawerProps {host: Resource;}-type DockerHostDrawerTab = 'overview' | 'history';+type DockerHostDrawerTab = 'overview' | 'history' | 'discovery';export const DockerHostDrawer: Component<DockerHostDrawerProps> = (props) => {const [activeTab, setActiveTab] = createSignal<DockerHostDrawerTab>('overview');@@ -29,6 +34,8 @@ export const DockerHostDrawer: Component<DockerHostDrawerProps> = (props) => {const displayName = createMemo(() => asTrimmedString(props.host.name) || props.host.id);const historyTarget = createMemo(() => getDockerHostDrawerHistoryTarget(props.host));const fallbackMetrics = createMemo(() => getDockerHostDrawerHistoryFallbackMetrics(props.host));+ const discoveryConfig = createMemo(() => toDiscoveryConfig(props.host));+ const headerIndicator = createMemo(() => getSimpleStatusIndicator(props.host.status));return (<section@@ -36,9 +43,21 @@ export const DockerHostDrawer: Component<DockerHostDrawerProps> = (props) => {aria-labelledby={headingId()}data-testid="docker-host-drawer">- <h2 id={headingId()} class="sr-only">- {displayName()} details- </h2>+ <div class="flex items-center gap-2 min-w-0">+ <StatusDot+ size="sm"+ variant={headerIndicator().variant}+ title={headerIndicator().label}+ ariaLabel={headerIndicator().label}+ />+ <h2+ id={headingId()}+ class="text-sm font-semibold text-base-content truncate m-0"+ title={displayName()}+ >+ {displayName()}+ </h2>+ </div><div class="mb-1 flex items-center justify-between gap-3 border-b border-border px-1"><div class="flex items-center gap-6">@@ -66,6 +85,22 @@ export const DockerHostDrawer: Component<DockerHostDrawerProps> = (props) => {<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-blue-600 dark:bg-blue-400 rounded-t-full" />)}</button>+ <Show when={discoveryConfig()}>+ <button+ type="button"+ onClick={() => setActiveTab('discovery')}+ class={`pb-2 text-sm font-medium transition-colors relative ${+ activeTab() === 'discovery'+ ? 'text-blue-600 dark:text-blue-400'+ : ' hover:text-muted'+ }`}+ >+ Discovery+ {activeTab() === 'discovery' && (+ <div class="absolute bottom-0 left-0 right-0 h-0.5 bg-blue-600 dark:bg-blue-400 rounded-t-full" />+ )}+ </button>+ </Show></div><Show when={activeTab() === 'history'}><div class="pb-1">@@ -86,6 +121,27 @@ export const DockerHostDrawer: Component<DockerHostDrawerProps> = (props) => {target={historyTarget()}/></Show>++ <Show when={activeTab() === 'discovery' && discoveryConfig()}>+ {(config) => (+ <Suspense+ fallback={+ <div class="flex items-center justify-center py-8">+ <div class="animate-spin h-6 w-6 border-2 border-blue-500 border-t-transparent rounded-full" />+ <span class="ml-2 text-sm text-muted">{getDiscoveryLoadingState().text}</span>+ </div>+ }+ >+ <DiscoveryTab+ resourceType={config().resourceType}+ agentId={config().agentId}+ resourceId={config().resourceId}+ hostname={config().hostname}+ showManualRunAction+ />+ </Suspense>+ )}+ </Show></section>);};diff --git a/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsxindex d4c0312fea..c0e9f5cd41 100644--- a/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx@@ -12,6 +12,7 @@ import { ResponsiveMetricCell } from '@/components/shared/responsive';import { TableCard } from '@/components/shared/TableCard';import { TableCardHeader } from '@/components/shared/TableCardHeader';import { NodeDrawer } from '@/components/Workloads/NodeDrawer';+import { toDiscoveryConfig } from '@/components/Infrastructure/resourceDetailDiscoveryModel';import { StackedMemoryBar } from '@/components/Workloads/StackedMemoryBar';import { StackedDiskBar } from '@/components/Workloads/StackedDiskBar';import { MetricMiniSparkline } from '@/components/Workloads/MetricMiniSparkline';@@ -451,6 +452,12 @@ export const ProxmoxNodesTable: Component<{<NodeDrawernode={selectedNode()}disks={normalizeDiskArray(node.agent?.disks)}+ discoveryTarget={(() => {+ const config = toDiscoveryConfig(node);+ return config+ ? { agentId: config.agentId, hostname: config.hostname }+ : undefined;+ })()}/></div></TableCell>