Skip to content

Commit

Permalink
feat: reuse applications (#1094)
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe authored Jul 23, 2024
1 parent 99a1eba commit 7565bcd
Showing 1 changed file with 6 additions and 30 deletions.
36 changes: 6 additions & 30 deletions public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,20 +223,6 @@ export class IndexManagementPlugin implements Plugin<IndexManagementPluginSetup,
},
});

// index state management policies route
core.application.register({
id: `opensearch_index_management_dashboards_${encodeURIComponent(ROUTES.INDEX_POLICIES)}`,
title: "Index State Management Policies",
order: 8040,
category: ISM_CATEGORIES.indexes,
workspaceAvailability: WorkspaceAvailability.outsideWorkspace,
description: ISM_FEATURE_DESCRIPTION.index_state_management_policies,
updater$: this.appStateUpdater,
mount: async (params: AppMountParameters) => {
return mountWrapper(params, ROUTES.INDEX_POLICIES);
},
});

// index templates route
core.application.register({
id: `opensearch_index_management_dashboards_${encodeURIComponent(ROUTES.TEMPLATES)}`,
Expand Down Expand Up @@ -307,20 +293,6 @@ export class IndexManagementPlugin implements Plugin<IndexManagementPluginSetup,
},
});

// snapshot policies route
core.application.register({
id: `opensearch_index_management_dashboards_${encodeURIComponent(ROUTES.SNAPSHOT_POLICIES)}`,
title: "Snapshot Policies",
order: 8040,
category: ISM_CATEGORIES.index_backup_and_recovery,
workspaceAvailability: WorkspaceAvailability.outsideWorkspace,
description: ISM_FEATURE_DESCRIPTION.snapshot_policies,
updater$: this.appStateUpdater,
mount: async (params: AppMountParameters) => {
return mountWrapper(params, ROUTES.SNAPSHOT_POLICIES);
},
});

// snapshot repositories route
core.application.register({
id: `opensearch_index_management_dashboards_${encodeURIComponent(ROUTES.REPOSITORIES)}`,
Expand Down Expand Up @@ -360,8 +332,10 @@ export class IndexManagementPlugin implements Plugin<IndexManagementPluginSetup,
category: ISM_CATEGORIES.indexes,
},
{
id: `opensearch_index_management_dashboards_${encodeURIComponent(ROUTES.INDEX_POLICIES)}`,
id: imApplicationID,
category: ISM_CATEGORIES.indexes,
title: "Index State Management Policies",
order: 8040,
},
{
id: `opensearch_index_management_dashboards_${encodeURIComponent(ROUTES.TEMPLATES)}`,
Expand All @@ -384,8 +358,10 @@ export class IndexManagementPlugin implements Plugin<IndexManagementPluginSetup,
category: ISM_CATEGORIES.index_backup_and_recovery,
},
{
id: `opensearch_index_management_dashboards_${encodeURIComponent(ROUTES.SNAPSHOT_POLICIES)}`,
id: smApplicationID,
category: ISM_CATEGORIES.index_backup_and_recovery,
title: "Snapshot Policies",
order: 8040,
},
{
id: `opensearch_index_management_dashboards_${encodeURIComponent(ROUTES.REPOSITORIES)}`,
Expand Down

0 comments on commit 7565bcd

Please sign in to comment.