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.

Simplify resource drawer investigation context

rcourtman72cbb62ed77b
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 26e11478bc..8856fe7c4e 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -245,6 +245,10 @@ That same overview now keeps AI intelligence and data-governance details
inside a collapsed `Investigation context` disclosure, so runtime status and
identity stay primary while secondary AI and policy signals remain available
without competing with the first-screen monitoring story.
+Inside that disclosure, learned dependency and correlation detail now sits
+behind its own reveal instead of rendering at full depth immediately, so the
+opened investigation surface still starts with compact health, change, and
+policy summaries before the user asks for relationship pattern detail.
The drawer header now stays focused on canonical identity and source/type
badges only, while workload/service drill-down links and Kubernetes platform
signals live with the runtime card, so the top strip does not compete with
diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
index 2060d2ce4f..00274f1ba3 100644
--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
@@ -141,6 +141,7 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
const [copied, setCopied] = createSignal(false);
const [showReportModal, setShowReportModal] = createSignal(false);
const [showInvestigationContext, setShowInvestigationContext] = createSignal(false);
+ const [showCorrelationContext, setShowCorrelationContext] = createSignal(false);
const [showDiscoveryContext, setShowDiscoveryContext] = createSignal(false);
const displayName = createMemo(() => getPreferredResourceDisplayName(props.resource));
@@ -308,6 +309,12 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
const resourceDependencies = createMemo(() => resourceIntelligence()?.dependencies ?? []);
const resourceDependents = createMemo(() => resourceIntelligence()?.dependents ?? []);
const resourceCorrelations = createMemo(() => resourceIntelligence()?.correlations ?? []);
+ const hasCorrelationContext = createMemo(
+ () =>
+ resourceDependencies().length > 0 ||
+ resourceDependents().length > 0 ||
+ resourceCorrelations().length > 0,
+ );
const hasInvestigationContext = createMemo(
() => Boolean(resourceIntelligence()) || hasGovernanceData(),
);
@@ -1383,23 +1390,27 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
<div class="text-[11px] font-medium uppercase tracking-wide text-base-content mb-2">
AI Intelligence
</div>
- <div class="space-y-1.5 text-[11px]">
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Health</span>
- <span class="font-medium text-base-content">
+ <div class="grid gap-2 sm:grid-cols-3">
+ <div class="rounded border border-border bg-surface-hover px-2 py-1.5">
+ <div class="text-[10px] text-muted">Health</div>
+ <div class="text-sm font-semibold text-base-content">
{intel().health.grade} · {Math.round(intel().health.score)}/100
- </span>
+ </div>
</div>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Trend</span>
- <span class="font-medium text-base-content capitalize">
+ <div class="rounded border border-border bg-surface-hover px-2 py-1.5">
+ <div class="text-[10px] text-muted">Trend</div>
+ <div class="text-sm font-semibold text-base-content capitalize">
{intel().health.trend}
- </span>
+ </div>
</div>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Notes</span>
- <span class="font-medium text-base-content">{intel().note_count}</span>
+ <div class="rounded border border-border bg-surface-hover px-2 py-1.5">
+ <div class="text-[10px] text-muted">Notes</div>
+ <div class="text-sm font-semibold text-base-content">
+ {intel().note_count}
+ </div>
</div>
+ </div>
+ <div class="mt-3 space-y-1.5 text-[11px]">
<ResourceChangeSummary
class="space-y-0"
title="Latest canonical change"
@@ -1408,14 +1419,42 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
maxChanges={1}
compact
/>
- <ResourceCorrelationSummary
- title="Correlation context"
- dependencies={resourceDependencies()}
- dependents={resourceDependents()}
- correlations={resourceCorrelations()}
- resolveResourceLabel={resolveResourceLabel}
- showLastSeen
- />
+ <Show when={hasCorrelationContext()}>
+ <div class="rounded border border-border bg-surface-hover px-2 py-2">
+ <div class="flex flex-wrap items-center justify-between gap-2">
+ <div>
+ <div class="text-[10px] font-medium uppercase tracking-wide text-base-content">
+ Correlation context
+ </div>
+ <div class="mt-0.5 text-[10px] text-muted">
+ {resourceDependencies().length} dependencies ·{' '}
+ {resourceDependents().length} dependents ·{' '}
+ {resourceCorrelations().length} correlations
+ </div>
+ </div>
+ <button
+ type="button"
+ onClick={() => setShowCorrelationContext((value) => !value)}
+ class="inline-flex items-center rounded-md border border-border bg-surface px-2.5 py-1 text-[10px] font-medium text-base-content transition-colors hover:bg-surface-hover"
+ >
+ {showCorrelationContext() ? 'Hide correlations' : 'Show correlations'}
+ </button>
+ </div>
+
+ <Show when={showCorrelationContext()}>
+ <div class="mt-3">
+ <ResourceCorrelationSummary
+ title="Correlation context"
+ dependencies={resourceDependencies()}
+ dependents={resourceDependents()}
+ correlations={resourceCorrelations()}
+ resolveResourceLabel={resolveResourceLabel}
+ showLastSeen
+ />
+ </div>
+ </Show>
+ </div>
+ </Show>
</div>
</div>
)}
@@ -1426,24 +1465,34 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
<div class="text-[11px] font-medium uppercase tracking-wide text-base-content mb-2">
Data Governance
</div>
- <div class="space-y-1.5 text-[11px]">
+ <div class="grid gap-2 sm:grid-cols-2">
<Show when={props.resource.policy}>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Sensitivity</span>
- <span class="font-medium text-base-content">
+ <div class="rounded border border-border bg-surface-hover px-2 py-1.5">
+ <div class="text-[10px] text-muted">Sensitivity</div>
+ <div class="text-sm font-semibold text-base-content">
{getResourceSensitivityLabel(props.resource.policy?.sensitivity)}
- </span>
+ </div>
</div>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Routing</span>
- <span class="font-medium text-base-content">
+ <div class="rounded border border-border bg-surface-hover px-2 py-1.5">
+ <div class="text-[10px] text-muted">Routing</div>
+ <div class="text-sm font-semibold text-base-content">
{getResourceRoutingScopeLabel(props.resource.policy?.routing.scope)}
- </span>
+ </div>
</div>
</Show>
+ <Show when={policyRedactions().length > 0 || governanceSummary()}>
+ <div class="rounded border border-border bg-surface-hover px-2 py-1.5">
+ <div class="text-[10px] text-muted">Redactions</div>
+ <div class="text-sm font-semibold text-base-content">
+ {policyRedactions().length}
+ </div>
+ </div>
+ </Show>
+ </div>
+ <div class="mt-3 space-y-1.5 text-[11px]">
<Show when={policyRedactions().length > 0}>
<div class="flex flex-col gap-1">
- <span class="text-muted">Redactions</span>
+ <span class="text-muted">Redaction labels</span>
<div class="flex flex-wrap gap-1">
<For each={policyRedactions()}>
{(label) => (
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
index b932feb034..775c3305c6 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
@@ -197,6 +197,7 @@ describe('ResourceDetailDrawer change history section', () => {
expect(screen.getAllByText('Proxmox adapter 1')).toHaveLength(1);
expect(screen.queryByText('Quick links')).toBeNull();
expect(screen.getByText('Investigation context')).toBeInTheDocument();
+ expect(screen.queryByText('Correlation context')).toBeNull();
expect(screen.queryByText('Storage 1 alias')).toBeNull();
expect(screen.queryByText('VM Child')).toBeNull();
expect(screen.queryByText('Capabilities 1')).toBeNull();
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx
index fd78f37a56..8853feaa8d 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx
@@ -374,8 +374,10 @@ describe('ResourceDetailDrawer runtime and identity cards', () => {
expect(getByText('AI Intelligence')).toBeInTheDocument();
});
expect(getByText('AI health A · 92/100 · 1 correlation')).toBeInTheDocument();
+ expect(queryByText('Storage 1')).toBeNull();
+ fireEvent.click(getByRole('button', { name: 'Show correlations' }));
await waitFor(() => {
- expect(getByText('Correlation context')).toBeInTheDocument();
+ expect(getByText('Storage 1')).toBeInTheDocument();
});
expect(getByText('1 dependency · 1 dependent · 1 correlation')).toBeInTheDocument();
expect(