-
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 Role's model and List view #17134
Conversation
@@ -0,0 +1,3 @@ | |||
import PkiRoleAdapter from './pki-role'; |
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.
extending the current PKI adapter. This allows us to take advantage of PKI adapter work that is already functional, while also allowing us to add more network requests in this file that are not used in the current PKI engine. When we complete this work, we can think about refactoring the current PKI adapter, but we determined that was outside the scope of this project's initial phase (just getting the work done and functional). The PKI adapter is dependent on other adapters and kind of a maze to work through. It's not an easy task to refactor at this point. This will come up when we remove the old PKI work.
|
||
export default class BlogPostController extends Controller { | ||
get mountPoint() { | ||
return getOwner(this).mountPoint; |
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.
we need the mountPoint because this is an engine and for the LinkedBlock component to work it needs to know where in the App it is. This is passed through as a param called linkPrefix.
|
||
async model() { | ||
// the pathHelp service is needed for adding openAPI to the model | ||
await this.pathHelp.getNewModel('pki/pki-role-engine', 'pki'); |
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 normally don't see this method being called in other secret engines because it's done automatically when visiting the backend.list-root route, however we're not visiting that route because of the mounting of where this engine is. Therefor we have to move some functionality the list-route gives us to this model.
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.
LGTM nice work!
name; | ||
|
||
// must be a getter so it can be added to the prototype needed in the pathHelp service on the line here: if (newModel.merged || modelProto.useOpenAPI !== true) { | ||
get useOpenAPI() { |
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 PR starts the setup for the PKI roles model and gets the Roles List View setup.
The Roles model will undergo some tweaks, but the connection and openAPI are setup here. I can't finalize the model until I work through some questions with the backend and design. The model will be finalized when I work on the Roles Create view.
Below is a video of the changes. I start by showing the empty state, routing, and then the model with all of the OpenAPI params at the end. (The video makes it look like I'm missing some border styling, it's just the video quality).
pki-roles-list.mov