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

UI - Update Client Count filtering #28036

Merged
merged 10 commits into from
Aug 22, 2024

Conversation

hashishaw
Copy link
Contributor

@hashishaw hashishaw commented Aug 8, 2024

Description

This PR updates the Client Count dashboard in a number of ways, including:

  • setting a namespace filter will re-query the API with the namespace added as a header, and the counts reflect the selected namespace and its children

  • you no longer need to apply a namespace filter before applying a mount filter. Mounts shown reflect the selected namespace filter OR the current namespace

  • attribution for child namespaces and mount paths within the current (filtered) namespace are shown unless there is no data OR the data is filtered at the mount level

  • Main client counts chart on overview page is updated to a grouped bar chart showing total v new clients

  • Export button is moved to the page header, and now queries the activity export API. It is hidden if there is no data for the date range & namespace, or if the user does not have sudo capabilities on the export endpoint.

  • Ent tests pass

Screenshots

image

Within a namespace:
Screenshot 2024-08-21 at 16 35 33

* Pass namespace from url param to adapter

* Add helper method on namespace service for calculating full namespace path

* add adapter test coverage, update counts route TS

* update selectors, add test coverage for new functionality
@hashishaw hashishaw added the ui label Aug 8, 2024
@hashishaw hashishaw added this to the 1.18.0-rc milestone Aug 8, 2024
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 2024

CI Results:
All Go tests succeeded! ✅

* Add filtering to mirage data based on namespace header

* use filtering on custom acme CC test

* fix filtering logic
* remove unused arg newUsageCounts

* update filterActivityResponse to use a deep copy of the data

* move export-button to clients/page-header component

* Use page-header on clients counts page

* remove export concerns from attribution component

* remove unused arg

* remove unused getter

* add copyright

* address PR comments
* move overview-only attrs to overview component

* update types, make the static data make sense

* update month block types

* Update attribution component with tests

* update overview component and tests

* cleanup

* copy updates + cleanup

* more cleanup

* fix tests
* add filterByMonthDataForMount util method

* remove namespaces_by_key usages, tests, and related util 🎉

* remove unused

* test coverage for filterByMonthDataForMount

* remove average clients from pages, fix acme tests

* fix tests, fix no data date range on load, update function so it makes a copy of data

* consolidate filtered totals logic

* remove log

* clean
* always show both namespace and mount filters

* Only show filters section if there exist mount attribution (aka there is data to filter)

* Update filter placeholders to reflect current namespace

* Update overview component & test

* update page::counts test and behavior

* cleanup

* fix test for community + no start date

* Add header

* tidy

* address PR comment
* copy from stacked chart

* grouping works on bar chart

* fix colors and add legend

* Add upgrade info to tooltip

* Use grouped bar chart instead of line on running totals

* initial test

* update grouped bar chart + tests

* remove line chart

* fix colors and attributes

* fix other tests

* more test cleanup

* Skip warning message from client count API on dashboard only

* add assertion that warning shows up for default date range

* update export button to hide when no data

* cleanup dashboard test

* Add copyright

* add application adapter test

* ugh copyright
@hashishaw hashishaw marked this pull request as ready for review August 22, 2024 14:34
@hashishaw hashishaw requested a review from a team as a code owner August 22, 2024 14:34
Copy link

Build Results:
All builds succeeded! ✅

Copy link
Contributor

@Monkeychip Monkeychip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants