Update the API Tokens UI for new token format and status.
Review Request #12527 — Created Aug. 10, 2022 and submitted
Information | |
---|---|
david | |
Review Board | |
release-5.0.x | |
Reviewers | |
reviewboard | |
This change updates the API tokens config page for most of the
features supported by the new API token generator:
- Long API tokens are displayed nicely, inside an
<input>
element with
a copy button. - A label shows when each token was last used.
- Tokens which are expired or invalidated will show when that happened,
and in the case of invalidation, will show the message. - Tokens with an expiration date will show the time left.
There's still some future work left to do in later changes:
- Allow people to set the expiration date.
- Show a warning when a token was created with a deprecated generator
class.
Based on work by Michelle Aubin at /r/12492/
- Ran unit tests.
- Ran js-tests.
- Set up a bunch of different API tokens with various expiration dates
and validity settings. Checked that everything displayed correctly. - Checked that the copy button functioned as expected.
Summary | |
---|---|
Description | From | Last Updated |
---|---|---|
I feel like the borders add so much visual noise. Can we maybe hide then until hovering over a row? |
|
|
Can we document these? |
|
|
"Copy to clipboard" should be localized. |
|
|
"Expired <...>" should be localized. Same for other strings in this template. |
|
-
-
-
-
reviewboard/static/rb/js/accountPrefsPage/views/apiTokensView.es6.js (Diff revision 1) "Copy to clipboard" should be localized.
-
reviewboard/static/rb/js/accountPrefsPage/views/apiTokensView.es6.js (Diff revision 1) "Expired <...>" should be localized.
Same for other strings in this template.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+364 -40) |
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.