Skip to content

Commit

Permalink
Add data source reference id in data layer search request
Browse files Browse the repository at this point in the history
Signed-off-by: Junqiu Lei <[email protected]>
  • Loading branch information
junqiu-lei committed Jun 10, 2024
1 parent d6d19bc commit 2bbe27d
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 2bbe27d

Please sign in to comment.