[CPS][Maps] Support CPS Picker in Maps #246382
Conversation
357f7b5 to
8cdfac6
Compare
8cdfac6 to
51c466c
Compare
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
|
|
||
| params.filter = buildEsQuery(undefined, query, filters, getEsQueryConfig(getUiSettings())); | ||
|
|
||
| if (requestMeta.projectRouting) { |
There was a problem hiding this comment.
how does this interact with project routing defined in ESQL statement? Should param only be set of there is no project routing in ESQL statement
There was a problem hiding this comment.
actually no, we can send both and es will prioritize the SET query param over the body param. We're safe to have both.
| @@ -0,0 +1,50 @@ | |||
| /* | |||
There was a problem hiding this comment.
Since this is not a hook, could you rename to something like project_routing_manager?
There was a problem hiding this comment.
Good call! I initially started it as a hook but then forgot to change the file name: 01dee99
| } | ||
|
|
||
| const initialProjectRouting = cpsManager.getProjectRouting(); | ||
| const projectRouting$ = new BehaviorSubject<ProjectRouting | undefined>(initialProjectRouting); |
There was a problem hiding this comment.
Is projectRouting$ needed? It is never returned and is only used in this file for change detection. Maybe instead, just use distinctUntilChanged operator when subscribing to cpsManager.getProjectRouting$()
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Async chunks
Page load bundle
History
|
nreese
left a comment
There was a problem hiding this comment.
kibana-presentation changes LGTM
code review only
…donly * commit 'bb1f55fa520b30ceb923af069ef403b24dcb1606': (52 commits) [CPS][Maps] Support CPS Picker in Maps (elastic#246382) [APM] Migrate the Transaction Overview tests to Scout/Playwright/Component/API tests (elastic#245972) [Cases] Change nested field search to be case insensitive (elastic#246643) [ES|QL] PromQL parser initial implementation (elastic#246552) [Agent Builder] Adds keyboard shortcut and toggle behavior to AI Agent button (elastic#246659) Retry on "all shards failed" from ES (elastic#246533) [Streams] Test enable wired streams flow (elastic#246113) [Agent Builder] Fast-follow bugfixes for MCP Tool type (elastic#246665) [Entity Store][API] Fix snake case on CRUD API List response (elastic#246003) [ResponseOps][Slack] Simplify channel configuration (elastic#245423) Add Canonical Name Badge to Documentation (elastic#246647) [Streams] Add simulation filtering by conditions (elastic#245400) [o11y AI] Add `get_hosts` tool (elastic#246541) [agent builder] create_visualization: support heatmap and regionmap (elastic#246671) [AI Infra] Chat experience: Selection modal title change (elastic#246683) [Background search] Change polling behavior (elastic#244760) [ES|QL ] Common Lookup Join Fields Are Not Listed First (elastic#246582) Add missing `dynamic: false` (elastic#246685) [Metrics in Discover] Unskip metrics api test (elastic#246593) [ES|QL] Show next actions after simple field assignment in RERANK ON Clause (elastic#246676) ...
## Summary
Supports CPS project picker in Maps. When changing the picker setting,
maps refetch the data with the correct `project_routing` parameter.
*Note*: This does NOT allow yet saving the project routing setting to
the maps saved object
Also fixes the fact I forgot to pass `project_routing` to esql source.
#### To test:
1. Navigate to Maps and create a new map
2. Add a few layers with Elasticsearch data sources (e.g., documents,
clusters, heatmap)
3. Open browser DevTools Network tab (optionally, filter for search
requests)
4. Click the CPS picker and change the project routing setting
5. Verify that:
- Maps layers refetch data automatically
- Search requests include `project_routing` parameter in the request
body
- Different CPS settings result in different project_routing values in
requests (none for All projects)
https://github.com/user-attachments/assets/8cbd4348-e2b0-445b-b260-64d5b1a3077f
Summary
Supports CPS project picker in Maps. When changing the picker setting, maps refetch the data with the correct
project_routingparameter.Note: This does NOT allow yet saving the project routing setting to the maps saved object
Also fixes the fact I forgot to pass
project_routingto esql source.To test:
- Maps layers refetch data automatically
- Search requests include
project_routingparameter in the request body- Different CPS settings result in different project_routing values in requests (none for All projects)
Untitled.mov