mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
This commit is contained in:
parent
c0d416b803
commit
3906188cbb
1 changed files with 3 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { sendGetAgentPolicies, sendGetAgents } from '../../../hooks';
|
||||
import type { Output } from '../../../types';
|
||||
import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '../../../constants';
|
||||
import { AGENT_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../../constants';
|
||||
|
||||
export async function getAgentAndPolicyCountForOutput(output: Output) {
|
||||
let kuery = `${AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:"${output.id}" or ${AGENT_POLICY_SAVED_OBJECT_TYPE}.monitoring_output_id:"${output.id}"`;
|
||||
|
@ -16,6 +16,8 @@ export async function getAgentAndPolicyCountForOutput(output: Output) {
|
|||
}
|
||||
const agentPolicies = await sendGetAgentPolicies({
|
||||
kuery,
|
||||
page: 1,
|
||||
perPage: SO_SEARCH_LIMIT,
|
||||
});
|
||||
|
||||
if (agentPolicies.error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue