elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.67k stars 8.23k forks source link

[Fleet] Handle unavailable spaces in agent policy space selector #201251

Open jillguyonnet opened 18 hours ago

jillguyonnet commented 18 hours ago

Summary

Closes https://github.com/elastic/kibana/issues/193827

This PR improves the space selector in agent policy setting to handle the case where the user does not have access to all policy spaces.

In this case:

Screenshots

For a user with access to all policy spaces (no change): Screenshot 2024-11-21 at 17 11 00

For a user with access to only a subset of policy spaces: Screenshot 2024-11-21 at 17 11 09

Checklist

elasticmachine commented 18 hours ago
:robot: Jobs for this PR can be triggered through checkboxes. :construction: :information_source: To trigger the CI, please tick the checkbox below :point_down: - [ ] Click to trigger **kibana-pull-request** for this PR! - [ ] Click to trigger **kibana-deploy-project-from-pr** for this PR!
nchaulet commented 16 hours ago

This looks a good solution to me, we should probably remove the space_ids property when that field is disabled from the data we send to update the policy here https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx#L108

elasticmachine commented 16 hours ago

:green_heart: Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.7MB 1.7MB +546.0B

History

cc @jillguyonnet