Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Multiple Datasource][Version Decoupling] Add data source version and installed plugins in data source viewer returns #7420

Merged
merged 5 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/7420.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- [Version Decoupling] Add data source version and installed plugins in data source viewer returns ([#7420](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7420))
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,7 @@ export class DataSourceView extends React.Component<DataSourceViewProps, DataSou
return;
}

if (
(optionId === '' && this.props.hideLocalCluster) ||
(this.props.dataSourceFilter &&
this.props.selectedOption.filter(this.props.dataSourceFilter).length === 0)
) {
if (optionId === '' && this.props.hideLocalCluster) {
this.setState({
selectedOption: [],
});
Expand All @@ -100,6 +96,17 @@ export class DataSourceView extends React.Component<DataSourceViewProps, DataSou
optionId,
this.props.savedObjectsClient!
);
if (
this.props.dataSourceFilter &&
[selectedDataSource].filter(this.props.dataSourceFilter).length === 0
) {
this.setState({
selectedOption: [],
});
this.onSelectedDataSources([]);
ZilongX marked this conversation as resolved.
Show resolved Hide resolved
return;
}

if (!this._isMounted) return;
this.setState({
selectedOption: [{ id: optionId, label: selectedDataSource.title }],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ export async function getDataSourceById(
endpoint: attributes.endpoint,
description: attributes.description || '',
auth: attributes.auth,
datasourceversion: attributes.dataSourceVersion,
installedplugins: attributes.installedPlugins,
};
}

Expand Down
Loading