Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new "Low Disk Space" hosts count card to dashboard, and low_disk_space query param when listing all hosts #7593

Closed
9 of 10 tasks
lukeheath opened this issue Sep 6, 2022 · 3 comments
Assignees
Labels
~frontend Frontend-related issue. ~legacy-interface-product-group Associated with the legacy "interface" product group. (No longer exists)
Milestone

Comments

@lukeheath
Copy link
Member

lukeheath commented Sep 6, 2022

Problem

I'm an engineer managing thousands of hosts and I'm overwhelmed with tracking the following goal:

  • Know how many hosts, and which hosts, have low disk space.

This makes is hard to know what hosts I need to take action on.

Goals

  1. Know how many hosts have a low disk space.

  2. Know which hosts have a low disk space

Requirements

  • Fleet Premium users can see how many hosts (count) have less than 32 GB of disk space remaining.
  • Fleet Premium users can navigate to a list of hosts filtered by hosts that have less than 32 GB of their disk space remaining. The user can navigate to this list via the Fleet UI or by pasting a URL in their browsers URL bar.
  • The UI is powered by updates to the GET /host_summary API route.
  • The Fleet API supports adding more granularity in the future. For example, later, we may want to add the ability to see how many hosts have less than 16 GB of their disk space remaining.
  • On Home page, user can see count of low disk space hosts that belong to a specific platform.
    • If user selects the Home page card when filtering by low disk space + platform, they see the Hosts page with only the missing filter applied.

Related

Figma

https://www.figma.com/file/hdALBDsrti77QuDNSzLdkx/%F0%9F%9A%A7-Fleet-EE-(dev-ready%2C-scratchpad)?node-id=9280%3A311601

API

  1. Update the GET /host_summary API route
  1. Add new param to GET /hosts to filter by missing hosts.

Specced by @RachelElysia

Tasks

1

  • For Premium Users only: Add 1 cards to 2 card div to homepage that stack at smaller widths

3

Low disk space card

  • Display low disk space count, along with icon, and tooltip text
  • Tooltip displays: "Hosts that have 32 GB or less disk space available."
  • Make area around the icon, count, and name clickable
  • Clicking on the area will redirect to the filter on the manage host page

Image

4

Manage host page

  • Manage host page can be filtered and unfiltered by Low disk space hosts
  • Filter includes tooltip: "Hosts that have 32 GB or less disk space available."

Image

5

Frontend tech

  • Missing hosts PR first, build upon that
  • Wait for backend to decide on query string params
  • Use buildQueryStringFromParams() function in /url and reconcileMutuallyExclusiveParams()
@lukeheath lukeheath added ~legacy-interface-product-group Associated with the legacy "interface" product group. (No longer exists) ~frontend Frontend-related issue. labels Sep 6, 2022
@lukeheath
Copy link
Member Author

@RachelElysia I'm assigning you this issue to finish specifications and bring to estimation. Please prioritize this issue in order to complete specs this week, as we will be bringing this into the next release cycle.

@mna
Copy link
Member

mna commented Sep 20, 2022

@RachelElysia heads-up, after some discussion on the backend ticket, we'll go with low_disk_space=<number of gigs> as parameter, to support some flexibility for future requirements (#7592 (comment)). So for now, the frontend query would use low_disk_space=32 when filtering for hosts with low disk space.

EDIT: apologies! I initially named the parameter low_disk_count but it should be low_disk_space!

@mna
Copy link
Member

mna commented Sep 21, 2022

@RachelElysia another recent adjustment similar to the previous point, the GET /host_summary endpoint will also accept a new low_disk_space=N query parameter (which for now should be set to 32 in the frontend). When this parameter is provided in Fleet Premium, it will return the new low_disk_space_count field with a count of hosts that have less than this number of GB. The low_disk_space_count field will not be returned at all if the low_disk_space query parameter is not provided (or if the license is not premium).

Also note that I edited the previous comment, I had made a mistake in the query param's name!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~frontend Frontend-related issue. ~legacy-interface-product-group Associated with the legacy "interface" product group. (No longer exists)
Development

No branches or pull requests

3 participants