Skip to content

Commit

Permalink
Merge branch 'opensearch-project:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptainDredge authored Jul 12, 2024
2 parents b6688d7 + 50c2275 commit 818362c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
3 changes: 2 additions & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
## Current Maintainers

| Maintainer | GitHub ID | Affiliation |
| --------------------- | ----------------------------------------------------- | ----------- |
|-----------------------| ----------------------------------------------------- | ----------- |
| Bowen Lan | [bowenlan-amzn](https://github.com/bowenlan-amzn) | Amazon |
| Saurabh Singh | [getsaurabh02](https://github.com/getsaurabh02) | Amazon |
| Praveen Sameneni | [praveensameneni](https://github.com/praveensameneni) | Amazon |
Expand All @@ -20,6 +20,7 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
| Surya Sashank Nistala | [eirsep](https://github.com/eirsep) | Amazon |
| Rohit Ashiwal | [r1walz](https://github.com/r1walz) | Amazon |
| Vikas Bansal | [vikasvb90](https://github.com/vikasvb90) | Amazon |
| Ramakrishna Chilaka | [RamakrishnaChilaka](https://github.com/RamakrishnaChilaka) | Amazon |

## Emeritus

Expand Down
4 changes: 3 additions & 1 deletion opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
"requiredPlugins": ["navigation", "opensearchDashboardsReact"],
"optionalPlugins": ["managementOverview", "dataSource", "dataSourceManagement"],
"server": true,
"ui": true
"ui": true,
"supportedOSDataSourceVersions": ">=2.0.0",
"requiredOSDataSourcePlugins": ["opensearch-index-management"]
}
26 changes: 21 additions & 5 deletions public/pages/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import React, { Component } from "react";
import { Switch, Route, Redirect, RouteComponentProps } from "react-router-dom";
// @ts-ignore
import { EuiSideNav, EuiPage, EuiPageBody, EuiPageSideBar } from "@elastic/eui";
import { CoreStart, HttpSetup, MountPoint } from "opensearch-dashboards/public";
import { CoreStart, HttpSetup, MountPoint, SavedObject } from "opensearch-dashboards/public";
import queryString from "query-string";
import semver from "semver";
import Policies from "../Policies";
import ManagedIndices from "../ManagedIndices";
import Indices from "../Indices";
Expand Down Expand Up @@ -59,13 +61,14 @@ import Notifications from "../Notifications";
import ComposableTemplates from "../ComposableTemplates";
import CreateComposableTemplate from "../CreateComposableTemplate";
import { DataSourceMenuContext, DataSourceMenuProperties } from "../../services/DataSourceMenuContext";
import queryString from "query-string";
import {
DataSourceManagementPluginSetup,
DataSourceSelectableConfig,
DataSourceViewConfig,
} from "../../../../../src/plugins/data_source_management/public";
import { DataSourceOption } from "../../../../../src/plugins/data_source_management/public/components/data_source_menu/types";
import * as pluginManifest from "../../../opensearch_dashboards.json";
import { DataSourceAttributes } from "../../../../../src/plugins/data_source/common/data_sources";

enum Navigation {
IndexManagement = "Index Management",
Expand Down Expand Up @@ -192,8 +195,8 @@ export default class Main extends Component<MainProps, MainState> {
dataSourceLabel = parsedDataSourceLabel || "";
}
this.state = {
dataSourceId: dataSourceId,
dataSourceLabel: dataSourceLabel,
dataSourceId,
dataSourceLabel,
dataSourceReadOnly: false,
dataSourceLoading: props.multiDataSourceEnabled,
};
Expand Down Expand Up @@ -257,6 +260,15 @@ export default class Main extends Component<MainProps, MainState> {
}
};

dataSourceFilterFn = (dataSource: SavedObject<DataSourceAttributes>) => {
const engineVersion = dataSource?.attributes?.dataSourceVersion || "";
const availablePlugins = dataSource?.attributes?.installedPlugins || [];
return (
semver.satisfies(engineVersion, pluginManifest.supportedOSDataSourceVersions) &&
pluginManifest.requiredOSDataSourcePlugins.every((plugin) => availablePlugins.includes(plugin))
);
};

render() {
const {
location: { pathname },
Expand Down Expand Up @@ -400,6 +412,7 @@ export default class Main extends Component<MainProps, MainState> {
componentConfig={{
activeOption,
fullWidth: false,
dataSourceFilter: this.dataSourceFilterFn,
}}
/>
) : (
Expand All @@ -412,6 +425,7 @@ export default class Main extends Component<MainProps, MainState> {
fullWidth: false,
activeOption,
onSelectedDataSources: this.onSelectedDataSources,
dataSourceFilter: this.dataSourceFilterFn,
}}
/>
)
Expand Down Expand Up @@ -441,13 +455,13 @@ export default class Main extends Component<MainProps, MainState> {
componentConfig={{
activeOption,
fullWidth: false,
dataSourceFilter: this.dataSourceFilterFn,
}}
/>
)}
/>
<Route
path={[
"/",
ROUTES.INDICES,
ROUTES.CREATE_INDEX,
ROUTES.ALIASES,
Expand All @@ -474,10 +488,12 @@ export default class Main extends Component<MainProps, MainState> {
fullWidth: false,
activeOption,
onSelectedDataSources: this.onSelectedDataSources,
dataSourceFilter: this.dataSourceFilterFn,
}}
/>
)}
/>
<Redirect from="/" to={landingPage} />
</Switch>
)}
{!this.state.dataSourceLoading && (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Version 2.15.0.0 2024-06-24

Compatible with OpenSearch 2.15.0

### Enhancements

* Specify _all as target in ClearCacheModal ([#1020](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/1020))

### Bug Fixes
* Cypress: modify test to check for inequality ([#1017](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/1017))

0 comments on commit 818362c

Please sign in to comment.