Open hop-dev opened 1 year ago
Pinging @elastic/fleet (Team:Fleet)
While working on fixes for bulk agent actions in https://github.com/elastic/kibana/pull/177035, I noticed Fleet backend could probably be simplified quite a bit if this flag was removed. An example is querying agents by kuery, which is used by agent actions in bulk selection mode: the showInactive
flag is expected and defaults to false
, in which case it pushes an extra filtering condition to exclude inactive and unenrolled status.
Another observation which is possibly related (I'm not sure): Fleet currently has some UI logic where the agent breakdown by status above the agents table only shows the inactive and unenrolled status if at least one of them is selected in the status filter:
vs.
@jillguyonnet thanks for linking this issue! It made me think about the draft pr that instead of introducing a new flag includeUnenrolled
we could indeed get rid of showInactive
as well and use status filters. I agree that the meaning of showInactive
is confusing.
instead of introducing a new flag includeUnenrolled we could indeed get rid of showInactive as well and use status filters. I agree that the meaning of showInactive is confusing.
Thanks Julia, and agreed, that would be a good improvement 👍
I added the Spacetime
label as I thought that might be a good way to nudge this a bit - cc @kpollich for visibility
I spent some time to refactor to get rid of showInactive
based on this pr, but I feel it's adding a lot of complexity to add the status filters everywhere in the kuery
. For now I decided on a simpler approach to fix the issue reported here.
We can look into this refactor more during a spacetime week.
Now that we have moved to using runtime fields for statuses, I believe the showInactive flag isn't needed as we can easily use status filters and omit inactive and unenrolled, this will simplify our API a lot as I find the showInactive flag a bit confusing some times.