Skip to content

Commit

Permalink
Update error message in timeline visualization when MDS disabled (ope…
Browse files Browse the repository at this point in the history
…nsearch-project#7069)

* Update error message in timeline visualization when MDS disabled

Signed-off-by: Zhongnan Su <[email protected]>

* Changeset file for PR opensearch-project#7069 created/updated

---------

Signed-off-by: Zhongnan Su <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and mengweieric committed Jun 24, 2024
1 parent 5d5d18a commit b2ad0c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/7069.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Update error message in timeline visualization when MDS disabled ([#7069](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7069))
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('fetchDataSourceIdByName()', () => {
await expect(
fetchDataSourceIdByName({ ...config, data_source_name: 'Some Data Source' }, client)
).rejects.toThrowError(
'To query from multiple data sources, first enable the data source feature'
'data_source_name is not supported. Contact your administrator to start using multiple data sources'
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export const fetchDataSourceIdByName = async (
}

if (!getDataSourceEnabled().enabled) {
throw new Error('To query from multiple data sources, first enable the data source feature');
throw new Error(
'data_source_name is not supported. Contact your administrator to start using multiple data sources'
);
}

const dataSources = await client.find<DataSourceAttributes>({
Expand Down

0 comments on commit b2ad0c9

Please sign in to comment.