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

[ui] Token management interface on policy pages #15435

Merged
merged 18 commits into from
Dec 15, 2022

Conversation

philrenaud
Copy link
Contributor

@philrenaud philrenaud commented Nov 30, 2022

Adds the ability to view, delete, and create tokens associated with a given policy in the new Policies UI.

Ability to do any of this is available only to manager tokens only.

image

@philrenaud philrenaud self-assigned this Nov 30, 2022
@philrenaud philrenaud marked this pull request as draft November 30, 2022 20:09
@github-actions
Copy link

github-actions bot commented Nov 30, 2022

Ember Asset Size action

As of 0200e2d

Files that got Bigger 🚨:

File raw gzip
nomad-ui.js +8.96 kB +1.55 kB
nomad-ui.css +746 B +136 B

Files that stayed the same size 🤷‍:

File raw gzip
vendor.js 0 B 0 B
vendor.css 0 B 0 B

@github-actions
Copy link

github-actions bot commented Nov 30, 2022

Ember Test Audit comparison

main 0200e2d change
passes 1442 1449 +7
failures 1 0 -1
flaky 0 0 0
duration 000ms 11m 59s 193ms +11m 59s 193ms

@philrenaud philrenaud force-pushed the 15423-ui-tokens-crud-for-adminmanager-tokens branch from 028be51 to c4740e1 Compare December 5, 2022 20:53
@philrenaud philrenaud force-pushed the policies-ui branch 2 times, most recently from 92d8cea to 698068b Compare December 6, 2022 15:59
Base automatically changed from policies-ui to main December 6, 2022 17:45
@philrenaud philrenaud force-pushed the 15423-ui-tokens-crud-for-adminmanager-tokens branch from c4740e1 to 9fa01ac Compare December 6, 2022 18:42
@vercel
Copy link

vercel bot commented Dec 6, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
nomad-storybook-and-ui ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Dec 6, 2022 at 6:48PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
nomad ⬜️ Ignored (Inspect) Dec 6, 2022 at 6:48PM (UTC)

Comment on lines +62 to +67
@media #{$mq-hidden-gutter} {
.token-operations {
grid-auto-flow: row;
grid-template-columns: 1fr;
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

De-columnizes things if you're on a narrow screen
image

@mikenomitch
Copy link
Contributor

Feeling really good.

Small ignorable request: When you create an example token, do you think we could auto-copy to the clipboard? Seems marginally nicer than having the user copy from the alert.

Also, I think the policy name has to be wrapped in quotes in case they have a space. This command will fail for instance:
nomad acl token create -name="<TOKEN_NAME>" -policy=back up -type=client -ttl=<8h>

Should Policy Deleted and Token Deleted alerts be auto-removed? I see why the Example Token created one wouldn't be (since you have to copy), but it might be nice to remove the others after N seconds.

@philrenaud
Copy link
Contributor Author

@mikenomitch Added a "Copy to Clipboard" button and set timeout on that particular notification to 30sec.

Changed timeouts for token and policy deletion from 60sec (¯\_(ツ)_/¯) to 5sec

Added quotes to the example CLI command, thanks for spotting that!

ui/app/abilities/token.js Show resolved Hide resolved
ui/app/components/policy-editor.js Outdated Show resolved Hide resolved
ui/app/controllers/policies/policy.js Outdated Show resolved Hide resolved
ui/app/routes/policies/policy.js Outdated Show resolved Hide resolved
@github-actions
Copy link

Ember Test Audit flaky tests

Ember Test Audit detected these flaky tests on 9b5c207c7e42874650cfb67c0acb9ea6bc3434ab:

  • Acceptance | exec: navigating to a task adds its name to the route, chooses an allocation, and assigns a default command

@philrenaud philrenaud force-pushed the 15423-ui-tokens-crud-for-adminmanager-tokens branch from 9b5c207 to 26d854f Compare December 15, 2022 16:11
@philrenaud philrenaud force-pushed the 15423-ui-tokens-crud-for-adminmanager-tokens branch from 9e06183 to 0200e2d Compare December 15, 2022 17:54
@philrenaud philrenaud changed the title [ui] basic-functionality demo for token CRUD [ui] Component management interface on policy pages Dec 15, 2022
@philrenaud philrenaud changed the title [ui] Component management interface on policy pages [ui] Token management interface on policy pages Dec 15, 2022
@philrenaud philrenaud merged commit c314661 into main Dec 15, 2022
@philrenaud philrenaud deleted the 15423-ui-tokens-crud-for-adminmanager-tokens branch December 15, 2022 18:11
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[ui] Tokens CRUD for admin/manager tokens
3 participants