diff --git a/src/plugins/advanced_settings/public/management_app/components/page_wrapper/index.ts b/src/plugins/advanced_settings/public/management_app/components/page_wrapper/index.ts
new file mode 100644
index 000000000000..3cf0cdd26c99
--- /dev/null
+++ b/src/plugins/advanced_settings/public/management_app/components/page_wrapper/index.ts
@@ -0,0 +1,6 @@
+/*
+ * Copyright OpenSearch Contributors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export { PageWrapper } from './page_wrapper';
diff --git a/src/plugins/advanced_settings/public/management_app/components/page_wrapper/page_wrapper.tsx b/src/plugins/advanced_settings/public/management_app/components/page_wrapper/page_wrapper.tsx
new file mode 100644
index 000000000000..e0b725edc42d
--- /dev/null
+++ b/src/plugins/advanced_settings/public/management_app/components/page_wrapper/page_wrapper.tsx
@@ -0,0 +1,21 @@
+/*
+ * Copyright OpenSearch Contributors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { EuiPageContent } from '@elastic/eui';
+import React from 'react';
+
+export const PageWrapper = (props: { fullWidth?: boolean; children?: React.ReactChild }) => {
+ return (
+
+ );
+};
diff --git a/src/plugins/advanced_settings/public/management_app/mount_management_section.tsx b/src/plugins/advanced_settings/public/management_app/mount_management_section.tsx
index 7fa0b9ddd2c0..27245e31c376 100644
--- a/src/plugins/advanced_settings/public/management_app/mount_management_section.tsx
+++ b/src/plugins/advanced_settings/public/management_app/mount_management_section.tsx
@@ -34,11 +34,17 @@ import { Router, Switch, Route } from 'react-router-dom';
import { i18n } from '@osd/i18n';
import { I18nProvider } from '@osd/i18n/react';
-import { StartServicesAccessor } from 'src/core/public';
+import {
+ AppMountParameters,
+ ChromeBreadcrumb,
+ ScopedHistory,
+ StartServicesAccessor,
+} from 'src/core/public';
import { AdvancedSettings } from './advanced_settings';
-import { ManagementAppMountParams } from '../../../management/public';
import { ComponentRegistry } from '../types';
+import { reactRouterNavigate } from '../../../opensearch_dashboards_react/public';
+import { PageWrapper } from './components/page_wrapper';
import './index.scss';
@@ -57,13 +63,21 @@ const readOnlyBadge = {
iconType: 'glasses',
};
-export async function mountManagementSection(
+export async function mountAdvancedSettingsManagementSection(
getStartServices: StartServicesAccessor,
- params: ManagementAppMountParams,
+ params: AppMountParameters,
componentRegistry: ComponentRegistry['start']
) {
- params.setBreadcrumbs(crumb);
const [{ uiSettings, notifications, docLinks, application, chrome }] = await getStartServices();
+ const setBreadcrumbsScoped = (crumbs: ChromeBreadcrumb[] = []) => {
+ const wrapBreadcrumb = (item: ChromeBreadcrumb, scopedHistory: ScopedHistory) => ({
+ ...item,
+ ...(item.href ? reactRouterNavigate(scopedHistory, item.href) : {}),
+ });
+
+ chrome.setBreadcrumbs([...crumbs.map((item) => wrapBreadcrumb(item, params.history))]);
+ };
+ setBreadcrumbsScoped(crumb);
const canSave = application.capabilities.advancedSettings.save as boolean;
@@ -72,21 +86,23 @@ export async function mountManagementSection(
}
ReactDOM.render(
-
-
-
-
-
-
-
-
- ,
+
+
+
+
+
+
+
+
+
+
+ ,
params.element
);
return () => {
diff --git a/src/plugins/advanced_settings/public/plugin.ts b/src/plugins/advanced_settings/public/plugin.ts
index 608bfc6a25e7..91fe18612749 100644
--- a/src/plugins/advanced_settings/public/plugin.ts
+++ b/src/plugins/advanced_settings/public/plugin.ts
@@ -29,10 +29,11 @@
*/
import { i18n } from '@osd/i18n';
-import { CoreSetup, Plugin } from 'opensearch-dashboards/public';
+import { AppMountParameters, CoreSetup, Plugin } from 'opensearch-dashboards/public';
import { FeatureCatalogueCategory } from '../../home/public';
import { ComponentRegistry } from './component_registry';
import { AdvancedSettingsSetup, AdvancedSettingsStart, AdvancedSettingsPluginSetup } from './types';
+import { DEFAULT_APP_CATEGORIES } from '../../../core/public';
const component = new ComponentRegistry();
@@ -42,18 +43,21 @@ const title = i18n.translate('advancedSettings.advancedSettingsLabel', {
export class AdvancedSettingsPlugin
implements Plugin {
- public setup(core: CoreSetup, { management, home }: AdvancedSettingsPluginSetup) {
- const opensearchDashboardsSection = management.sections.section.opensearchDashboards;
-
- opensearchDashboardsSection.registerApp({
+ public setup(core: CoreSetup, { home }: AdvancedSettingsPluginSetup) {
+ core.application.register({
id: 'settings',
title,
- order: 3,
- async mount(params) {
- const { mountManagementSection } = await import(
+ order: 99,
+ category: DEFAULT_APP_CATEGORIES.management,
+ async mount(params: AppMountParameters) {
+ const { mountAdvancedSettingsManagementSection } = await import(
'./management_app/mount_management_section'
);
- return mountManagementSection(core.getStartServices, params, component.start);
+ return mountAdvancedSettingsManagementSection(
+ core.getStartServices,
+ params,
+ component.start
+ );
},
});
@@ -66,7 +70,7 @@ export class AdvancedSettingsPlugin
'Customize your OpenSearch Dashboards experience — change the date format, turn on dark mode, and more.',
}),
icon: 'gear',
- path: '/app/management/opensearch-dashboards/settings',
+ path: '/app/settings',
showOnHomePage: false,
category: FeatureCatalogueCategory.ADMIN,
});
diff --git a/src/plugins/data_source/server/saved_objects/data_source.ts b/src/plugins/data_source/server/saved_objects/data_source.ts
index 9404a4bcf371..58cace8ada2d 100644
--- a/src/plugins/data_source/server/saved_objects/data_source.ts
+++ b/src/plugins/data_source/server/saved_objects/data_source.ts
@@ -17,11 +17,11 @@ export const dataSource: SavedObjectsType = {
return obj.attributes.title;
},
getEditUrl(obj) {
- return `/management/opensearch-dashboards/dataSources/${encodeURIComponent(obj.id)}`;
+ return `/dataSources/${encodeURIComponent(obj.id)}`;
},
getInAppUrl(obj) {
return {
- path: `/app/management/opensearch-dashboards/dataSources/${encodeURIComponent(obj.id)}`,
+ path: `/app/dataSources/${encodeURIComponent(obj.id)}`,
uiCapabilitiesPath: 'management.opensearchDashboards.dataSources',
};
},
diff --git a/src/plugins/data_source_management/opensearch_dashboards.json b/src/plugins/data_source_management/opensearch_dashboards.json
index 58e81a337e7d..6b58c63bb5a5 100644
--- a/src/plugins/data_source_management/opensearch_dashboards.json
+++ b/src/plugins/data_source_management/opensearch_dashboards.json
@@ -3,7 +3,7 @@
"version": "opensearchDashboards",
"server": false,
"ui": true,
- "requiredPlugins": ["management", "dataSource", "indexPatternManagement"],
+ "requiredPlugins": ["dataSource", "indexPatternManagement"],
"optionalPlugins": [],
"requiredBundles": ["opensearchDashboardsReact"],
"extraPublicDirs": ["public/components/utils"]
diff --git a/src/plugins/data_source_management/public/components/data_source_column/data_source_column.tsx b/src/plugins/data_source_management/public/components/data_source_column/data_source_column.tsx
index 640eb1b369fd..cd6fc7c17ae2 100644
--- a/src/plugins/data_source_management/public/components/data_source_column/data_source_column.tsx
+++ b/src/plugins/data_source_management/public/components/data_source_column/data_source_column.tsx
@@ -56,11 +56,7 @@ export class DataSourceColumn implements IndexPatternTableColumn
?.map((dataSource) => {
return {
...dataSource,
- relativeUrl: basePath.prepend(
- `/app/management/opensearch-dashboards/dataSources/${encodeURIComponent(
- dataSource.id
- )}`
- ),
+ relativeUrl: basePath.prepend(`/app/dataSources/${encodeURIComponent(dataSource.id)}`),
};
})
?.reduce(
diff --git a/src/plugins/data_source_management/public/components/page_wrapper/index.ts b/src/plugins/data_source_management/public/components/page_wrapper/index.ts
new file mode 100644
index 000000000000..3cf0cdd26c99
--- /dev/null
+++ b/src/plugins/data_source_management/public/components/page_wrapper/index.ts
@@ -0,0 +1,6 @@
+/*
+ * Copyright OpenSearch Contributors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export { PageWrapper } from './page_wrapper';
diff --git a/src/plugins/data_source_management/public/components/page_wrapper/page_wrapper.tsx b/src/plugins/data_source_management/public/components/page_wrapper/page_wrapper.tsx
new file mode 100644
index 000000000000..e0b725edc42d
--- /dev/null
+++ b/src/plugins/data_source_management/public/components/page_wrapper/page_wrapper.tsx
@@ -0,0 +1,21 @@
+/*
+ * Copyright OpenSearch Contributors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { EuiPageContent } from '@elastic/eui';
+import React from 'react';
+
+export const PageWrapper = (props: { fullWidth?: boolean; children?: React.ReactChild }) => {
+ return (
+
+ );
+};
diff --git a/src/plugins/data_source_management/public/management_app/index.ts b/src/plugins/data_source_management/public/management_app/index.ts
index 5ccbfb947646..960adc7ba5a6 100644
--- a/src/plugins/data_source_management/public/management_app/index.ts
+++ b/src/plugins/data_source_management/public/management_app/index.ts
@@ -3,4 +3,4 @@
* SPDX-License-Identifier: Apache-2.0
*/
-export { mountManagementSection } from './mount_management_section';
+export { mountDataSourcesManagementSection } from './mount_management_section';
diff --git a/src/plugins/data_source_management/public/management_app/mount_management_section.tsx b/src/plugins/data_source_management/public/management_app/mount_management_section.tsx
index 9fe1f2406382..f61113042458 100644
--- a/src/plugins/data_source_management/public/management_app/mount_management_section.tsx
+++ b/src/plugins/data_source_management/public/management_app/mount_management_section.tsx
@@ -3,33 +3,42 @@
* SPDX-License-Identifier: Apache-2.0
*/
-import { StartServicesAccessor } from 'src/core/public';
+import {
+ AppMountParameters,
+ ChromeBreadcrumb,
+ ScopedHistory,
+ StartServicesAccessor,
+} from 'src/core/public';
import { I18nProvider } from '@osd/i18n/react';
import React from 'react';
import ReactDOM from 'react-dom';
import { Route, Router, Switch } from 'react-router-dom';
-import { DataPublicPluginStart } from 'src/plugins/data/public';
-import { ManagementAppMountParams } from '../../../management/public';
-
import { OpenSearchDashboardsContextProvider } from '../../../opensearch_dashboards_react/public';
import { CreateDataSourceWizardWithRouter } from '../components/create_data_source_wizard';
import { DataSourceTableWithRouter } from '../components/data_source_table';
-import { DataSourceManagementContext } from '../types';
+import { DataSourceManagementContext, DataSourceManagementStartDependencies } from '../types';
import { EditDataSourceWithRouter } from '../components/edit_data_source';
+import { PageWrapper } from '../components/page_wrapper';
+import { reactRouterNavigate } from '../../../opensearch_dashboards_react/public';
-export interface DataSourceManagementStartDependencies {
- data: DataPublicPluginStart;
-}
-
-export async function mountManagementSection(
+export async function mountDataSourcesManagementSection(
getStartServices: StartServicesAccessor,
- params: ManagementAppMountParams
+ params: AppMountParameters
) {
const [
{ chrome, application, savedObjects, uiSettings, notifications, overlays, http, docLinks },
] = await getStartServices();
+ const setBreadcrumbsScoped = (crumbs: ChromeBreadcrumb[] = []) => {
+ const wrapBreadcrumb = (item: ChromeBreadcrumb, scopedHistory: ScopedHistory) => ({
+ ...item,
+ ...(item.href ? reactRouterNavigate(scopedHistory, item.href) : {}),
+ });
+
+ chrome.setBreadcrumbs([...crumbs.map((item) => wrapBreadcrumb(item, params.history))]);
+ };
+
const deps: DataSourceManagementContext = {
chrome,
application,
@@ -39,27 +48,29 @@ export async function mountManagementSection(
overlays,
http,
docLinks,
- setBreadcrumbs: params.setBreadcrumbs,
+ setBreadcrumbs: setBreadcrumbsScoped,
};
ReactDOM.render(
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ,
params.element
);
diff --git a/src/plugins/data_source_management/public/plugin.ts b/src/plugins/data_source_management/public/plugin.ts
index 941107d74638..d0c900effce2 100644
--- a/src/plugins/data_source_management/public/plugin.ts
+++ b/src/plugins/data_source_management/public/plugin.ts
@@ -3,13 +3,21 @@
* SPDX-License-Identifier: Apache-2.0
*/
-import { CoreSetup, CoreStart, Plugin } from '../../../core/public';
+import {
+ AppMountParameters,
+ CoreSetup,
+ CoreStart,
+ DEFAULT_APP_CATEGORIES,
+ Plugin,
+ StartServicesAccessor,
+} from '../../../core/public';
import { PLUGIN_NAME } from '../common';
import { ManagementSetup } from '../../management/public';
import { IndexPatternManagementSetup } from '../../index_pattern_management/public';
import { DataSourceColumn } from './components/data_source_column/data_source_column';
+import { DataSourceManagementStartDependencies } from './types';
export interface DataSourceManagementSetupDependencies {
management: ManagementSetup;
@@ -20,16 +28,7 @@ const DSM_APP_ID = 'dataSources';
export class DataSourceManagementPlugin
implements Plugin {
- public setup(
- core: CoreSetup,
- { management, indexPatternManagement }: DataSourceManagementSetupDependencies
- ) {
- const opensearchDashboardsSection = management.sections.section.opensearchDashboards;
-
- if (!opensearchDashboardsSection) {
- throw new Error('`opensearchDashboards` management section not found.');
- }
-
+ public setup(core: CoreSetup, { indexPatternManagement }: DataSourceManagementSetupDependencies) {
const savedObjectPromise = core
.getStartServices()
.then(([coreStart]) => coreStart.savedObjects);
@@ -37,14 +36,18 @@ export class DataSourceManagementPlugin
const column = new DataSourceColumn(savedObjectPromise, httpPromise);
indexPatternManagement.columns.register(column);
- opensearchDashboardsSection.registerApp({
+ core.application.register({
id: DSM_APP_ID,
title: PLUGIN_NAME,
order: 1,
- mount: async (params) => {
- const { mountManagementSection } = await import('./management_app');
-
- return mountManagementSection(core.getStartServices, params);
+ category: DEFAULT_APP_CATEGORIES.opensearchDashboards,
+ mount: async (params: AppMountParameters) => {
+ const { mountDataSourcesManagementSection } = await import('./management_app');
+
+ return mountDataSourcesManagementSection(
+ core.getStartServices as StartServicesAccessor,
+ params
+ );
},
});
}
diff --git a/src/plugins/data_source_management/public/types.ts b/src/plugins/data_source_management/public/types.ts
index 1bede8fbfca9..be2b7725d7ed 100644
--- a/src/plugins/data_source_management/public/types.ts
+++ b/src/plugins/data_source_management/public/types.ts
@@ -14,6 +14,7 @@ import {
HttpSetup,
} from 'src/core/public';
import { ManagementAppMountParams } from 'src/plugins/management/public';
+import { DataPublicPluginStart } from 'src/plugins/data/public';
import { SavedObjectAttributes } from 'src/core/types';
import { i18n } from '@osd/i18n';
import { SigV4ServiceName } from '../../data_source/common/data_sources';
@@ -115,3 +116,7 @@ export interface SigV4Content extends SavedObjectAttributes {
region: string;
service?: SigV4ServiceName;
}
+
+export interface DataSourceManagementStartDependencies {
+ data: DataPublicPluginStart;
+}
diff --git a/src/plugins/saved_objects_management/README.md b/src/plugins/saved_objects_management/README.md
index 4afae978c258..652c0149b8df 100644
--- a/src/plugins/saved_objects_management/README.md
+++ b/src/plugins/saved_objects_management/README.md
@@ -1,20 +1,20 @@
# Saved objects management
-Provides a UI (via the `management` plugin) to find and manage all saved objects in one place (you can see the primary page by navigating to `/app/management/opensearch-dashboards/objects`). Not to be confused with the `savedObjects` plugin, which provides all the core capabilities of saved objects.
+Provides a UI (via the `management` plugin) to find and manage all saved objects in one place (you can see the primary page by navigating to `/app/objects`). Not to be confused with the `savedObjects` plugin, which provides all the core capabilities of saved objects.
From the primary UI page, this plugin allows you to:
1. Search/view/delete saved objects and their relationships
2. Import/export saved objects
3. Inspect/edit raw saved object values without validation
-For 3., this plugin can also be used to provide a route/page for editing, such as `/app/management/opensearch-dashboards/objects/savedVisualizations/{visualizationId}`, although plugins are also free to provide or host alternate routes for this purpose (see index patterns, for instance, which provide their own integration and UI via the `management` plugin directly).
+For 3., this plugin can also be used to provide a route/page for editing, such as `/app/objects/savedVisualizations/{visualizationId}`, although plugins are also free to provide or host alternate routes for this purpose (see index patterns, for instance, which provide their own integration and UI via the `management` plugin directly).
## Making a new saved object type manageable
1. Create a new `SavedObjectsType` or add the `management` property to an existing one. (See [`SavedObjectsTypeManagementDefinition`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/e1380f14deb98cc7cce55c3b82c2d501826a78c3/src/core/server/saved_objects/types.ts#L247-L285) for explanation of its properties)
2. Register saved object type via `core.savedObjects.registerType(...)` as part of plugin server setup method
3. Implement a way to save the object (e.g. via `savedObjectsClient.create(...)` or a `savedObjectLoader`)
-4. After these steps, you should be able to save objects and view/search for them in Saved Objects management (`/app/management/opensearch-dashboards/objects`)
+4. After these steps, you should be able to save objects and view/search for them in Saved Objects management (`/app/objects`)
## Enabling edit links from saved objects management
@@ -25,7 +25,7 @@ For 3., this plugin can also be used to provide a route/page for editing, such a
## Using saved objects management to inspect/edit new plugin objects
-You'll notice that when clicking on the "Inspect" button from the saved objects management table, you'll usually be routed to something like `/app/management/opensearch-dashboards/objects/savedVisualizations/` (where the route itself is determined by the `management.getEditUrl` method of the `SavedObjectsType`). But to register a similar route for a new saved object type, you'll need to create a new `savedObjectLoader` and register it with the management plugin.
+You'll notice that when clicking on the "Inspect" button from the saved objects management table, you'll usually be routed to something like `/app/objects/savedVisualizations/` (where the route itself is determined by the `management.getEditUrl` method of the `SavedObjectsType`). But to register a similar route for a new saved object type, you'll need to create a new `savedObjectLoader` and register it with the management plugin.
### Creating `savedObjectLoader`
diff --git a/src/plugins/saved_objects_management/public/constants.ts b/src/plugins/saved_objects_management/public/constants.ts
new file mode 100644
index 000000000000..d893ab72b8f9
--- /dev/null
+++ b/src/plugins/saved_objects_management/public/constants.ts
@@ -0,0 +1,41 @@
+/*
+ * Copyright OpenSearch Contributors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { i18n } from '@osd/i18n';
+
+export const MANAGE_LIBRARY_TITLE_WORDINGS = i18n.translate(
+ 'savedObjectsManagement.manageLibrary',
+ {
+ defaultMessage: 'Manage library',
+ }
+);
+
+export const ALL_LIBRARY_OBJECTS_TITLE_WORDINGS = i18n.translate(
+ 'savedObjectsManagement.objectsTable.header.allLibraryObjectsTitle',
+ {
+ defaultMessage: 'Library objects in Analytics',
+ }
+);
+
+export const SAVED_OBJECT_MANAGEMENT_TITLE_WORDINGS = i18n.translate(
+ 'savedObjectsManagement.objectsTable.header.savedObjectsTitle',
+ {
+ defaultMessage: 'Saved Objects',
+ }
+);
+
+export const SAVED_SEARCHES_WORDINGS = i18n.translate(
+ 'savedObjectsManagement.SearchesManagementSectionLabel',
+ {
+ defaultMessage: 'Saved searches',
+ }
+);
+
+export const SAVED_QUERIES_WORDINGS = i18n.translate(
+ 'savedObjectsManagement.QueriesManagementSectionLabel',
+ {
+ defaultMessage: 'Saved filters',
+ }
+);
diff --git a/src/plugins/saved_objects_management/public/management_section/mount_section.tsx b/src/plugins/saved_objects_management/public/management_section/mount_section.tsx
index a1c7b5343eb1..002a95498058 100644
--- a/src/plugins/saved_objects_management/public/management_section/mount_section.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/mount_section.tsx
@@ -32,10 +32,9 @@ import React, { lazy, Suspense } from 'react';
import ReactDOM from 'react-dom';
import { Router, Switch, Route } from 'react-router-dom';
import { I18nProvider } from '@osd/i18n/react';
-import { i18n } from '@osd/i18n';
import { EuiLoadingSpinner } from '@elastic/eui';
-import { CoreSetup } from 'src/core/public';
-import { ManagementAppMountParams } from '../../../management/public';
+import { AppMountParameters, CoreSetup } from 'src/core/public';
+import { ManagementAppMountParams } from 'src/plugins/management/public';
import { StartDependencies, SavedObjectsManagementPluginStart } from '../plugin';
import { ISavedObjectsManagementServiceRegistry } from '../services';
import { getAllowedTypes } from './../lib';
@@ -43,24 +42,29 @@ import { getAllowedTypes } from './../lib';
interface MountParams {
core: CoreSetup;
serviceRegistry: ISavedObjectsManagementServiceRegistry;
- mountParams: ManagementAppMountParams;
+ mountParams?: ManagementAppMountParams;
+ appMountParams?: AppMountParameters;
+ title: string;
+ allowedObjectTypes?: string[];
+ fullWidth?: boolean;
}
-let allowedObjectTypes: string[] | undefined;
-
-const title = i18n.translate('savedObjectsManagement.objects.savedObjectsTitle', {
- defaultMessage: 'Saved Objects',
-});
-
const SavedObjectsEditionPage = lazy(() => import('./saved_objects_edition_page'));
const SavedObjectsTablePage = lazy(() => import('./saved_objects_table_page'));
export const mountManagementSection = async ({
core,
mountParams,
+ appMountParams,
serviceRegistry,
+ title,
+ allowedObjectTypes,
+ fullWidth = true,
}: MountParams) => {
const [coreStart, { data, uiActions }, pluginStart] = await core.getStartServices();
- const { element, history, setBreadcrumbs } = mountParams;
+ const usedMountParams = mountParams || appMountParams || ({} as ManagementAppMountParams);
+ const { element, history } = usedMountParams;
+ const { chrome } = coreStart;
+ const setBreadcrumbs = mountParams?.setBreadcrumbs || chrome.setBreadcrumbs;
if (allowedObjectTypes === undefined) {
allowedObjectTypes = await getAllowedTypes(coreStart.http);
}
@@ -108,6 +112,8 @@ export const mountManagementSection = async ({
namespaceRegistry={pluginStart.namespaces}
allowedTypes={allowedObjectTypes}
setBreadcrumbs={setBreadcrumbs}
+ title={title}
+ fullWidth={fullWidth}
/>
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/header.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/header.tsx
index a22e349d5240..9d46f1cca67c 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/header.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/header.tsx
@@ -45,22 +45,19 @@ export const Header = ({
onImport,
onRefresh,
filteredCount,
+ title,
}: {
onExportAll: () => void;
onImport: () => void;
onRefresh: () => void;
filteredCount: number;
+ title: string;
}) => (
-
-
-
+ {title}
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/relationships.test.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/relationships.test.tsx
index 1f21e5990c74..5afdbacf6dff 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/relationships.test.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/relationships.test.tsx
@@ -53,7 +53,7 @@ describe('Relationships', () => {
id: '1',
relationship: 'parent',
meta: {
- editUrl: '/management/opensearch-dashboards/objects/savedSearches/1',
+ editUrl: '/objects/savedSearches/1',
icon: 'search',
inAppUrl: {
path: '/app/discover#//1',
@@ -67,7 +67,7 @@ describe('Relationships', () => {
id: '2',
relationship: 'parent',
meta: {
- editUrl: '/management/opensearch-dashboards/objects/savedVisualizations/2',
+ editUrl: '/objects/savedVisualizations/2',
icon: 'visualizeApp',
inAppUrl: {
path: '/app/visualize#/edit/2',
@@ -85,9 +85,9 @@ describe('Relationships', () => {
meta: {
title: 'MyIndexPattern*',
icon: 'indexPatternApp',
- editUrl: '#/management/opensearch-dashboards/indexPatterns/patterns/1',
+ editUrl: '#/indexPatterns/patterns/1',
inAppUrl: {
- path: '/management/opensearch-dashboards/indexPatterns/patterns/1',
+ path: '/indexPatterns/patterns/1',
uiCapabilitiesPath: 'management.opensearchDashboards.indexPatterns',
},
},
@@ -120,10 +120,10 @@ describe('Relationships', () => {
id: '1',
relationship: 'child',
meta: {
- editUrl: '/management/opensearch-dashboards/indexPatterns/patterns/1',
+ editUrl: '/indexPatterns/patterns/1',
icon: 'indexPatternApp',
inAppUrl: {
- path: '/app/management/opensearch-dashboards/indexPatterns/patterns/1',
+ path: '/app/indexPatterns/patterns/1',
uiCapabilitiesPath: 'management.opensearchDashboards.indexPatterns',
},
title: 'My Index Pattern',
@@ -134,7 +134,7 @@ describe('Relationships', () => {
id: '2',
relationship: 'parent',
meta: {
- editUrl: '/management/opensearch-dashboards/objects/savedVisualizations/2',
+ editUrl: '/objects/savedVisualizations/2',
icon: 'visualizeApp',
inAppUrl: {
path: '/app/visualize#/edit/2',
@@ -152,7 +152,7 @@ describe('Relationships', () => {
meta: {
title: 'MySearch',
icon: 'search',
- editUrl: '/management/opensearch-dashboards/objects/savedSearches/1',
+ editUrl: '/objects/savedSearches/1',
inAppUrl: {
path: '/discover/1',
uiCapabilitiesPath: 'discover.show',
@@ -187,7 +187,7 @@ describe('Relationships', () => {
id: '1',
relationship: 'parent',
meta: {
- editUrl: '/management/opensearch-dashboards/objects/savedDashboards/1',
+ editUrl: '/objects/savedDashboards/1',
icon: 'dashboardApp',
inAppUrl: {
path: '/app/opensearch-dashboards#/dashboard/1',
@@ -201,7 +201,7 @@ describe('Relationships', () => {
id: '2',
relationship: 'parent',
meta: {
- editUrl: '/management/opensearch-dashboards/objects/savedDashboards/2',
+ editUrl: '/objects/savedDashboards/2',
icon: 'dashboardApp',
inAppUrl: {
path: '/app/opensearch-dashboards#/dashboard/2',
@@ -219,7 +219,7 @@ describe('Relationships', () => {
meta: {
title: 'MyViz',
icon: 'visualizeApp',
- editUrl: '/management/opensearch-dashboards/objects/savedVisualizations/1',
+ editUrl: '/objects/savedVisualizations/1',
inAppUrl: {
path: '/edit/1',
uiCapabilitiesPath: 'visualize.show',
@@ -256,7 +256,7 @@ describe('Relationships', () => {
meta: {
title: 'MyViz',
icon: 'visualizeApp',
- editUrl: '/management/opensearch-dashboards/objects/savedVisualizations/1',
+ editUrl: '/objects/savedVisualizations/1',
inAppUrl: {
path: '/edit/1',
uiCapabilitiesPath: 'visualize.show',
@@ -272,7 +272,7 @@ describe('Relationships', () => {
meta: {
title: 'MyAugmentVisObject',
icon: 'savedObject',
- editUrl: '/management/opensearch-dashboards/objects/savedAugmentVis/1',
+ editUrl: '/objects/savedAugmentVis/1',
},
},
close: jest.fn(),
@@ -303,7 +303,7 @@ describe('Relationships', () => {
id: '1',
relationship: 'child',
meta: {
- editUrl: '/management/opensearch-dashboards/objects/savedVisualizations/1',
+ editUrl: '/objects/savedVisualizations/1',
icon: 'visualizeApp',
inAppUrl: {
path: '/app/visualize#/edit/1',
@@ -317,7 +317,7 @@ describe('Relationships', () => {
id: '2',
relationship: 'child',
meta: {
- editUrl: '/management/opensearch-dashboards/objects/savedVisualizations/2',
+ editUrl: '/objects/savedVisualizations/2',
icon: 'visualizeApp',
inAppUrl: {
path: '/app/visualize#/edit/2',
@@ -335,7 +335,7 @@ describe('Relationships', () => {
meta: {
title: 'MyDashboard',
icon: 'dashboardApp',
- editUrl: '/management/opensearch-dashboards/objects/savedDashboards/1',
+ editUrl: '/objects/savedDashboards/1',
inAppUrl: {
path: '/dashboard/1',
uiCapabilitiesPath: 'dashboard.show',
@@ -375,7 +375,7 @@ describe('Relationships', () => {
meta: {
title: 'MyDashboard',
icon: 'dashboardApp',
- editUrl: '/management/opensearch-dashboards/objects/savedDashboards/1',
+ editUrl: '/objects/savedDashboards/1',
inAppUrl: {
path: '/dashboard/1',
uiCapabilitiesPath: 'dashboard.show',
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 2f78f307d165..cf0ac5e0d94c 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
@@ -114,6 +114,8 @@ export interface SavedObjectsTableProps {
goInspectObject: (obj: SavedObjectWithMetadata) => void;
canGoInApp: (obj: SavedObjectWithMetadata) => boolean;
dateFormat: string;
+ title: string;
+ fullWidth: boolean;
}
export interface SavedObjectsTableState {
@@ -543,9 +545,7 @@ export class SavedObjectsTable extends Component
+
{this.renderFlyout()}
{this.renderRelationships()}
{this.renderDeleteConfirmModal()}
@@ -857,6 +860,7 @@ export class SavedObjectsTable extends Component
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..39031a796b12 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
@@ -30,13 +30,13 @@
import React, { useEffect } from 'react';
import { get } from 'lodash';
-import { i18n } from '@osd/i18n';
import { CoreStart, ChromeBreadcrumb } from 'src/core/public';
import { DataPublicPluginStart } from '../../../data/public';
import {
ISavedObjectsManagementServiceRegistry,
SavedObjectsManagementActionServiceStart,
SavedObjectsManagementColumnServiceStart,
+ SavedObjectsManagementNamespaceServiceStart,
} from '../services';
import { SavedObjectsTable } from './objects_table';
@@ -49,6 +49,8 @@ const SavedObjectsTablePage = ({
columnRegistry,
namespaceRegistry,
setBreadcrumbs,
+ title,
+ fullWidth,
}: {
coreStart: CoreStart;
dataStart: DataPublicPluginStart;
@@ -58,6 +60,8 @@ const SavedObjectsTablePage = ({
columnRegistry: SavedObjectsManagementColumnServiceStart;
namespaceRegistry: SavedObjectsManagementNamespaceServiceStart;
setBreadcrumbs: (crumbs: ChromeBreadcrumb[]) => void;
+ title: string;
+ fullWidth: boolean;
}) => {
const capabilities = coreStart.application.capabilities;
const itemsPerPage = coreStart.uiSettings.get('savedObjects:perPage', 50);
@@ -66,13 +70,11 @@ const SavedObjectsTablePage = ({
useEffect(() => {
setBreadcrumbs([
{
- text: i18n.translate('savedObjectsManagement.breadcrumb.index', {
- defaultMessage: 'Saved objects',
- }),
- href: '/',
+ text: title,
+ href: undefined,
},
]);
- }, [setBreadcrumbs]);
+ }, [setBreadcrumbs, title]);
return (
);
};
diff --git a/src/plugins/saved_objects_management/public/plugin.ts b/src/plugins/saved_objects_management/public/plugin.ts
index 14beb73386a8..a7e1c0d1a1cb 100644
--- a/src/plugins/saved_objects_management/public/plugin.ts
+++ b/src/plugins/saved_objects_management/public/plugin.ts
@@ -29,7 +29,7 @@
*/
import { i18n } from '@osd/i18n';
-import { CoreSetup, CoreStart, Plugin } from 'src/core/public';
+import { AppMountParameters, CoreSetup, CoreStart, Plugin } from 'src/core/public';
import { VisBuilderStart } from '../../vis_builder/public';
import { ManagementSetup } from '../../management/public';
@@ -55,6 +55,12 @@ import {
} from './services';
import { registerServices } from './register_services';
import { bootstrap } from './ui_actions_bootstrap';
+import { DEFAULT_APP_CATEGORIES } from '../../../core/public';
+import {
+ MANAGE_LIBRARY_TITLE_WORDINGS,
+ SAVED_QUERIES_WORDINGS,
+ SAVED_SEARCHES_WORDINGS,
+} from './constants';
export interface SavedObjectsManagementPluginSetup {
actions: SavedObjectsManagementActionServiceSetup;
@@ -98,9 +104,71 @@ export class SavedObjectsManagementPlugin
private namespaceService = new SavedObjectsManagementNamespaceService();
private serviceRegistry = new SavedObjectsManagementServiceRegistry();
+ private registerLibrarySubApp(
+ coreSetup: CoreSetup
+ ) {
+ const core = coreSetup;
+ const mountWrapper = ({
+ title,
+ allowedObjectTypes,
+ }: {
+ title: string;
+ allowedObjectTypes?: string[];
+ }) => async (appMountParams: AppMountParameters) => {
+ const { mountManagementSection } = await import('./management_section');
+ return mountManagementSection({
+ core,
+ serviceRegistry: this.serviceRegistry,
+ appMountParams,
+ title,
+ allowedObjectTypes,
+ fullWidth: false,
+ });
+ };
+
+ /**
+ * Register saved objects overview & saved search & saved query here
+ */
+ core.application.register({
+ id: 'objects_all',
+ appRoute: '/app/objects',
+ exactRoute: true,
+ title: MANAGE_LIBRARY_TITLE_WORDINGS,
+ order: 10000,
+ category: DEFAULT_APP_CATEGORIES.opensearchDashboards,
+ mount: mountWrapper({
+ title: MANAGE_LIBRARY_TITLE_WORDINGS,
+ }),
+ });
+
+ core.application.register({
+ id: 'objects_searches',
+ appRoute: '/app/objects/search',
+ title: SAVED_SEARCHES_WORDINGS,
+ order: 8000,
+ category: DEFAULT_APP_CATEGORIES.opensearchDashboards,
+ mount: mountWrapper({
+ title: SAVED_SEARCHES_WORDINGS,
+ allowedObjectTypes: ['search'],
+ }),
+ });
+
+ core.application.register({
+ id: 'objects_query',
+ appRoute: '/app/objects/query',
+ title: SAVED_QUERIES_WORDINGS,
+ order: 8001,
+ category: DEFAULT_APP_CATEGORIES.opensearchDashboards,
+ mount: mountWrapper({
+ title: SAVED_QUERIES_WORDINGS,
+ allowedObjectTypes: ['query'],
+ }),
+ });
+ }
+
public setup(
core: CoreSetup,
- { home, management, uiActions }: SetupDependencies
+ { home, uiActions }: SetupDependencies
): SavedObjectsManagementPluginSetup {
const actionSetup = this.actionService.setup();
const columnSetup = this.columnService.setup();
@@ -117,35 +185,20 @@ export class SavedObjectsManagementPlugin
'Import, export, and manage your saved searches, visualizations, and dashboards.',
}),
icon: 'savedObjectsApp',
- path: '/app/management/opensearch-dashboards/objects',
+ path: '/app/objects',
showOnHomePage: false,
category: FeatureCatalogueCategory.ADMIN,
});
}
- const opensearchDashboardsSection = management.sections.section.opensearchDashboards;
- opensearchDashboardsSection.registerApp({
- id: 'objects',
- title: i18n.translate('savedObjectsManagement.managementSectionLabel', {
- defaultMessage: 'Saved objects',
- }),
- order: 1,
- mount: async (mountParams) => {
- const { mountManagementSection } = await import('./management_section');
- return mountManagementSection({
- core,
- serviceRegistry: this.serviceRegistry,
- mountParams,
- });
- },
- });
-
// sets up the context mappings and registers any triggers/actions for the plugin
bootstrap(uiActions);
// depends on `getStartServices`, should not be awaited
registerServices(this.serviceRegistry, core.getStartServices);
+ this.registerLibrarySubApp(core);
+
return {
actions: actionSetup,
columns: columnSetup,
diff --git a/test/functional/apps/dashboard/create_and_add_embeddables.js b/test/functional/apps/dashboard/create_and_add_embeddables.js
index 3b6e8a243556..6701ae0fc94c 100644
--- a/test/functional/apps/dashboard/create_and_add_embeddables.js
+++ b/test/functional/apps/dashboard/create_and_add_embeddables.js
@@ -112,8 +112,7 @@ export default function ({ getService, getPageObjects }) {
describe('is false', () => {
before(async () => {
- await PageObjects.header.clickStackManagement();
- await PageObjects.settings.clickOpenSearchDashboardsSettings();
+ await PageObjects.common.navigateToApp('settings');
await PageObjects.settings.toggleAdvancedSettingCheckbox(VISUALIZE_ENABLE_LABS_SETTING);
});
@@ -127,8 +126,7 @@ export default function ({ getService, getPageObjects }) {
});
after(async () => {
- await PageObjects.header.clickStackManagement();
- await PageObjects.settings.clickOpenSearchDashboardsSettings();
+ await PageObjects.settings.navigateTo();
await PageObjects.settings.clearAdvancedSettings(VISUALIZE_ENABLE_LABS_SETTING);
await PageObjects.header.clickDashboard();
});
diff --git a/test/functional/apps/dashboard/time_zones.js b/test/functional/apps/dashboard/time_zones.js
index 13a424bd7ea6..7c3e2f162779 100644
--- a/test/functional/apps/dashboard/time_zones.js
+++ b/test/functional/apps/dashboard/time_zones.js
@@ -51,7 +51,6 @@ export default function ({ getService, getPageObjects }) {
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsSavedObjects();
await PageObjects.savedObjects.importFile(
path.join(__dirname, 'exports', 'timezonetest_6_2_4.json')
@@ -75,7 +74,6 @@ export default function ({ getService, getPageObjects }) {
it('Changing timezone changes dashboard timestamp and shows the same data', async () => {
await PageObjects.settings.navigateTo();
- await PageObjects.settings.clickOpenSearchDashboardsSettings();
await PageObjects.settings.setAdvancedSettingsSelect('dateFormat:tz', 'Etc/GMT+5');
await PageObjects.common.navigateToApp('dashboard');
await PageObjects.dashboard.loadSavedDashboard('time zone test');
diff --git a/test/functional/apps/management/_import_objects.js b/test/functional/apps/management/_import_objects.js
index 2c432964f309..50700a12b718 100644
--- a/test/functional/apps/management/_import_objects.js
+++ b/test/functional/apps/management/_import_objects.js
@@ -46,7 +46,6 @@ export default function ({ getService, getPageObjects }) {
beforeEach(async function () {
// delete .kibana index and then wait for OpenSearch Dashboards to re-create it
await opensearchDashboardsServer.uiSettings.replace({});
- await PageObjects.settings.navigateTo();
await opensearchArchiver.load('management');
await PageObjects.settings.clickOpenSearchDashboardsSavedObjects();
});
@@ -215,7 +214,6 @@ export default function ({ getService, getPageObjects }) {
beforeEach(async function () {
// delete .kibana index and then wait for OpenSearch Dashboards to re-create it
await opensearchDashboardsServer.uiSettings.replace({});
- await PageObjects.settings.navigateTo();
await opensearchArchiver.load('saved_objects_imports');
await PageObjects.settings.clickOpenSearchDashboardsSavedObjects();
});
diff --git a/test/functional/apps/management/_mgmt_import_saved_objects.js b/test/functional/apps/management/_mgmt_import_saved_objects.js
index 631b4e85cb8b..fe19eb141b9c 100644
--- a/test/functional/apps/management/_mgmt_import_saved_objects.js
+++ b/test/functional/apps/management/_mgmt_import_saved_objects.js
@@ -42,7 +42,6 @@ export default function ({ getService, getPageObjects }) {
beforeEach(async function () {
await opensearchArchiver.load('empty_opensearch_dashboards');
await opensearchArchiver.load('discover');
- await PageObjects.settings.navigateTo();
});
afterEach(async function () {
diff --git a/test/functional/apps/management/_opensearch_dashboards_settings.js b/test/functional/apps/management/_opensearch_dashboards_settings.js
index 98cda687e23b..637f7073d517 100644
--- a/test/functional/apps/management/_opensearch_dashboards_settings.js
+++ b/test/functional/apps/management/_opensearch_dashboards_settings.js
@@ -40,11 +40,9 @@ export default function ({ getService, getPageObjects }) {
// delete .kibana index and then wait for OpenSearch Dashboards to re-create it
await opensearchDashboardsServer.uiSettings.replace({});
await PageObjects.settings.createIndexPattern('logstash-*');
- await PageObjects.settings.navigateTo();
});
after(async function afterAll() {
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.removeLogstashIndexPatternIfExist();
});
@@ -90,7 +88,6 @@ export default function ({ getService, getPageObjects }) {
});
it('setting to true change is preserved', async function () {
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsSettings();
await PageObjects.settings.toggleAdvancedSettingCheckbox('state:storeInSessionStorage');
const storeInSessionStorage = await PageObjects.settings.getAdvancedSettingCheckbox(
@@ -113,8 +110,7 @@ export default function ({ getService, getPageObjects }) {
it("changing 'state:storeInSessionStorage' also takes effect without full page reload", async () => {
await PageObjects.dashboard.preserveCrossAppState();
- await PageObjects.header.clickStackManagement();
- await PageObjects.settings.clickOpenSearchDashboardsSettings();
+ await PageObjects.settings.navigateTo();
await PageObjects.settings.toggleAdvancedSettingCheckbox('state:storeInSessionStorage');
await PageObjects.header.clickDashboard();
const [globalState, appState] = await getStateFromUrl();
diff --git a/test/functional/apps/management/_scripted_fields.js b/test/functional/apps/management/_scripted_fields.js
index fd290ce76b8a..f0b69344c472 100644
--- a/test/functional/apps/management/_scripted_fields.js
+++ b/test/functional/apps/management/_scripted_fields.js
@@ -78,13 +78,11 @@ export default function ({ getService, getPageObjects }) {
});
after(async function afterAll() {
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.removeLogstashIndexPatternIfExist();
});
it('should not allow saving of invalid scripts', async function () {
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
await PageObjects.settings.clickScriptedFieldsTab();
@@ -102,7 +100,6 @@ export default function ({ getService, getPageObjects }) {
const scriptedPainlessFieldName = 'ram_Pain_reg';
it('should create and edit scripted field', async function () {
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
const startingCount = parseInt(await PageObjects.settings.getScriptedFieldsTabCount());
@@ -136,7 +133,6 @@ export default function ({ getService, getPageObjects }) {
const scriptedPainlessFieldName = 'ram_Pain1';
it('should create scripted field', async function () {
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
const startingCount = parseInt(await PageObjects.settings.getScriptedFieldsTabCount());
@@ -256,7 +252,6 @@ export default function ({ getService, getPageObjects }) {
const scriptedPainlessFieldName2 = 'painString';
it('should create scripted field', async function () {
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
const startingCount = parseInt(await PageObjects.settings.getScriptedFieldsTabCount());
@@ -351,7 +346,6 @@ export default function ({ getService, getPageObjects }) {
const scriptedPainlessFieldName2 = 'painBool';
it('should create scripted field', async function () {
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
const startingCount = parseInt(await PageObjects.settings.getScriptedFieldsTabCount());
@@ -447,7 +441,6 @@ export default function ({ getService, getPageObjects }) {
const scriptedPainlessFieldName2 = 'painDate';
it('should create scripted field', async function () {
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
const startingCount = parseInt(await PageObjects.settings.getScriptedFieldsTabCount());
diff --git a/test/functional/apps/management/_scripted_fields_filter.js b/test/functional/apps/management/_scripted_fields_filter.js
index b1714c425aac..55ec8895608c 100644
--- a/test/functional/apps/management/_scripted_fields_filter.js
+++ b/test/functional/apps/management/_scripted_fields_filter.js
@@ -58,7 +58,6 @@ export default function ({ getService, getPageObjects }) {
const scriptedPainlessFieldName = 'ram_pain1';
it('should filter scripted fields', async function () {
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
await PageObjects.settings.clickScriptedFieldsTab();
diff --git a/test/functional/apps/saved_objects_management/edit_saved_object.ts b/test/functional/apps/saved_objects_management/edit_saved_object.ts
index 1534c710179b..64fe2bf199b0 100644
--- a/test/functional/apps/saved_objects_management/edit_saved_object.ts
+++ b/test/functional/apps/saved_objects_management/edit_saved_object.ts
@@ -88,7 +88,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
it('allows to update the saved object when submitting', async () => {
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsSavedObjects();
let objects = await PageObjects.savedObjects.getRowTitles();
@@ -154,7 +153,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
},
];
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsSavedObjects();
const objects = await PageObjects.savedObjects.getRowTitles();
diff --git a/test/functional/apps/visualize/_custom_branding.ts b/test/functional/apps/visualize/_custom_branding.ts
index 37f07e932ee5..52cbc8e5fec9 100644
--- a/test/functional/apps/visualize/_custom_branding.ts
+++ b/test/functional/apps/visualize/_custom_branding.ts
@@ -46,7 +46,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
it('with customized logo for opensearch overview header in dark mode', async () => {
- await PageObjects.common.navigateToApp('management/opensearch-dashboards/settings');
+ await PageObjects.settings.navigateTo();
await PageObjects.settings.toggleAdvancedSettingCheckbox('theme:darkMode');
await PageObjects.common.navigateToApp('opensearch_dashboards_overview');
await testSubjects.existOrFail('osdOverviewPageHeaderLogo');
@@ -100,7 +100,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
it('with customized logo in dark mode', async () => {
- await PageObjects.common.navigateToApp('management/opensearch-dashboards/settings');
+ await PageObjects.settings.navigateTo();
await PageObjects.settings.toggleAdvancedSettingCheckbox('theme:darkMode');
await PageObjects.common.navigateToApp('home');
await testSubjects.existOrFail('welcomeCustomLogo');
@@ -179,13 +179,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
describe('in dark mode', async () => {
before(async function () {
- await PageObjects.common.navigateToApp('management/opensearch-dashboards/settings');
+ await PageObjects.settings.navigateTo();
await PageObjects.settings.toggleAdvancedSettingCheckbox('theme:darkMode');
await PageObjects.common.navigateToApp('home');
});
after(async function () {
- await PageObjects.common.navigateToApp('management/opensearch-dashboards/settings');
+ await PageObjects.settings.navigateTo();
await PageObjects.settings.clearAdvancedSettings('theme:darkMode');
});
@@ -206,7 +206,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
it('with customized mark logo button that navigates to home page', async () => {
- await PageObjects.common.navigateToApp('settings');
+ await PageObjects.settings.navigateTo();
await globalNav.clickHomeButton();
await PageObjects.header.waitUntilLoadingHasFinished();
const url = await browser.getCurrentUrl();
diff --git a/test/functional/apps/visualize/_lab_mode.js b/test/functional/apps/visualize/_lab_mode.js
index d852ac484eaa..faca1ff394b1 100644
--- a/test/functional/apps/visualize/_lab_mode.js
+++ b/test/functional/apps/visualize/_lab_mode.js
@@ -53,8 +53,7 @@ export default function ({ getService, getPageObjects }) {
log.info('found saved search before toggling enableLabs mode');
// Navigate to advanced setting and disable lab mode
- await PageObjects.header.clickStackManagement();
- await PageObjects.settings.clickOpenSearchDashboardsSettings();
+ await PageObjects.settings.navigateTo();
await PageObjects.settings.toggleAdvancedSettingCheckbox(VISUALIZE_ENABLE_LABS_SETTING);
// Expect the discover still to list that saved visualization in the open list
@@ -67,8 +66,7 @@ export default function ({ getService, getPageObjects }) {
after(async () => {
await PageObjects.discover.closeLoadSaveSearchPanel();
- await PageObjects.header.clickStackManagement();
- await PageObjects.settings.clickOpenSearchDashboardsSettings();
+ await PageObjects.settings.navigateTo();
await PageObjects.settings.clearAdvancedSettings(VISUALIZE_ENABLE_LABS_SETTING);
});
});
diff --git a/test/functional/apps/visualize/_tag_cloud.js b/test/functional/apps/visualize/_tag_cloud.js
index a5123434115d..075e7fa22907 100644
--- a/test/functional/apps/visualize/_tag_cloud.js
+++ b/test/functional/apps/visualize/_tag_cloud.js
@@ -160,7 +160,6 @@ export default function ({ getService, getPageObjects }) {
describe('formatted field', function () {
before(async function () {
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
await PageObjects.settings.filterField(termsField);
@@ -178,7 +177,6 @@ export default function ({ getService, getPageObjects }) {
after(async function () {
await filterBar.removeFilter(termsField);
- await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
await PageObjects.settings.filterField(termsField);
diff --git a/test/functional/config.js b/test/functional/config.js
index b862208276bf..75c9c3f9b6fe 100644
--- a/test/functional/config.js
+++ b/test/functional/config.js
@@ -102,10 +102,6 @@ export default async function ({ readConfigFile }) {
management: {
pathname: '/app/management',
},
- /** @obsolete "management" should be instead of "settings" **/
- settings: {
- pathname: '/app/management',
- },
console: {
pathname: '/app/dev_tools',
hash: '/console',
diff --git a/test/functional/page_objects/settings_page.ts b/test/functional/page_objects/settings_page.ts
index af2bf046e3a9..1e0106229d3d 100644
--- a/test/functional/page_objects/settings_page.ts
+++ b/test/functional/page_objects/settings_page.ts
@@ -51,19 +51,19 @@ export function SettingsPageProvider({ getService, getPageObjects }: FtrProvider
await find.clickByDisplayedLinkText(text);
}
async clickOpenSearchDashboardsSettings() {
- await testSubjects.click('settings');
+ await PageObjects.common.navigateToApp('settings');
await PageObjects.header.waitUntilLoadingHasFinished();
await testSubjects.existOrFail('managementSettingsTitle');
}
async clickOpenSearchDashboardsSavedObjects() {
- await testSubjects.click('objects');
+ await PageObjects.common.navigateToApp('objects');
await PageObjects.savedObjects.waitTableIsLoaded();
}
async clickOpenSearchDashboardsIndexPatterns() {
log.debug('clickOpenSearchDashboardsIndexPatterns link');
- await testSubjects.click('indexPatterns');
+ await PageObjects.common.navigateToApp('indexPatterns');
await PageObjects.header.waitUntilLoadingHasFinished();
}