[Fleet] Do not use inactivity timeouts of 0 when calculating agent status (#148977)

Closes #148961

## Summary

When gathering agent policies with inactivity timeouts, do not return
agent policies with a timeout of 0.

Inactivity timeout of 0 is considered not having an inactivity timeout.
This commit is contained in:
Mark Hopkin 2023-01-16 21:56:48 +00:00 committed by GitHub
parent c594f606e8
commit 7c392ffcc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1042,7 +1042,7 @@ class AgentPolicyService {
type: SAVED_OBJECT_TYPE,
page: 1,
perPage: SO_SEARCH_LIMIT,
filter: `${SAVED_OBJECT_TYPE}.attributes.inactivity_timeout: *`,
filter: `${SAVED_OBJECT_TYPE}.attributes.inactivity_timeout > 0`,
fields: [`inactivity_timeout`],
});