fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Show policy pass/fail percentage in live query UI

Open Patagonia121 opened this issue 1 year ago • 5 comments

Goal

User story
As a user running a policy as a live query,
I want to see a pass/fail percentage
so that I can get that data without exporting a CSV.

Context

  • Requestor(s): @Patagonia121
  • Product designer: @rachaelshaw

Changes

Product

Engineering

  • [ ] Database schema migrations: TODO
  • [ ] Load testing: TODO

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

  • Requires load testing: TODO
  • Risk level: Low / High TODO
  • Risk description: TODO

Manual testing steps

  1. Step 1
  2. Step 2
  3. Step 3

Testing notes

Confirmation

  1. [ ] Engineer (@____): Added comment to user story confirming successful completion of QA.
  2. [ ] QA (@____): Added comment to user story confirming successful completion of QA.

Patagonia121 avatar Jan 31 '24 15:01 Patagonia121

Original request from @Patagonia121:

Today, if a user wants to run a policy on a set of hosts, when the query is finished, the results page returns a list of hosts with a simple yes/no status if the host is compliant or in violation.

Screenshot 2024-01-31 at 07 19 14

What the customer would prefer to see on this page is a simple % metric somewhere in the UI that shows how many hosts failed the policy vs passed. Normally to understand the percentage of failures, the user would export the results via CSV and then do the math outside of Fleet in a spreadsheet, but this creates a lot of extra steps for the customer.

The reason for this is that they have an internal SOP for enforcing macOS updates. If the customer was running a policy for "hosts on a X version of macOS", once they hit a certain percentage of passing hosts, they send out comms to the end users like "We will block machines that aren't updated by X date"

They don't want to send comms or "lock themselves into the block date" before the percentage is where they want it.

rachaelshaw avatar Feb 19 '24 16:02 rachaelshaw

@rachaelshaw, do we want these percentages to update up live as results are returned?

Screenshot 2024-03-01 at 10 05 07 AM

Mike and I think that this question will come up during implementation time but may as well specify how we'd like it to behave before we start writing code.

noahtalerman avatar Mar 01 '24 15:03 noahtalerman

@noahtalerman that came up yesterday at estimation: talked about updating it as the table updates; if it ends up looking odd, sounds like it'd be a relatively small change to display it at the end instead.

I'm now of rethinking that because of the tooltip, though— I think we could run into some weird edge cases with that. Probably simpler to go ahead and not display it until the end. I'll update the dev note.

cc @RachelElysia @jacobshandling

rachaelshaw avatar Mar 01 '24 17:03 rachaelshaw

UPDATE: I was wrong! Please ignore my earlier message.

We want to work on this story in the next sprint. This separate story is the one that we're bringing to feature fest: #17211

Sorry about the confusion.

~~@rachaelshaw and I decided to bring this one back through feature fest so we can decide if we want to spend more time on it then.~~

~~Fleet getting in your calendar is the priority. ~~

noahtalerman avatar Mar 04 '24 19:03 noahtalerman

cc @sharon-fdm ^^

noahtalerman avatar Mar 04 '24 19:03 noahtalerman

@rachaelshaw Figma says "percentage of targeted hosts" – does "targeted hosts" include hosts that return an error? So if I have 1 Yes, 2 Nos, 1 error, should yes say 33% or 25%? cc @RachelElysia

jacobshandling avatar Apr 16 '24 16:04 jacobshandling

@Patagonia121 this was shipped in v4.49.0

rachaelshaw avatar Apr 25 '24 18:04 rachaelshaw

Live query unfolds, Pass/fail data in view, Insight in each node.

fleet-release avatar Apr 25 '24 18:04 fleet-release