fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
3.07k stars 425 forks source link

Manage automations link on Policies only shows up when a policy which can be automated is in list view #23047

Open allenhouchins opened 5 days ago

allenhouchins commented 5 days ago

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

  1. 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)
  2. 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
  3. 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.

Screenshot 2024-10-21 at 9 39 19 AM Screenshot 2024-10-21 at 9 47 25 AM
PezHub commented 5 days ago

related https://github.com/fleetdm/fleet/issues/23051

lucasmrod commented 4 days ago

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:

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.