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: PKI config via import #18504

Merged
merged 5 commits into from
Jan 4, 2023
Merged

Conversation

hashishaw
Copy link
Collaborator

@hashishaw hashishaw commented Dec 20, 2022

Allows user to configure the pki engine via the /pki/issuers/import/bundle endpoint, with pem_bundle on the payload.

(Issuer details view is on a different PR which is not merged at the time of the screenshot)

pki-config-import

@hashishaw hashishaw added this to the 1.13.0-rc1 milestone Dec 20, 2022
@hashishaw hashishaw changed the title UI: PKI config via import with updated textarea component UI: PKI config via import Dec 20, 2022
@hashishaw hashishaw marked this pull request as ready for review December 20, 2022 21:00
@hashishaw hashishaw force-pushed the ui/VAULT-6514/pki-config-via-import branch from e8b7724 to db3a6ac Compare January 3, 2023 15:55
Copy link
Contributor

@hellobontempo hellobontempo left a comment

Choose a reason for hiding this comment

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

Nice job!! Some comments and questions, but shouldn't be anything blocking. 😄

@attr() importedIssuers;
@attr() importedKeys;

get backend() {
Copy link
Contributor

Choose a reason for hiding this comment

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

😍

ui/app/models/pki/config/import.js Outdated Show resolved Hide resolved
ui/lib/pki/addon/components/page/pki-issuer-details.hbs Outdated Show resolved Hide resolved
@@ -12,6 +12,8 @@ export default class PkiOverviewRoute extends Route {
}

hasConfig() {
// When the engine is configured, it creates a default issuer.
Copy link
Contributor

Choose a reason for hiding this comment

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

thank you for the comment! 🤩

this.configModel = model;
}

willDestroy() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't seen much use of the lifecycle hooks in glimmer components, aside from the constructor, so I'm curious about the reasoning behind using willDestroy here 💭

The form pattern I've seen us use lately is a cancel action that unloads the record and then calls something like this.args.onCancel which is usually the transition, if there is one

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

unloading with onCancel is fine for when the user explicitly leaves the page, but in a case where, for example, the user clicks "back" or on another link, we also want the model to reset which is where the willDestroy hook comes in handy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, one other reason -- since this form is being rendered inline on the page, we want the import config model to reset if the user clicks on a different option, so there aren't multiple config models floating around

Copy link
Contributor

Choose a reason for hiding this comment

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

Ohhh, yes! That makes sense!

@hashishaw hashishaw enabled auto-merge (squash) January 4, 2023 17:43
@hashishaw hashishaw force-pushed the ui/VAULT-6514/pki-config-via-import branch from bdc3acc to 9964c4d Compare January 4, 2023 17:56
@hashishaw hashishaw merged commit 9ff106f into main Jan 4, 2023
@hashishaw hashishaw deleted the ui/VAULT-6514/pki-config-via-import branch January 4, 2023 18:34
joshbrand pushed a commit that referenced this pull request Jan 11, 2023
AnPucel pushed a commit that referenced this pull request Jan 14, 2023
dhuckins pushed a commit that referenced this pull request Jan 19, 2023
dhuckins pushed a commit that referenced this pull request Jan 19, 2023
AnPucel pushed a commit that referenced this pull request Jan 25, 2023
AnPucel pushed a commit that referenced this pull request Feb 3, 2023
jayant07-yb pushed a commit to jayant07-yb/hashicorp-vault-integrations that referenced this pull request Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants