Update the API Tokens UI for new token format and status.
Review Request #12527 — Created Aug. 10, 2022 and submitted
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 | ID |
---|---|
737831d73541319b9f4b973c71106f6a6dae78c1 |
Description | From | Last Updated |
---|---|---|
I feel like the borders add so much visual noise. Can we maybe hide then until hovering over a row? |
chipx86 | |
Can we document these? |
chipx86 | |
"Copy to clipboard" should be localized. |
chipx86 | |
"Expired <...>" should be localized. Same for other strings in this template. |
chipx86 |
- Commits:
-
Summary ID 16a423222d2f22830fe8af41f3cc15ca2c29d8dc 737831d73541319b9f4b973c71106f6a6dae78c1 - Diff:
-
Revision 2 (+364 -40)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.