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 last used column for API tokens #12114

Merged
merged 2 commits into from
Jan 21, 2025
Merged

Conversation

nwmac
Copy link
Member

@nwmac nwmac commented Oct 3, 2024

Summary

Fixes #11870

Occurred changes and/or fixed issues

The PR adds the 'Last Used' information for API tokens, as implemented by this backend PR: rancher/rancher#45732

Technical notes summary

Fairly simple - we define a new column and add it to the API Keys/Tokens table. Added translation as well.

Note: This PR has been updated following review to show Unknown for the case that information is not available, since we can not determine been a token that has not been used and one that was created before this feature was updated, which may have been used.

Areas or cases that should be tested

  • Go to the API Keys from the user preference menu (top right avatar)
  • Verify that the tokens table included a 'Last Used' column
  • Check the column sorting works correctly
  • Hover over one of the Last Used cells and check that a tooltip appears, showing the absolute date/time

Screenshot/Video

New 'Last Used' column:
image

Hover on last used shows absolute date/time:
image

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@nwmac nwmac self-assigned this Oct 3, 2024
@nwmac nwmac requested a review from richard-cox October 3, 2024 14:51
@rancher-ui-project-bot rancher-ui-project-bot bot added this to the v2.10.0 milestone Oct 3, 2024
Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

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

Added question in comment. I couldn't see this working either using latest head

shell/config/table-headers.js Outdated Show resolved Hide resolved
@nwmac nwmac requested review from mantis-toboggan-md and removed request for mantis-toboggan-md October 4, 2024 16:18
@nwmac
Copy link
Member Author

nwmac commented Oct 4, 2024

@richard-cox Backend is not merge - I tested with a locally built Rancher from the backend PR.

@nwmac nwmac modified the milestones: v2.10.0, v2.11.0 Oct 22, 2024
@nwmac nwmac modified the milestones: v2.12.0, v2.11.0 Nov 1, 2024
@nwmac nwmac modified the milestones: v2.11.0, v2.13.0 Jan 6, 2025
@rancher-ui-project-bot rancher-ui-project-bot bot modified the milestones: v2.13.0, v2.12.0 Jan 20, 2025
@nwmac nwmac modified the milestones: v2.12.0, v2.11.0 Jan 20, 2025
@nwmac nwmac requested a review from richard-cox January 20, 2025 14:35
@nwmac nwmac force-pushed the add-token-last-used branch from e73fd4d to 63ae9b5 Compare January 20, 2025 14:35
@nwmac nwmac merged commit 8c0ced4 into rancher:master Jan 21, 2025
32 checks passed
@nwmac nwmac deleted the add-token-last-used branch January 21, 2025 08:57
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.

[RFE] Expose LastUsed time for tokens
2 participants