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

Silo utilization table #1795

Merged
merged 21 commits into from
Oct 23, 2023
Merged

Silo utilization table #1795

merged 21 commits into from
Oct 23, 2023

Conversation

benjaminleonard
Copy link
Contributor

Presently a user can filter by silo to see its individual utilization. There presently is no real way to easily compare metrics across silos. This is partly due to the API not returning this aggregated data. In the short-term we can stub this out by batching a whole bunch of requests and constructing the table from the merged results – this might also give us some guidance on the shape of the API that we need.

We're working on an idealised design, including quotas – but the details of this are still being worked on, and this PR has the simplest implementation possible right now.

This adds a new hook useApiQueries which is our version of useQueries, but with the key difference that all queries in a given call are using the same API method, and therefore all have the same request and response (Params and Result) types.

@vercel
Copy link

vercel bot commented Oct 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Oct 23, 2023 4:39pm

@david-crespo
Copy link
Collaborator

This is looking pretty good. Couple of things I'm still thinking about:

  • Could take "Capacity" out of the page title, just call it Utilization
  • Tab names of Metrics and Usage are not very informative, but we had a hard time coming up with more concrete names
  • "Usage" in general I don't like because it's the same as Utilization with no special connotation
  • I'll add an e2e test. should actually be pretty easy — will need to use regexes for the table values because the data is randomized
  • Loading state for the table

@paryhin
Copy link

paryhin commented Oct 20, 2023

CleanShot 2023-10-20 at 12 08 00@2x

Looks good, a couple of things that caught my attention:

  1. It took me a while to find the table switch, even though I'm familiar with the UI 🙂. We should make the tabs more visible.
  2. On wider screens, the chart and related data seem too far apart, and based on the proximity of elements is looks like it is grouped with the next value, not the actual one on the left.

It'd be great to address these for future improvements.

@david-crespo
Copy link
Collaborator

Current (and possibly final) state.

2023-10-23-utilization-table

# Conflicts:
#	app/test/e2e/utilization.e2e.ts
@david-crespo david-crespo merged commit a50777c into main Oct 23, 2023
7 checks passed
@david-crespo david-crespo deleted the silo-utilization-table branch October 23, 2023 17:13
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Oct 23, 2023
oxidecomputer/console@3538c32...672cb20

* [672cb208](oxidecomputer/console@672cb208) bump API spec (BGP endpoints, not used yet)
* [a50777c5](oxidecomputer/console@a50777c5) oxidecomputer/console#1795
* [8978e07a](oxidecomputer/console@8978e07a) bump omicron version (no changes)
* [992fb1e1](oxidecomputer/console@992fb1e1) oxidecomputer/console#1797
* [e5b8d029](oxidecomputer/console@e5b8d029) remove unnecessary @types/testing-library__jest-dom dep
* [e9a78617](oxidecomputer/console@e9a78617) tanstack query 5 went stable
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Oct 23, 2023
oxidecomputer/console@3538c32...8e74acc

* [8e74accf](oxidecomputer/console@8e74accf) handle empty metrics list on silo utilization
* [672cb208](oxidecomputer/console@672cb208) bump API spec (BGP endpoints, not used yet)
* [a50777c5](oxidecomputer/console@a50777c5) oxidecomputer/console#1795
* [8978e07a](oxidecomputer/console@8978e07a) bump omicron version (no changes)
* [992fb1e1](oxidecomputer/console@992fb1e1) oxidecomputer/console#1797
* [e5b8d029](oxidecomputer/console@e5b8d029) remove unnecessary @types/testing-library__jest-dom dep
* [e9a78617](oxidecomputer/console@e9a78617) tanstack query 5 went stable
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Oct 23, 2023
oxidecomputer/console@3538c32...bd65b9d

* [bd65b9da](oxidecomputer/console@bd65b9da) loading state for utilization table, use QueryParamTabs
* [8e74accf](oxidecomputer/console@8e74accf) handle empty metrics list on silo utilization
* [672cb208](oxidecomputer/console@672cb208) bump API spec (BGP endpoints, not used yet)
* [a50777c5](oxidecomputer/console@a50777c5) oxidecomputer/console#1795
* [8978e07a](oxidecomputer/console@8978e07a) bump omicron version (no changes)
* [992fb1e1](oxidecomputer/console@992fb1e1) oxidecomputer/console#1797
* [e5b8d029](oxidecomputer/console@e5b8d029) remove unnecessary @types/testing-library__jest-dom dep
* [e9a78617](oxidecomputer/console@e9a78617) tanstack query 5 went stable
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Oct 23, 2023
oxidecomputer/console@3538c32...bd65b9d

* [bd65b9da](oxidecomputer/console@bd65b9da)
loading state for utilization table, use QueryParamTabs
* [8e74accf](oxidecomputer/console@8e74accf)
handle empty metrics list on silo utilization
* [672cb208](oxidecomputer/console@672cb208)
bump API spec (BGP endpoints, not used yet)
* [a50777c5](oxidecomputer/console@a50777c5)
oxidecomputer/console#1795
* [8978e07a](oxidecomputer/console@8978e07a)
bump omicron version (no changes)
* [992fb1e1](oxidecomputer/console@992fb1e1)
oxidecomputer/console#1797
* [e5b8d029](oxidecomputer/console@e5b8d029)
remove unnecessary @types/testing-library__jest-dom dep
* [e9a78617](oxidecomputer/console@e9a78617)
tanstack query 5 went stable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants