Manage automations link on Policies only shows up when a policy which can be automated is in list view
Fleet version: 4.58.0 Web browser and operating system: Any
💥 Actual behavior
The Manage automations link is only visible if there is a policy in view that can run automations.
🧑💻 Steps to reproduce
- Create more than 20 Policies and assign them to All Teams so these policies show up as Inherited and can't run a policy automation (ex: upload the CIS benchmarks to All Teams)
- Create a policy with a name that puts it at the end of the list and assign it to a test team so it can be assigned an automation
- Observe the Manage automations link only shows up once you click Next (or filter the policy) so it is rendered in view
🕯️ More info (optional)
Because I uploaded all the CIS benchmarks, I had to scroll through pages of Policies in order to find an edit a policy that had a script automation attached to it.
related https://github.com/fleetdm/fleet/issues/23051
I was able to reproduce.
Frontend should render the Manage automations link if the team policy count is > 0 (GET /api/latest/fleet/team/{team_id}/policies/count without setting merge_inherited).
Also there's the following related bug that if you have:
- Create team policy called
Aaaaa - 100 CIS policies in All teams (global policies). You can do
fleetctl apply -f ./ee/cis/macos-14/cis-policy-queries.yml - Create team policy called
Zzzzz
Then on the first page if you click on Manage automations, Zzzzz is not displayed.
On the last page if you click on Manage automations, Aaaaa is not displayed.
Duplicate with #23243. Closing
Manage link hidden, Policies, like clouds aloft. Ease now in each view.