Skip to content

Commit

Permalink
[Fleet] Fix wrong policy_id in dev tools flyout request (elastic#176729)
Browse files Browse the repository at this point in the history
Fixes elastic#172798

## Summary
Small bug fix: when adding a new integration, the `policy_id` in dev
tools flyout request was not correct

Steps to reproduce:

- Add one agent policy to the stack
- Go to any integration and navigate to `add integration` page
- Switch to `Existing hosts` and select an existing policy. 
- Open `Preview API request`. The policy id in the preview should be the
one from the selected policy
- Switch back to `New hosts`
- Open `Preview API request`. The policy id should be
`<agent_policy_id>` again (not the one from the previously selected
policy)

![Screenshot 2024-02-12 at 17 56
45](https://github.com/elastic/kibana/assets/16084106/6f2e5085-7418-4fef-ac4e-79b57d551722)
  • Loading branch information
criamico authored and CoenWarmer committed Feb 15, 2024
1 parent 604e4fc commit 29ea9f0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function useDevToolsRequest({
newAgentPolicy,
withSysMonitoring && !packagePolicyIsSystem
)}\n\n${generateCreatePackagePolicyDevToolsRequest({
...packagePolicy,
...{ ...packagePolicy, policy_id: '' },
})}`,
i18n.translate(
'xpack.fleet.createPackagePolicy.devtoolsRequestWithAgentPolicyDescription',
Expand Down

0 comments on commit 29ea9f0

Please sign in to comment.