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.

Refine resource facet provenance summary

rcourtman63ac63a1d1bb
diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
index 5d54ca90e2..ce45dae501 100644
--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
@@ -1546,6 +1546,23 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
</div>
</div>
</div>
+ <Show
+ when={
+ historyCapabilities().length > 0 ||
+ historyRelationships().length > 0 ||
+ historyTimeline().length > 0
+ }
+ >
+ <div class="mt-2 flex flex-col gap-1">
+ <span class="text-muted">Facet chips</span>
+ <ResourceFacetSummary
+ capabilities={historyCapabilities()}
+ relationships={historyRelationships()}
+ recentChanges={historyTimeline()}
+ counts={historyFacetCounts()}
+ />
+ </div>
+ </Show>
</div>
<div class="rounded border border-border bg-surface p-3">
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 c0bc88ff74..c6bfa9ffa6 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
@@ -133,15 +133,15 @@ describe('ResourceDetailDrawer history tab', () => {
render(() => <ResourceDetailDrawer resource={resource} />);
- expect(await screen.findByText('Capabilities 1')).toBeInTheDocument();
- expect(screen.getByText('Relationships 1')).toBeInTheDocument();
- expect(screen.getByText('Timeline 3')).toBeInTheDocument();
- expect(screen.getByText('Restart 2')).toBeInTheDocument();
- expect(screen.getByText('Anomaly 1')).toBeInTheDocument();
- expect(screen.getByText('Platform event 1')).toBeInTheDocument();
- expect(screen.getByText('Pulse diff 2')).toBeInTheDocument();
- expect(screen.getByText('Docker adapter 2')).toBeInTheDocument();
- expect(screen.getByText('Proxmox adapter 1')).toBeInTheDocument();
+ expect(await screen.findAllByText('Capabilities 1')).toHaveLength(2);
+ expect(screen.getAllByText('Relationships 1')).toHaveLength(2);
+ expect(screen.getAllByText('Timeline 3')).toHaveLength(2);
+ expect(screen.getAllByText('Restart 2')).toHaveLength(2);
+ expect(screen.getAllByText('Anomaly 1')).toHaveLength(2);
+ expect(screen.getAllByText('Platform event 1')).toHaveLength(2);
+ expect(screen.getAllByText('Pulse diff 2')).toHaveLength(2);
+ expect(screen.getAllByText('Docker adapter 2')).toHaveLength(2);
+ expect(screen.getAllByText('Proxmox adapter 1')).toHaveLength(2);
});
it('renders resource capability, relationship, and timeline facets', async () => {
@@ -237,7 +237,9 @@ describe('ResourceDetailDrawer history tab', () => {
expect(panel.getAllByText('Capabilities')).toHaveLength(2);
expect(panel.getAllByText('Relationships')).toHaveLength(2);
expect(panel.getByText('Timeline')).toBeInTheDocument();
- expect(screen.getByText('Timeline 3')).toBeInTheDocument();
+ expect(panel.getByText('Timeline 3')).toBeInTheDocument();
+ expect(panel.getByText('Docker adapter 1')).toBeInTheDocument();
+ expect(panel.getByText('Proxmox adapter 2')).toBeInTheDocument();
expect(
panel.getByRole('link', { name: 'Open source resource node:pve-1 in Infrastructure' }),
).toHaveAttribute('href', '/infrastructure?resource=node%3Apve-1');