-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] change UX of edit integration policy agent policies (#190583)
## Summary Closes #186629 Changed UX of edit integration policy page to update agent policies. To verify: - Add integration or create new agent policy with system integration - Edit the integration policy - Verify that the UI allows adding new agent policy with making changes to existing agent policies <img width="1509" alt="image" src="https://github.com/user-attachments/assets/71ae926c-4b13-4d58-b199-3d17b0649e24"> <img width="978" alt="image" src="https://github.com/user-attachments/assets/835b2d82-27ab-4361-98ca-dac401609bde"> ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
- Loading branch information
1 parent
f22bc8d
commit dc7290b
Showing
10 changed files
with
419 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...ions/agent_policy/create_package_policy_page/components/steps/components/use_policies.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { SO_SEARCH_LIMIT } from '../../../../../../../../../common'; | ||
import { useGetAgentPolicies } from '../../../../../../../../hooks'; | ||
|
||
export const useAllNonManagedAgentPolicies = () => { | ||
const { data: agentPoliciesData, error: err } = useGetAgentPolicies({ | ||
page: 1, | ||
perPage: SO_SEARCH_LIMIT, | ||
sortField: 'name', | ||
sortOrder: 'asc', | ||
full: false, // package_policies will always be empty | ||
noAgentCount: true, // agentPolicy.agents will always be 0, | ||
kuery: 'ingest-agent-policies.is_managed:false', | ||
}); | ||
if (err) { | ||
// eslint-disable-next-line no-console | ||
console.debug('Could not retrieve agent policies'); | ||
} | ||
return agentPoliciesData?.items || []; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.