Skip to content

Commit

Permalink
Retire dashboards management (opensearch-project#138)
Browse files Browse the repository at this point in the history
* feat: retire management section

Signed-off-by: tygao <tygao@amazon.com>

* fix: fix path

Signed-off-by: tygao <tygao@amazon.com>

* chore: remove unused

Signed-off-by: tygao <tygao@amazon.com>

* fix: update path

Signed-off-by: tygao <tygao@amazon.com>

* fix: update path

Signed-off-by: tygao <tygao@amazon.com>

* chore: remove unused after rebase

Signed-off-by: tygao <tygao@amazon.com>

* fix: remove extra import

Signed-off-by: tygao <tygao@amazon.com>

---------

Signed-off-by: tygao <tygao@amazon.com>
  • Loading branch information
raintygao authored Sep 14, 2023
1 parent aa51f84 commit d7dbedf
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/plugins/advanced_settings/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const title = i18n.translate('advancedSettings.advancedSettingsLabel', {

export class AdvancedSettingsPlugin
implements Plugin<AdvancedSettingsSetup, AdvancedSettingsStart, AdvancedSettingsPluginSetup> {
public setup(core: CoreSetup, { management, home }: AdvancedSettingsPluginSetup) {
public setup(core: CoreSetup, { home }: AdvancedSettingsPluginSetup) {
core.application.register({
id: 'settings',
title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const OverviewPageHeader: FC<Props> = ({
className="osdOverviewPageHeader__actionButton"
flush="both"
iconType="gear"
href={addBasePath('/app/management')}
href={addBasePath('/app/settings')}
>
{i18n.translate(
'opensearch-dashboards-react.osdOverviewPageHeader.stackManagementButtonLabel',
Expand Down
23 changes: 1 addition & 22 deletions src/plugins/saved_objects_management/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ import { bootstrap } from './ui_actions_bootstrap';
import { DEFAULT_APP_CATEGORIES } from '../../../core/public';
import {
MANAGE_LIBRARY_TITLE_WORDINGS,
SAVED_OBJECT_MANAGEMENT_TITLE_WORDINGS,
SAVED_QUERIES_WORDINGS,
SAVED_SEARCHES_WORDINGS,
} from './constants';
Expand All @@ -68,7 +67,6 @@ export interface SavedObjectsManagementPluginSetup {
columns: SavedObjectsManagementColumnServiceSetup;
namespaces: SavedObjectsManagementNamespaceServiceSetup;
serviceRegistry: ISavedObjectsManagementServiceRegistry;
registerLibrarySubApp: () => void;
}

export interface SavedObjectsManagementPluginStart {
Expand Down Expand Up @@ -170,7 +168,7 @@ export class SavedObjectsManagementPlugin

public setup(
core: CoreSetup<StartDependencies, SavedObjectsManagementPluginStart>,
{ home, management, uiActions }: SetupDependencies
{ home, uiActions }: SetupDependencies
): SavedObjectsManagementPluginSetup {
const actionSetup = this.actionService.setup();
const columnSetup = this.columnService.setup();
Expand All @@ -193,24 +191,6 @@ export class SavedObjectsManagementPlugin
});
}

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,
title: SAVED_OBJECT_MANAGEMENT_TITLE_WORDINGS,
});
},
});

// sets up the context mappings and registers any triggers/actions for the plugin
bootstrap(uiActions);

Expand All @@ -224,7 +204,6 @@ export class SavedObjectsManagementPlugin
columns: columnSetup,
namespaces: namespaceSetup,
serviceRegistry: this.serviceRegistry,
registerLibrarySubApp: () => {},
};
}

Expand Down
3 changes: 0 additions & 3 deletions src/plugins/workspace/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ export class WorkspacePlugin implements Plugin<{}, {}, WorkspacePluginSetupDeps>
*/
savedObjectsManagement?.columns.register(getWorkspaceColumn(core));

// register apps for library object management
savedObjectsManagement?.registerLibrarySubApp();

type WorkspaceAppType = (params: AppMountParameters, services: Services) => () => void;
const mountWorkspaceApp = async (params: AppMountParameters, renderApp: WorkspaceAppType) => {
const [coreStart] = await core.getStartServices();
Expand Down

0 comments on commit d7dbedf

Please sign in to comment.