Skip to content

Commit

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

* Update error message in timeline visualization when MDS disabled



* Changeset file for PR #7069 created/updated

---------



(cherry picked from commit 50f1066)

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 20, 2024
1 parent 727ec51 commit 61dd591
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 61dd591

Please sign in to comment.