Skip to content

[Web] Implement Instance Inventory UI#62027

Merged
rudream merged 2 commits intomasterfrom
yassine/inventory-frontend
Dec 19, 2025
Merged

[Web] Implement Instance Inventory UI#62027
rudream merged 2 commits intomasterfrom
yassine/inventory-frontend

Conversation

@rudream
Copy link
Copy Markdown
Contributor

@rudream rudream commented Dec 5, 2025

Purpose

This PR is part of #60528

This PR adds the new "Instance Inventory" page to the Web UI, which allows users to list instances and bot instances with support for search, sorting, and filtering by various criteria.

e counterpart: https://github.com/gravitational/teleport.e/pull/7732

Figma mockups

Required merges

Implementation

A new type of filter component was created for filtering by versions, this contains some preset version filters based on common use-cases as well as the option for a custom filter where the user can enter their own. This filter control works under the hood by appending a predicate query for that given filter selection to the request, it will combine with any other search/predicate query entered by the user, however it will not populate the advanced search bar.

For bot instances, the services column contains a deeplink button which takes the user to the Bot Instances dashboard with that bot instance in view.

The language for the upgraders differs slightly from those shown in the Figma mockup, as the ones used there are not very accurate and the autoupdate team suggested to use different labels.

Demo

Example default view

image

Multiple filters and search active

image

Filter controls

image image image image image

@rudream rudream added no-changelog Indicates that a PR does not require a changelog entry backport/branch/v18 labels Dec 5, 2025
@public-teleport-github-review-bot
Copy link
Copy Markdown

@rudream - this PR will require admin approval to merge due to its size. Consider breaking it up into a series smaller changes.

1 similar comment
@public-teleport-github-review-bot
Copy link
Copy Markdown

@rudream - this PR will require admin approval to merge due to its size. Consider breaking it up into a series smaller changes.

@rudream rudream force-pushed the yassine/inventory-frontend branch from 884f7a8 to b9f9ff1 Compare December 5, 2025 15:56
Bots ResourceAccess `json:"bots"`
// BotInstances defines access to manage bot instances
BotInstances ResourceAccess `json:"botInstances"`
// Instances defines access to manage instances
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Instances defines access to manage instances
// Instances defines access to view instance inventory.

Copy link
Copy Markdown
Contributor Author

@rudream rudream Dec 7, 2025

Choose a reason for hiding this comment

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

Technically the acl here contains all the permissions for KindInstance, including create, edit, and delete (which we may use in the future for another feature). I think it'd be more correct to keep the language here more generic

@rudream rudream force-pushed the yassine/inventory-frontend branch from b9f9ff1 to 96f43c7 Compare December 7, 2025 19:14
@rudream rudream requested review from ravicious and removed request for espadolini and flyinghermit December 7, 2025 19:24
Copy link
Copy Markdown
Contributor

@nicholasmarais1158 nicholasmarais1158 left a comment

Choose a reason for hiding this comment

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

Overall, looks good. A few non-major comments.

I think this feature is sufficiently complicated to warrant adding a few tests. Provide a safety net for future you and other maintainers. Don't necessarily cover everything, just the parts that are important, complex, or a pain to regression test manually.

@rudream rudream force-pushed the yassine/inventory-init-cache branch 2 times, most recently from f93e1cf to 1b340ca Compare December 11, 2025 19:20
@rudream rudream force-pushed the yassine/inventory-frontend branch 4 times, most recently from 5dda58e to cd07c74 Compare December 11, 2025 22:56
@rudream rudream requested a review from ravicious December 11, 2025 22:58
@rudream rudream removed the request for review from strideynet December 16, 2025 16:33
Copy link
Copy Markdown
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

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

I submitted a bunch of nitpicks but looks good overall. I agree with Michael's comment wrt the UI for version filters, but I suppose this can be addressed in a further PR.

const {
isSuccess,
data,
isLoading,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good feedback, it could also be isLoading || isRefetching which I think describes the purpose in a slightly more clear (and universal) manner. But it doesn't really matter that much.

https://tanstack.com/query/v5/docs/framework/react/reference/useInfiniteQuery

Copy link
Copy Markdown
Contributor

@avatus avatus left a comment

Choose a reason for hiding this comment

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

Once other nits have been addressed, LGTM

@rudream rudream force-pushed the yassine/inventory-webapi branch from 0d83eaa to 06e4cee Compare December 17, 2025 16:38
@rudream rudream force-pushed the yassine/inventory-frontend branch from fbdd28c to b75e401 Compare December 17, 2025 16:43
@rudream rudream force-pushed the yassine/inventory-webapi branch from 06e4cee to de933f4 Compare December 18, 2025 16:07
@rudream rudream force-pushed the yassine/inventory-frontend branch from b75e401 to b28bbf0 Compare December 18, 2025 16:12
@rudream rudream force-pushed the yassine/inventory-webapi branch from de933f4 to a1a584e Compare December 19, 2025 17:29
Base automatically changed from yassine/inventory-webapi to master December 19, 2025 18:09
@rudream rudream force-pushed the yassine/inventory-frontend branch 2 times, most recently from 974a984 to 9e8474f Compare December 19, 2025 19:15
@rudream rudream force-pushed the yassine/inventory-frontend branch from 9e8474f to 3654b3f Compare December 19, 2025 19:30
@rudream rudream enabled auto-merge December 19, 2025 20:04
@rudream rudream added this pull request to the merge queue Dec 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 19, 2025
@rudream rudream added this pull request to the merge queue Dec 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 19, 2025
@rudream rudream enabled auto-merge December 19, 2025 23:10
@rudream rudream added this pull request to the merge queue Dec 19, 2025
Merged via the queue into master with commit 4eb8586 Dec 19, 2025
45 checks passed
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@rudream See the table below for backport results.

Branch Result
branch/v18 Failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/branch/v18 no-changelog Indicates that a PR does not require a changelog entry size/xl ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants