diff --git a/CHANGELOG.md b/CHANGELOG.md index 58aa2e13207b..081b20c4eab3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,18 +49,20 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [TSVB, Dashboards] Fix inconsistent dark mode code editor themes ([#4609](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4609)) - [Table Visualization] Fix width of multiple tables when rendered in column view ([#4638](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4638)) - [Legacy Maps] Fix dark mode style overrides ([#4658](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4658)) -- [BUG] Fix management overview page duplicate rendering ([#4636](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4636)) +- Fix management overview page duplicate rendering ([#4636](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4636)) - Bump `agentkeepalive` to v4.5.0 to solve a problem preventing the use `https://ip` in `opensearch.hosts` ([#4949](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4949)) - [Table Vis] Fix filter actions on data table vis cells ([#4837](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4837)) - Fix broken app when management is turned off ([#4891](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4891)) - Correct the generated path for downloading plugins by their names on Windows ([#4953](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4953)) -- [BUG] Fix buildPointSeriesData unit test fails due to local timezone ([#4992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4992)) -- [BUG][Data Explorer][Discover] Fix total hits issue for no time based data ([#5087](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5087)) -- [BUG][Data Explorer][Discover] Add onQuerySubmit to top nav and allow force update to embeddable ([#5160](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5160)) -- [BUG][Discover] Fix misc navigation issues ([#5168](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5168)) -- [BUG][Discover] Fix mobile view ([#5168](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5168)) -- [BUG][Data Explorer][Discover] Automatically load solo added default index pattern ([#5171](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5171)) -- [BUG][Data Explorer][Discover] Allow data grid to auto adjust size based on fetched data count ([#5191](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5191)) +- Fix `buildPointSeriesData` unit test fails due to local timezone ([#4992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4992)) +- [Data Explorer][Discover] Fix total hits issue for no time based data ([#5087](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5087)) +- [Data Explorer][Discover] Add onQuerySubmit to top nav and allow force update to embeddable ([#5160](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5160)) +- [Discover] Fix misc navigation issues ([#5168](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5168)) +- [Discover] Fix mobile view ([#5168](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5168)) +- Fix `visAugmenter` forming empty key-value pairs in its calls to the `SavedObject` API ([#5190](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5190)) +- [Data Explorer][Discover] Automatically load solo added default index pattern ([#5171](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5171)) +- [Data Explorer][Discover] Allow data grid to auto adjust size based on fetched data count ([#5191](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5191)) + ### 🚞 Infrastructure diff --git a/src/plugins/vis_augmenter/public/utils/utils.test.ts b/src/plugins/vis_augmenter/public/utils/utils.test.ts index d8ebe41b087f..f831deef3955 100644 --- a/src/plugins/vis_augmenter/public/utils/utils.test.ts +++ b/src/plugins/vis_augmenter/public/utils/utils.test.ts @@ -372,12 +372,12 @@ describe('utils', () => { expect(loader.findAll).toHaveBeenCalledWith( '', 100, - [], + undefined, { type: 'visualization', id: visId1 as string, }, - [] + undefined ); }); it('single plugin resource is propagated to findAll()', async () => { @@ -391,7 +391,7 @@ describe('utils', () => { expect(loader.findAll).toHaveBeenCalledWith( 'resource-1', 100, - [], + undefined, { type: 'visualization', id: visId1 as string, @@ -411,7 +411,7 @@ describe('utils', () => { expect(loader.findAll).toHaveBeenCalledWith( 'resource-1|resource-2', 100, - [], + undefined, { type: 'visualization', id: visId1 as string, diff --git a/src/plugins/vis_augmenter/public/utils/utils.ts b/src/plugins/vis_augmenter/public/utils/utils.ts index f1c18ce15b79..c8ebde337757 100644 --- a/src/plugins/vis_augmenter/public/utils/utils.ts +++ b/src/plugins/vis_augmenter/public/utils/utils.ts @@ -72,19 +72,19 @@ export const getAugmentVisSavedObjs = async ( ); } try { - // If there is specified plugin resource IDs, add a search string and search field - // into findAll() fn call + // If there are any plugin resource IDs specified, add a search string and search field + // into findAll() call const pluginResourceIdsSpecified = - pluginResourceIds !== undefined && pluginResourceIds.length > 0; + Array.isArray(pluginResourceIds) && pluginResourceIds.length > 0; const resp = await loader?.findAll( - pluginResourceIdsSpecified ? pluginResourceIds.join('|') : '', + pluginResourceIdsSpecified ? pluginResourceIds!.join('|') : '', 100, - [], + undefined, { type: 'visualization', id: visId as string, }, - pluginResourceIdsSpecified ? ['pluginResource.id'] : [] + pluginResourceIdsSpecified ? ['pluginResource.id'] : undefined ); return (get(resp, 'hits', []) as any[]) as ISavedAugmentVis[]; } catch (e) {