-
Notifications
You must be signed in to change notification settings - Fork 258
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
align: 'left', | ||
sort: ['lastUsedAt'], | ||
width: 200, | ||
formatter: 'LiveExpiryDate' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tricky one. Do existing tokens get updated on upgrade? when lastUsedAt is empty we'll show Never
, which is a bit inaccurate.
Could add something like formatterOpts: { missingKey: 'generic.unknown' },
and plumb that into LifeExpiryDate via the prop below?
missingKey: {
type: String,
default: `generic.never`,
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will take a look - agreed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. although for a newly created token, I think it is empty, so showing Never is accurate, since it's never been used... will check on a fresh system by creating a token then upgrading Rancher.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah good point. maybe just leaving empty would be the best option?
@richard-cox Backend is not merge - I tested with a locally built Rancher from the backend PR. |
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 aell.
Areas or cases that should be tested
Screenshot/Video
New 'Last Used' column:
Hover on last used shows absolute date/time:
Checklist