diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx index fbbd885c1ff4..79edf9c63fc8 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx @@ -65,6 +65,7 @@ import { OverlayStart, NotificationsStart, ApplicationStart, + WorkspacesStart, } from 'src/core/public'; import { RedirectAppLinks } from '../../../../opensearch_dashboards_react/public'; import { IndexPatternsContract } from '../../../../data/public'; @@ -114,6 +115,7 @@ export interface SavedObjectsTableProps { goInspectObject: (obj: SavedObjectWithMetadata) => void; canGoInApp: (obj: SavedObjectWithMetadata) => boolean; dateFormat: string; + workspaces: WorkspacesStart; } export interface SavedObjectsTableState { diff --git a/src/plugins/saved_objects_management/public/management_section/saved_objects_table_page.tsx b/src/plugins/saved_objects_management/public/management_section/saved_objects_table_page.tsx index 09937388ba57..bd1842c9945f 100644 --- a/src/plugins/saved_objects_management/public/management_section/saved_objects_table_page.tsx +++ b/src/plugins/saved_objects_management/public/management_section/saved_objects_table_page.tsx @@ -88,6 +88,7 @@ const SavedObjectsTablePage = ({ overlays={coreStart.overlays} notifications={coreStart.notifications} applications={coreStart.application} + workspaces={coreStart.workspaces} perPageConfig={itemsPerPage} goInspectObject={(savedObject) => { const { editUrl } = savedObject.meta; diff --git a/src/plugins/saved_objects_management/server/routes/find.ts b/src/plugins/saved_objects_management/server/routes/find.ts index dd49fc7575df..4708e3ae5b5b 100644 --- a/src/plugins/saved_objects_management/server/routes/find.ts +++ b/src/plugins/saved_objects_management/server/routes/find.ts @@ -94,6 +94,16 @@ export const registerFindRoute = ( ...req.query, fields: undefined, searchFields: [...searchFields], + namespaces: req.query.namespaces + ? Array.isArray(req.query.namespaces) + ? req.query.namespaces + : [req.query.namespaces] + : undefined, + workspaces: req.query.workspaces + ? Array.isArray(req.query.workspaces) + ? req.query.workspaces + : [req.query.workspaces] + : undefined, }); const savedObjects = await Promise.all(