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
* Update error message in timeline visualization when MDS disabled

Signed-off-by: Zhongnan Su <szhongna@amazon.com>

* Changeset file for PR #7069 created/updated

---------

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 50f1066)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 727ec51 commit 858f2c4
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 858f2c4

Please sign in to comment.