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.

Flatten resource drawer summary support rows

rcourtman023affc554a5
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index ed4c81321e..860f91a51d 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -258,10 +258,16 @@ not compete for the same ownership on first read.
The overview now begins with one primary `Summary` shell instead of separate
peer `Runtime` and `Identity` cards, so current state and canonical identity
read as one first-screen answer rather than two adjacent mini-surfaces.
+That summary shell now reads as one linear current-state and identity column
+instead of a split two-pane grid, so the first read stays sequential rather
+than asking the operator to compare two side-by-side blocks.
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 summary shell, so the top strip does not compete with
the resource name, status, or primary identity line.
+Inside that summary shell, the operational and supporting context rows stay
+inline instead of sitting in nested bordered cards, so the first read stays
+like one linear sheet rather than a stack of cards inside the summary.
Discovery support now also lives inside overview-only `Discovery context`
instead of a peer drawer tab, so supplemental discovery detail stays available
without claiming the same navigation weight as runtime, identity, or
diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
index 4fdc87b2aa..ea6f5690f0 100644
--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
@@ -926,7 +926,7 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
<div class="text-[11px] font-medium uppercase tracking-wide text-base-content">
Summary
</div>
- <div class="mt-3 grid gap-4 md:grid-cols-[minmax(0,1.1fr)_minmax(0,0.9fr)]">
+ <div class="mt-3 grid gap-4">
<div data-testid="resource-current-state-section">
<div class="mb-2 text-[10px] font-medium uppercase tracking-wide text-base-content">
Current state
@@ -991,55 +991,53 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
</div>
</Show>
<Show when={hasRuntimeOperationalContext()}>
- <div class="mt-2 rounded border border-border bg-surface-hover px-2 py-2">
+ <div class="mt-2 space-y-1.5">
<div class="text-[10px] font-medium uppercase tracking-wide text-base-content">
Operational context
</div>
- <div class="mt-2 space-y-1.5">
- <Show when={props.resource.platformId}>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Platform ID</span>
- <span
- class="font-medium text-base-content truncate"
- title={props.resource.platformId}
- >
- {props.resource.platformId}
- </span>
- </div>
- </Show>
- <Show when={kubernetesCapabilityBadges().length > 0}>
- <div class="flex flex-col gap-1">
- <span class="text-muted">Platform signals</span>
- <div class="flex flex-wrap gap-1">
- <For each={kubernetesCapabilityBadges()}>
- {(badge) => (
- <span class={badge.classes} title={badge.title}>
- {badge.label}
- </span>
- )}
- </For>
- </div>
+ <Show when={props.resource.platformId}>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Platform ID</span>
+ <span
+ class="font-medium text-base-content truncate"
+ title={props.resource.platformId}
+ >
+ {props.resource.platformId}
+ </span>
+ </div>
+ </Show>
+ <Show when={kubernetesCapabilityBadges().length > 0}>
+ <div class="flex flex-col gap-1">
+ <span class="text-muted">Platform signals</span>
+ <div class="flex flex-wrap gap-1">
+ <For each={kubernetesCapabilityBadges()}>
+ {(badge) => (
+ <span class={badge.classes} title={badge.title}>
+ {badge.label}
+ </span>
+ )}
+ </For>
</div>
- </Show>
- <Show when={relatedLinks().length > 0}>
- <div class="flex flex-col gap-1">
- <span class="text-muted">Quick links</span>
- <div class="flex flex-wrap gap-2">
- <For each={relatedLinks()}>
- {(link) => (
- <a
- href={link.href}
- aria-label={link.ariaLabel}
- class="inline-flex items-center rounded border border-blue-200 bg-blue-50 px-2.5 py-1 text-[11px] font-medium text-blue-700 transition-colors hover:bg-blue-100 dark:border-blue-700 dark:bg-blue-900 dark:text-blue-200 dark:hover:bg-blue-900"
- >
- {link.compactLabel}
- </a>
- )}
- </For>
- </div>
+ </div>
+ </Show>
+ <Show when={relatedLinks().length > 0}>
+ <div class="flex flex-col gap-1">
+ <span class="text-muted">Quick links</span>
+ <div class="flex flex-wrap gap-2">
+ <For each={relatedLinks()}>
+ {(link) => (
+ <a
+ href={link.href}
+ aria-label={link.ariaLabel}
+ class="inline-flex items-center rounded border border-blue-200 bg-blue-50 px-2.5 py-1 text-[11px] font-medium text-blue-700 transition-colors hover:bg-blue-100 dark:border-blue-700 dark:bg-blue-900 dark:text-blue-200 dark:hover:bg-blue-900"
+ >
+ {link.compactLabel}
+ </a>
+ )}
+ </For>
</div>
- </Show>
- </div>
+ </div>
+ </Show>
</div>
</Show>
</div>
@@ -1061,67 +1059,46 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
)}
</For>
<Show when={hasIdentitySupportContext()}>
- <div class="mt-2 rounded border border-border bg-surface-hover px-2 py-2">
+ <div class="mt-2 space-y-1.5">
<div class="text-[10px] font-medium uppercase tracking-wide text-base-content">
Supporting context
</div>
<Show when={identitySupportSummary()}>
<div class="mt-1 text-[10px] text-muted">{identitySupportSummary()}</div>
</Show>
- <div class="mt-2 space-y-1.5">
- <Show
- when={props.resource.identity?.ips && props.resource.identity.ips.length > 0}
- >
- <div class="flex flex-col gap-1">
- <span class="text-muted">IP Addresses</span>
- <div class="flex flex-wrap gap-1">
- <For each={props.resource.identity?.ips ?? []}>
- {(ip) => (
- <span
- class="inline-flex items-center rounded bg-blue-100 px-1.5 py-0.5 text-[10px] text-blue-700 dark:bg-blue-900 dark:text-blue-200"
- title={ip}
- >
- {ip}
- </span>
- )}
- </For>
- </div>
- </div>
- </Show>
- <Show when={props.resource.tags && props.resource.tags.length > 0}>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Tags</span>
- <TagBadges tags={props.resource.tags} maxVisible={6} />
+ <Show
+ when={props.resource.identity?.ips && props.resource.identity.ips.length > 0}
+ >
+ <div class="flex flex-col gap-1">
+ <span class="text-muted">IP Addresses</span>
+ <div class="flex flex-wrap gap-1">
+ <For each={props.resource.identity?.ips ?? []}>
+ {(ip) => (
+ <span
+ class="inline-flex items-center rounded bg-blue-100 px-1.5 py-0.5 text-[10px] text-blue-700 dark:bg-blue-900 dark:text-blue-200"
+ title={ip}
+ >
+ {ip}
+ </span>
+ )}
+ </For>
</div>
- </Show>
- <Show when={identityAliasValues().length > 0}>
- <Show
- when={hasAliasOverflow()}
- fallback={
- <div class="flex flex-col gap-1">
- <span class="text-muted">Aliases</span>
- <div class="flex flex-wrap gap-1">
- <For each={aliasPreviewValues()}>
- {(value) => (
- <span
- class="inline-flex items-center rounded bg-surface-alt px-1.5 py-0.5 text-[10px]"
- title={value}
- >
- {value}
- </span>
- )}
- </For>
- </div>
- </div>
- }
- >
- <details class="rounded border border-border bg-surface px-2 py-1.5">
- <summary class="flex cursor-pointer list-none items-center justify-between text-[10px] font-medium text-muted">
- <span>Aliases</span>
- <span class="text-muted">{identityAliasValues().length}</span>
- </summary>
- <div class="mt-2 flex flex-wrap gap-1 border-t border-border pt-2">
- <For each={identityAliasValues()}>
+ </div>
+ </Show>
+ <Show when={props.resource.tags && props.resource.tags.length > 0}>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Tags</span>
+ <TagBadges tags={props.resource.tags} maxVisible={6} />
+ </div>
+ </Show>
+ <Show when={identityAliasValues().length > 0}>
+ <Show
+ when={hasAliasOverflow()}
+ fallback={
+ <div class="flex flex-col gap-1">
+ <span class="text-muted">Aliases</span>
+ <div class="flex flex-wrap gap-1">
+ <For each={aliasPreviewValues()}>
{(value) => (
<span
class="inline-flex items-center rounded bg-surface-alt px-1.5 py-0.5 text-[10px]"
@@ -1132,10 +1109,29 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
)}
</For>
</div>
- </details>
- </Show>
+ </div>
+ }
+ >
+ <details class="rounded border border-border bg-surface px-2 py-1.5">
+ <summary class="flex cursor-pointer list-none items-center justify-between text-[10px] font-medium text-muted">
+ <span>Aliases</span>
+ <span class="text-muted">{identityAliasValues().length}</span>
+ </summary>
+ <div class="mt-2 flex flex-wrap gap-1 border-t border-border pt-2">
+ <For each={identityAliasValues()}>
+ {(value) => (
+ <span
+ class="inline-flex items-center rounded bg-surface-alt px-1.5 py-0.5 text-[10px]"
+ title={value}
+ >
+ {value}
+ </span>
+ )}
+ </For>
+ </div>
+ </details>
</Show>
- </div>
+ </Show>
</div>
</Show>
<Show when={!identityCardHasRichData()}>
@@ -1148,6 +1144,238 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
</div>
</div>
+ <div
+ data-testid="resource-change-history-section"
+ class="rounded border border-border bg-surface p-3"
+ >
+ <div class="flex items-center justify-between gap-3">
+ <div>
+ <div class="text-[11px] font-medium uppercase tracking-wide text-base-content">
+ Change history
+ </div>
+ <Show when={resourceTimelineCount() > 0}>
+ <div class="mt-1">
+ <ResourceFacetSummary
+ recentChanges={resourceTimeline()}
+ counts={resourceFacetCounts()}
+ />
+ </div>
+ </Show>
+ </div>
+ <div class="text-right text-[10px] text-muted">
+ <div>
+ {timelineFacetRequest()
+ ? timelineFacets.loading
+ ? 'Refreshing filtered changes...'
+ : 'Filtered changes loaded'
+ : resourceFacets.loading
+ ? 'Refreshing changes...'
+ : 'Changes loaded'}
+ </div>
+ <Show when={hasTimelineFilters()}>
+ <div class="mt-0.5 text-blue-700 dark:text-blue-300">Change filters active</div>
+ </Show>
+ </div>
+ </div>
+
+ <div class="mt-3 grid gap-2 sm:grid-cols-2">
+ <label class="space-y-1 text-[10px]">
+ <span class="text-muted">Change kind</span>
+ <select
+ class="w-full rounded border border-border bg-base px-2 py-1 text-[11px] text-base-content"
+ value={timelineKindFilter()}
+ onChange={(event) =>
+ setTimelineKindFilter(
+ (event.currentTarget.value || '') as ResourceChangeKind | '',
+ )
+ }
+ >
+ <For each={timelineKindOptions}>
+ {(option) => <option value={option.value}>{option.label}</option>}
+ </For>
+ </select>
+ </label>
+ <label class="space-y-1 text-[10px]">
+ <span class="text-muted">Source type</span>
+ <select
+ class="w-full rounded border border-border bg-base px-2 py-1 text-[11px] text-base-content"
+ value={timelineSourceTypeFilter()}
+ onChange={(event) =>
+ setTimelineSourceTypeFilter(
+ (event.currentTarget.value || '') as ResourceChangeSourceType | '',
+ )
+ }
+ >
+ <For each={timelineSourceTypeOptions}>
+ {(option) => <option value={option.value}>{option.label}</option>}
+ </For>
+ </select>
+ </label>
+ <label class="space-y-1 text-[10px]">
+ <span class="text-muted">Source adapter</span>
+ <select
+ class="w-full rounded border border-border bg-base px-2 py-1 text-[11px] text-base-content"
+ value={timelineSourceAdapterFilter()}
+ onChange={(event) =>
+ setTimelineSourceAdapterFilter(
+ (event.currentTarget.value || '') as ResourceChangeSourceAdapter | '',
+ )
+ }
+ >
+ <For each={timelineSourceAdapterOptions}>
+ {(option) => <option value={option.value}>{option.label}</option>}
+ </For>
+ </select>
+ </label>
+ </div>
+
+ <Show when={hasTimelineFilters()}>
+ <div class="mt-2 flex justify-end">
+ <button
+ type="button"
+ class="rounded-md border border-border bg-surface-hover px-2.5 py-1 text-[10px] font-semibold text-base-content hover:bg-surface"
+ onClick={() => {
+ setTimelineKindFilter('');
+ setTimelineSourceTypeFilter('');
+ setTimelineSourceAdapterFilter('');
+ }}
+ >
+ Clear filters
+ </button>
+ </div>
+ </Show>
+
+ <Show when={facetBundleError()}>
+ <div class="mt-2 rounded border border-amber-200 bg-amber-50 px-2 py-1.5 text-[10px] text-amber-700 dark:border-amber-700 dark:bg-amber-900 dark:text-amber-200">
+ <div class="flex items-start justify-between gap-2">
+ <span>{facetBundleError()}</span>
+ <button
+ type="button"
+ class="shrink-0 font-medium text-amber-700 underline dark:text-amber-200"
+ onClick={() => refetchHistoryFacets()}
+ >
+ Retry
+ </button>
+ </div>
+ </div>
+ </Show>
+
+ <div class="mt-3 rounded border border-border bg-surface p-3">
+ <div class="text-[11px] font-medium uppercase tracking-wide text-base-content mb-2">
+ Event log
+ </div>
+ <Show
+ when={sortedResourceTimeline().length > 0}
+ fallback={
+ <div class="rounded border border-dashed border-border bg-surface-hover px-2 py-2 text-[10px] text-muted">
+ No events yet.
+ </div>
+ }
+ >
+ <div class="space-y-2">
+ <For each={sortedResourceTimeline()}>
+ {(change) => {
+ const kindPresentation = getResourceChangeKindPresentation(change.kind);
+ const sourceTypePresentation = getResourceChangeSourceTypePresentation(
+ change.sourceType,
+ );
+ const sourceAdapterPresentation = change.sourceAdapter
+ ? getResourceChangeSourceAdapterPresentation(change.sourceAdapter)
+ : null;
+
+ return (
+ <div class="rounded border border-border bg-surface-hover px-2 py-1.5 text-[10px]">
+ <div class="flex items-start justify-between gap-3">
+ <div class="min-w-0">
+ <div class="font-medium text-base-content">
+ {kindPresentation.label}
+ </div>
+ <div class="mt-0.5 text-muted">
+ {formatRelativeTime(change.observedAt)}
+ <Show when={change.occurredAt}>
+ <span class="mx-1">•</span>
+ <span>Occurred {formatRelativeTime(change.occurredAt)}</span>
+ </Show>
+ </div>
+ </div>
+ <span class="text-muted">{sourceTypePresentation.label}</span>
+ </div>
+ <div class="mt-1 grid gap-1 sm:grid-cols-2">
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Confidence</span>
+ <span class="font-medium text-base-content">
+ {formatConfidenceLabel(change.confidence)}
+ </span>
+ </div>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Adapter</span>
+ <span class="font-medium text-base-content">
+ {sourceAdapterPresentation?.label || '—'}
+ </span>
+ </div>
+ <Show when={change.actor}>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Actor</span>
+ <span class="font-medium text-base-content">{change.actor}</span>
+ </div>
+ </Show>
+ <Show when={change.from || change.to}>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Transition</span>
+ <span class="font-medium text-base-content">
+ {change.from || '—'} → {change.to || '—'}
+ </span>
+ </div>
+ </Show>
+ </div>
+ <Show when={change.reason}>
+ <div class="mt-1 rounded border border-border bg-base px-2 py-1 text-[10px] text-base-content">
+ {change.reason}
+ </div>
+ </Show>
+ <Show when={hasMetadataEntries(change.metadata)}>
+ <details class="mt-1 rounded border border-border bg-base px-2 py-1">
+ <summary class="cursor-pointer list-none text-[10px] font-medium text-muted">
+ Metadata
+ </summary>
+ <pre class="mt-2 overflow-auto whitespace-pre-wrap break-words text-[10px] text-base-content">
+ {JSON.stringify(change.metadata ?? {}, null, 2)}
+ </pre>
+ </details>
+ </Show>
+ <Show when={change.relatedResources && change.relatedResources.length > 0}>
+ <div class="mt-1 flex flex-wrap items-center gap-1 text-muted">
+ <span>Related:</span>
+ <For each={change.relatedResources ?? []}>
+ {(relatedResource) => {
+ const label = resolveResourceLabel(relatedResource);
+ const href = buildInfrastructureResourceHref(relatedResource);
+ return href ? (
+ <a
+ class="inline-flex rounded bg-surface px-1.5 py-0.5 text-[10px] text-blue-700 hover:underline dark:text-blue-300"
+ href={href}
+ aria-label={`Open related resource ${label} in Infrastructure`}
+ >
+ {label}
+ </a>
+ ) : (
+ <span class="inline-flex rounded bg-surface px-1.5 py-0.5 text-[10px] text-base-content">
+ {label}
+ </span>
+ );
+ }}
+ </For>
+ </div>
+ </Show>
+ </div>
+ );
+ }}
+ </For>
+ </div>
+ </Show>
+ </div>
+ </div>
+
<Show when={hasServiceDetails()}>
<SupportDisclosure
title="Service details"
@@ -1792,237 +2020,6 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
)}
</Show>
- <div
- data-testid="resource-change-history-section"
- class="mt-3 rounded border border-border bg-surface p-3"
- >
- <div class="flex items-center justify-between gap-3">
- <div>
- <div class="text-[11px] font-medium uppercase tracking-wide text-base-content">
- Change history
- </div>
- <Show when={resourceTimelineCount() > 0}>
- <div class="mt-1">
- <ResourceFacetSummary
- recentChanges={resourceTimeline()}
- counts={resourceFacetCounts()}
- />
- </div>
- </Show>
- </div>
- <div class="text-right text-[10px] text-muted">
- <div>
- {timelineFacetRequest()
- ? timelineFacets.loading
- ? 'Refreshing filtered changes...'
- : 'Filtered changes loaded'
- : resourceFacets.loading
- ? 'Refreshing changes...'
- : 'Changes loaded'}
- </div>
- <Show when={hasTimelineFilters()}>
- <div class="mt-0.5 text-blue-700 dark:text-blue-300">Change filters active</div>
- </Show>
- </div>
- </div>
-
- <div class="mt-3 grid gap-2 sm:grid-cols-2">
- <label class="space-y-1 text-[10px]">
- <span class="text-muted">Change kind</span>
- <select
- class="w-full rounded border border-border bg-base px-2 py-1 text-[11px] text-base-content"
- value={timelineKindFilter()}
- onChange={(event) =>
- setTimelineKindFilter(
- (event.currentTarget.value || '') as ResourceChangeKind | '',
- )
- }
- >
- <For each={timelineKindOptions}>
- {(option) => <option value={option.value}>{option.label}</option>}
- </For>
- </select>
- </label>
- <label class="space-y-1 text-[10px]">
- <span class="text-muted">Source type</span>
- <select
- class="w-full rounded border border-border bg-base px-2 py-1 text-[11px] text-base-content"
- value={timelineSourceTypeFilter()}
- onChange={(event) =>
- setTimelineSourceTypeFilter(
- (event.currentTarget.value || '') as ResourceChangeSourceType | '',
- )
- }
- >
- <For each={timelineSourceTypeOptions}>
- {(option) => <option value={option.value}>{option.label}</option>}
- </For>
- </select>
- </label>
- <label class="space-y-1 text-[10px]">
- <span class="text-muted">Source adapter</span>
- <select
- class="w-full rounded border border-border bg-base px-2 py-1 text-[11px] text-base-content"
- value={timelineSourceAdapterFilter()}
- onChange={(event) =>
- setTimelineSourceAdapterFilter(
- (event.currentTarget.value || '') as ResourceChangeSourceAdapter | '',
- )
- }
- >
- <For each={timelineSourceAdapterOptions}>
- {(option) => <option value={option.value}>{option.label}</option>}
- </For>
- </select>
- </label>
- </div>
-
- <Show when={hasTimelineFilters()}>
- <div class="mt-2 flex justify-end">
- <button
- type="button"
- class="rounded-md border border-border bg-surface-hover px-2.5 py-1 text-[10px] font-semibold text-base-content hover:bg-surface"
- onClick={() => {
- setTimelineKindFilter('');
- setTimelineSourceTypeFilter('');
- setTimelineSourceAdapterFilter('');
- }}
- >
- Clear filters
- </button>
- </div>
- </Show>
-
- <Show when={facetBundleError()}>
- <div class="mt-2 rounded border border-amber-200 bg-amber-50 px-2 py-1.5 text-[10px] text-amber-700 dark:border-amber-700 dark:bg-amber-900 dark:text-amber-200">
- <div class="flex items-start justify-between gap-2">
- <span>{facetBundleError()}</span>
- <button
- type="button"
- class="shrink-0 font-medium text-amber-700 underline dark:text-amber-200"
- onClick={() => refetchHistoryFacets()}
- >
- Retry
- </button>
- </div>
- </div>
- </Show>
-
- <div class="mt-3 rounded border border-border bg-surface p-3">
- <div class="text-[11px] font-medium uppercase tracking-wide text-base-content mb-2">
- Event log
- </div>
- <Show
- when={sortedResourceTimeline().length > 0}
- fallback={
- <div class="rounded border border-dashed border-border bg-surface-hover px-2 py-2 text-[10px] text-muted">
- No events yet.
- </div>
- }
- >
- <div class="space-y-2">
- <For each={sortedResourceTimeline()}>
- {(change) => {
- const kindPresentation = getResourceChangeKindPresentation(change.kind);
- const sourceTypePresentation = getResourceChangeSourceTypePresentation(
- change.sourceType,
- );
- const sourceAdapterPresentation = change.sourceAdapter
- ? getResourceChangeSourceAdapterPresentation(change.sourceAdapter)
- : null;
-
- return (
- <div class="rounded border border-border bg-surface-hover px-2 py-1.5 text-[10px]">
- <div class="flex items-start justify-between gap-3">
- <div class="min-w-0">
- <div class="font-medium text-base-content">
- {kindPresentation.label}
- </div>
- <div class="mt-0.5 text-muted">
- {formatRelativeTime(change.observedAt)}
- <Show when={change.occurredAt}>
- <span class="mx-1">•</span>
- <span>Occurred {formatRelativeTime(change.occurredAt)}</span>
- </Show>
- </div>
- </div>
- <span class="text-muted">{sourceTypePresentation.label}</span>
- </div>
- <div class="mt-1 grid gap-1 sm:grid-cols-2">
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Confidence</span>
- <span class="font-medium text-base-content">
- {formatConfidenceLabel(change.confidence)}
- </span>
- </div>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Adapter</span>
- <span class="font-medium text-base-content">
- {sourceAdapterPresentation?.label || '—'}
- </span>
- </div>
- <Show when={change.actor}>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Actor</span>
- <span class="font-medium text-base-content">{change.actor}</span>
- </div>
- </Show>
- <Show when={change.from || change.to}>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Transition</span>
- <span class="font-medium text-base-content">
- {change.from || '—'} → {change.to || '—'}
- </span>
- </div>
- </Show>
- </div>
- <Show when={change.reason}>
- <div class="mt-1 rounded border border-border bg-base px-2 py-1 text-[10px] text-base-content">
- {change.reason}
- </div>
- </Show>
- <Show when={hasMetadataEntries(change.metadata)}>
- <details class="mt-1 rounded border border-border bg-base px-2 py-1">
- <summary class="cursor-pointer list-none text-[10px] font-medium text-muted">
- Metadata
- </summary>
- <pre class="mt-2 overflow-auto whitespace-pre-wrap break-words text-[10px] text-base-content">
- {JSON.stringify(change.metadata ?? {}, null, 2)}
- </pre>
- </details>
- </Show>
- <Show when={change.relatedResources && change.relatedResources.length > 0}>
- <div class="mt-1 flex flex-wrap items-center gap-1 text-muted">
- <span>Related:</span>
- <For each={change.relatedResources ?? []}>
- {(relatedResource) => {
- const label = resolveResourceLabel(relatedResource);
- const href = buildInfrastructureResourceHref(relatedResource);
- return href ? (
- <a
- class="inline-flex rounded bg-surface px-1.5 py-0.5 text-[10px] text-blue-700 hover:underline dark:text-blue-300"
- href={href}
- aria-label={`Open related resource ${label} in Infrastructure`}
- >
- {label}
- </a>
- ) : (
- <span class="inline-flex rounded bg-surface px-1.5 py-0.5 text-[10px] text-base-content">
- {label}
- </span>
- );
- }}
- </For>
- </div>
- </Show>
- </div>
- );
- }}
- </For>
- </div>
- </Show>
- </div>
- </div>
</div>
{/* PMG Mail Tab */}
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 b60eee0140..c01deda3d3 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
@@ -190,6 +190,10 @@ describe('ResourceDetailDrawer change history section', () => {
expect(screen.getByText('Current state')).toBeInTheDocument();
expect(screen.queryByText('Runtime')).toBeNull();
expect(screen.getByText('Change history')).toBeInTheDocument();
+ expect(
+ screen.getByTestId('resource-summary-section').querySelectorAll('.bg-surface-hover.px-2.py-2')
+ .length,
+ ).toBe(0);
expect(screen.queryByText('Host details')).toBeNull();
expect(screen.queryByText('Service details')).toBeNull();
expect(screen.queryByText('Supporting context')).toBeNull();