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
Collapse drawer history filters
rcourtman4ffe025f6c69
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex d17008bef5..745864fd19 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -467,9 +467,12 @@ Inside `Change history`, the event list now renders directly in the parentsection instead of inside a second bordered `Event log` card, so the timelinereads like one inspection surface rather than a card nested under its ownsection title.-The `Change history` filter controls now stack vertically instead of using a-paired filter grid, so the timeline reads like a simple inspection surface-rather than a two-field form on wider screens.+The `Change history` filter controls now stay behind an explicit `Filter+history` reveal until the operator asks for them or activates a filter, so the+timeline reads as the primary inspection surface instead of opening on a form.+When that reveal is open, the controls still stack vertically instead of using+a paired filter grid, so the filter state reads as one subordinate control+column instead of a competing secondary layout.When filters are active, the filtered facet bundle drives both the summarychips and the event log, so the header and the list stay aligned instead ofshowing stale unfiltered counts above filtered results.diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsxindex 55b818d614..fcef199081 100644--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx@@ -284,75 +284,102 @@ export const ResourceDetailDrawerOverviewTab: Component<ResourceDetailDrawerOver</div><div class="text-right text-[10px] text-muted"><div>{drawer.historyLoadingLabel()}</div>- <Show when={drawer.hasTimelineFilters()}>- <div class="mt-0.5 text-blue-700 dark:text-blue-300">Change filters active</div>- </Show>+ <div class="mt-1 flex flex-wrap justify-end gap-2">+ <Show when={drawer.hasTimelineFilters()}>+ <div class="text-blue-700 dark:text-blue-300">Change filters active</div>+ </Show>+ <Show+ when={!drawer.showHistoryFilters() && !drawer.hasTimelineFilters()}+ fallback={+ <Show when={drawer.showHistoryFilters() && !drawer.hasTimelineFilters()}>+ <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={() => drawer.setShowHistoryFilters(false)}+ >+ Hide filters+ </button>+ </Show>+ }+ >+ <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={() => drawer.setShowHistoryFilters(true)}+ >+ Filter history+ </button>+ </Show>+ </div></div></div>- <div class="mt-3 space-y-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={drawer.timelineKindFilter()}- onChange={(event) =>- drawer.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={drawer.timelineSourceTypeFilter()}- onChange={(event) =>- drawer.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={drawer.timelineSourceAdapterFilter()}- onChange={(event) =>- drawer.setTimelineSourceAdapterFilter(- (event.currentTarget.value || '') as ResourceChangeSourceAdapter | '',- )- }- >- <For each={timelineSourceAdapterOptions}>- {(option) => <option value={option.value}>{option.label}</option>}- </For>- </select>- </label>- </div>+ <Show when={drawer.showHistoryFilters() || drawer.hasTimelineFilters()}>+ <div class="mt-3 space-y-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={drawer.timelineKindFilter()}+ onChange={(event) =>+ drawer.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={drawer.timelineSourceTypeFilter()}+ onChange={(event) =>+ drawer.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={drawer.timelineSourceAdapterFilter()}+ onChange={(event) =>+ drawer.setTimelineSourceAdapterFilter(+ (event.currentTarget.value || '') as ResourceChangeSourceAdapter | '',+ )+ }+ >+ <For each={timelineSourceAdapterOptions}>+ {(option) => <option value={option.value}>{option.label}</option>}+ </For>+ </select>+ </label>- <Show when={drawer.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={() => {- drawer.setTimelineKindFilter('');- drawer.setTimelineSourceTypeFilter('');- drawer.setTimelineSourceAdapterFilter('');- }}- >- Clear filters- </button>+ <Show when={drawer.hasTimelineFilters()}>+ <div class="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={() => {+ drawer.setTimelineKindFilter('');+ drawer.setTimelineSourceTypeFilter('');+ drawer.setTimelineSourceAdapterFilter('');+ drawer.setShowHistoryFilters(false);+ }}+ >+ Clear filters+ </button>+ </div>+ </Show></div></Show>diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsxindex c75b31ad25..1978d7574f 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx@@ -136,6 +136,7 @@ describe('ResourceDetailDrawer change history section', () => {expect(resourceDetailDrawerStateSource).toContain("from './useResourceDetailDrawerDockerActionsState'",);+ expect(resourceDetailDrawerStateSource).toContain('const [showHistoryFilters, setShowHistoryFilters]');expect(resourceDetailDrawerStateSource).not.toContain('createResource(');expect(resourceDetailDrawerStateSource).not.toContain('MonitoringAPI.');expect(resourceDetailDrawerHistoryStateSource).toContain('createResource(');@@ -193,6 +194,7 @@ describe('ResourceDetailDrawer change history section', () => {expect(resourceDetailDrawerOverviewSource).not.toContain('MonitoringAPI.');expect(resourceDetailDrawerOverviewSource).toContain('drawer.queueDockerUpdateCheck');expect(resourceDetailDrawerOverviewSource).toContain('drawer.queueDockerUpdateAll');+ expect(resourceDetailDrawerOverviewSource).toContain('Filter history');expect(resourceDetailDrawerOverviewSource).not.toContain('const modeLabel = formatSourceType(resource.sourceType);',);@@ -813,6 +815,10 @@ describe('ResourceDetailDrawer change history section', () => {const panel = within(historyPanel);expect(await panel.findByText('Changes loaded')).toBeInTheDocument();expect(panel.getByText('CPU spike detected')).toBeInTheDocument();+ expect(panel.queryByLabelText('Change kind')).toBeNull();+ expect(panel.getByRole('button', { name: 'Filter history' })).toBeInTheDocument();++ fireEvent.click(panel.getByRole('button', { name: 'Filter history' }));fireEvent.change(panel.getByLabelText('Change kind'), {target: { value: 'restart' },@@ -833,6 +839,8 @@ describe('ResourceDetailDrawer change history section', () => {expect(await panel.findByText('Timeline 2')).toBeInTheDocument();expect(panel.queryByText('Filtered changes loaded')).toBeNull();expect(panel.getByText('CPU spike detected')).toBeInTheDocument();+ expect(panel.queryByLabelText('Change kind')).toBeNull();+ expect(panel.getByRole('button', { name: 'Filter history' })).toBeInTheDocument();});it('filters timeline entries by source adapter', async () => {@@ -967,6 +975,9 @@ describe('ResourceDetailDrawer change history section', () => {const panel = within(historyPanel);expect(await panel.findByText('Changes loaded')).toBeInTheDocument();expect(panel.getByText('CPU spike detected')).toBeInTheDocument();+ expect(panel.queryByLabelText('Source adapter')).toBeNull();++ fireEvent.click(panel.getByRole('button', { name: 'Filter history' }));fireEvent.change(panel.getByLabelText('Source adapter'), {target: { value: 'docker_adapter' },diff --git a/frontend-modern/src/components/Infrastructure/useResourceDetailDrawerState.ts b/frontend-modern/src/components/Infrastructure/useResourceDetailDrawerState.tsindex b203ee9a80..d097b05c17 100644--- a/frontend-modern/src/components/Infrastructure/useResourceDetailDrawerState.ts+++ b/frontend-modern/src/components/Infrastructure/useResourceDetailDrawerState.ts@@ -21,6 +21,7 @@ export const useResourceDetailDrawerState = (options: UseResourceDetailDrawerStaconst [debugEnabled] = createLocalStorageBooleanSignal(STORAGE_KEYS.DEBUG_MODE, false);const [copied, setCopied] = createSignal(false);const [showReportModal, setShowReportModal] = createSignal(false);+ const [showHistoryFilters, setShowHistoryFilters] = createSignal(false);const [showAccessContext, setShowAccessContext] = createSignal(false);const [showInvestigationContext, setShowInvestigationContext] = createSignal(false);const [showCorrelationContext, setShowCorrelationContext] = createSignal(false);@@ -87,6 +88,8 @@ export const useResourceDetailDrawerState = (options: UseResourceDetailDrawerStacopied,showReportModal,setShowReportModal,+ showHistoryFilters,+ setShowHistoryFilters,showAccessContext,setShowAccessContext,showInvestigationContext,