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
  • Loading branch information
junqiu-lei committed Jun 10, 2024
1 parent d6d19bc commit 82e18e1
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 82e18e1

Please sign in to comment.