Skip to content

Commit

Permalink
Merge branch '2.x' into backport/backport-1088-to-2.x
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
2 parents 8ee90fc + fbcd555 commit 3ff45c5
Show file tree
Hide file tree
Showing 4 changed files with 395 additions and 596 deletions.
6 changes: 4 additions & 2 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@
"server": true,
"ui": true,
"supportedOSDataSourceVersions": ">=2.0.0",
"requiredOSDataSourcePlugins": ["opensearch-index-management"]
}
"requiredOSDataSourcePlugins": [
"opensearch-index-management"
]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
"**/async": "^3.2.3",
"**/nth-check": "^2.0.1",
"**/typescript": "4.0.2",
"**/terser": "^4.8.1"
"**/terser": "^4.8.1",
"braces": "^3.0.3"
},
"devDependencies": {
"@elastic/elastic-eslint-config-kibana": "link:../../packages/opensearch-eslint-config-opensearch-dashboards",
Expand Down
38 changes: 8 additions & 30 deletions public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export class IndexManagementPlugin implements Plugin<IndexManagementPluginSetup,
category: DEFAULT_APP_CATEGORIES.management,
workspaceAvailability: WorkspaceAvailability.outsideWorkspace,
description: ISM_FEATURE_DESCRIPTION.index_management,
updater$: this.appStateUpdater,
mount: async (params: AppMountParameters) => {
const { renderApp } = await import("./index_management_app");
const [coreStart, depsStart] = await core.getStartServices();
Expand All @@ -157,6 +158,7 @@ export class IndexManagementPlugin implements Plugin<IndexManagementPluginSetup,
category: DEFAULT_APP_CATEGORIES.management,
workspaceAvailability: WorkspaceAvailability.outsideWorkspace,
description: ISM_FEATURE_DESCRIPTION.snapshot_management,
updater$: this.appStateUpdater,
mount: async (params: AppMountParameters) => {
const { renderApp } = await import("./index_management_app");
const [coreStart, depsStart] = await core.getStartServices();
Expand Down Expand Up @@ -223,20 +225,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 +295,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 +334,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 +360,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
Loading

0 comments on commit 3ff45c5

Please sign in to comment.