Skip to content

Commit

Permalink
Fix visAugmenter forming empty key-value pairs in its calls to the …
Browse files Browse the repository at this point in the history
…`SavedObject` API

Fixes opensearch-project#5187

Signed-off-by: Miki <[email protected]>
  • Loading branch information
AMoo-Miki committed Oct 3, 2023
1 parent cb6e0f0 commit e1f3a1a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
13 changes: 7 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,17 @@ 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))
- 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))

### 🚞 Infrastructure

Expand Down
12 changes: 6 additions & 6 deletions src/plugins/vis_augmenter/public/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e1f3a1a

Please sign in to comment.