Skip to content

Commit

Permalink
Add data source reference id in data layer search request (#623) (#624)
Browse files Browse the repository at this point in the history
Signed-off-by: Junqiu Lei <[email protected]>
(cherry picked from commit 1e88c71)

Co-authored-by: Junqiu Lei <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and junqiu-lei authored Jun 10, 2024
1 parent 25419e1 commit 22b45c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Features
### Enhancements
### Bug Fixes
* Add data source reference id in data layer search request ([#623](https://github.com/opensearch-project/dashboards-maps/pull/623))
### Infrastructure
### Documentation
### Maintenance
Expand Down
2 changes: 2 additions & 0 deletions public/model/layerRenderController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export const prepareDataLayerSource = (
...(timeFilters ? [timeFilters] : []),
]);
}
const dataSourceId = indexPattern?.dataSourceRef?.id;
const request = {
params: {
index: indexPatternRefName,
Expand All @@ -85,6 +86,7 @@ export const prepareDataLayerSource = (
query: mergedQuery,
},
},
...(!!dataSourceId && { dataSourceId }),
};

const search$ = data.search.search(request).subscribe({
Expand Down

0 comments on commit 22b45c1

Please sign in to comment.