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.

Wire SavedViews into Storage with platform-scoped key

rcourtmane6e235a25aa7
diff --git a/frontend-modern/src/components/Storage/Storage.tsx b/frontend-modern/src/components/Storage/Storage.tsx
index ad6cc9b57d..5034bee83c 100644
--- a/frontend-modern/src/components/Storage/Storage.tsx
+++ b/frontend-modern/src/components/Storage/Storage.tsx
@@ -132,6 +132,15 @@ const Storage: Component<StorageProps> = (props) => {
}
});
+ // Namespace saved views per platform context. Standalone /storage uses the
+ // bare "storage" key; a platform-embedded storage tab (which forces a
+ // single source via forcedSourceFilter) gets its own scope so views
+ // saved on the Proxmox tab do not appear on /storage and vice versa.
+ const savedViewsKey = (() => {
+ const scope = (props.forcedSourceFilter ?? '').trim().toLowerCase();
+ return scope ? `storage-${scope}` : 'storage';
+ })();
+
return (
<div ref={setClearSurfaceRootRef} class="space-y-4" data-testid="storage-page">
<Show when={!props.embedded}>
@@ -194,6 +203,7 @@ const Storage: Component<StorageProps> = (props) => {
<div data-summary-clear-ignore>
<StoragePageControls
kioskMode={kioskMode}
+ savedViewsKey={savedViewsKey}
view={view}
setView={setView}
search={search}
diff --git a/frontend-modern/src/components/Storage/StoragePageControls.tsx b/frontend-modern/src/components/Storage/StoragePageControls.tsx
index 80204d9ba8..3ec63fa5b0 100644
--- a/frontend-modern/src/components/Storage/StoragePageControls.tsx
+++ b/frontend-modern/src/components/Storage/StoragePageControls.tsx
@@ -80,6 +80,11 @@ type StoragePageControlsProps = {
// matching the overview-page filter contract. Standalone /storage keeps
// the explicit Node filter so canonical node query links remain visible.
suppressNodeFilter?: boolean;
+ // Enables the SavedViews menu in the FilterBar. Caller is responsible for
+ // picking a key that namespaces views per platform context so saved
+ // queries from a platform-embedded tab do not leak into standalone
+ // /storage and vice versa.
+ savedViewsKey?: string;
};
const VIEW_TABS = STORAGE_VIEW_OPTIONS as { value: string; label: string }[];
@@ -294,6 +299,7 @@ export const StoragePageControls: Component<StoragePageControlsProps> = (props)
role="group"
ariaLabel={props.filterAriaLabel ?? 'Storage filters'}
isMobile={isMobile}
+ savedViewsKey={props.savedViewsKey}
search={{
value: props.search,
setValue: props.setSearch,