-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
PKI Issuer Edit #18687
PKI Issuer Edit #18687
Conversation
import Route from '@ember/routing/route'; | ||
import { inject as service } from '@ember/service'; | ||
|
||
export default class PkiRoute extends Route { | ||
@service router; | ||
|
||
redirect() { | ||
this.router.transitionTo('vault.cluster.secrets.backend.pki.overview'); | ||
} | ||
} |
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.
I navigated to the root initially and noticed the blank page so I added a redirect to the overview route.
@@ -383,7 +383,7 @@ module('Acceptance | pki workflow', function (hooks) { | |||
.exists({ count: 9 }, 'Renders 9 info table items under default group'); | |||
assert | |||
.dom(`${SELECTORS.issuerDetails.urlsGroup} ${SELECTORS.issuerDetails.row}`) | |||
.exists({ count: 4 }, 'Renders 4 info table items under URLs group'); | |||
.exists({ count: 3 }, 'Renders 4 info table items under URLs group'); |
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.
This is the result of removing delta_crl_urls
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.
Just some comments! Brain needs some food, so holding off approving
|
||
constructor(owner: unknown, args: Args) { | ||
super(owner, args); | ||
this.usageValues = (this.args.model.usage || '').split(','); |
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.
Would this be a potential use-case for making a transform of attr type stringArray
? Maybe it doesn't come up enough, but I feel like there are lots cases where we get a string array from the backend and want it to actually be an array of strings
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.
Ya that's a really good suggestion. It does seem like this comes up frequently enough that a transform would be helpful so I went ahead and implemented it. I was just about to push but I figured I should run the tests and ran into a catch.
The test for rolling back the attributes on cancel failed and it looks like Ember Data doesn't track the items in an array which is unfortunate. I think in order for it to be worthwhile we would need to figure out a way to retain the rollback functionality. We should definitely keep this in mind because I definitely think it would be valuable but will take a bit more effort than expected.
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.
Thank you for investigating!! This is helpful discovery.
} | ||
|
||
toDetails() { | ||
this.router.transitionTo('vault.cluster.secrets.backend.pki.issuers.issuer.details'); |
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.
you mixed it up here! usually I've seen you pass the transition action as an @onSave
arg to the component. 💭
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.
Hehe. Ya I suppose I did 😁. I guess in the last couple of projects where we have started using this page component pattern I've handled more things internally since the component is only used in the route template.
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.
Nice job! 🚀
* adds pki issuer edit view * updates pki issuer details test and fixes styling issue in issuer edit form * addresses feedback
* adds pki issuer edit view * updates pki issuer details test and fixes styling issue in issuer edit form * addresses feedback
* adds pki issuer edit view * updates pki issuer details test and fixes styling issue in issuer edit form * addresses feedback
* adds pki issuer edit view * updates pki issuer details test and fixes styling issue in issuer edit form * addresses feedback
* adds pki issuer edit view * updates pki issuer details test and fixes styling issue in issuer edit form * addresses feedback
Adds PKI issuer edit form.