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 <[email protected]>
(cherry picked from commit 7565bcd)
  • Loading branch information
SuZhou-Joe committed Jul 23, 2024
1 parent 24cffd4 commit 661b547
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,18 +171,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,
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 @@ -243,18 +231,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,
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 @@ -286,8 +262,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 @@ -310,8 +288,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 661b547

Please sign in to comment.