diff --git a/ui/admin/app/components/form/credential-library/index.hbs b/ui/admin/app/components/form/credential-library/index.hbs index beef7e8c6..88154aa84 100644 --- a/ui/admin/app/components/form/credential-library/index.hbs +++ b/ui/admin/app/components/form/credential-library/index.hbs @@ -12,6 +12,7 @@ @label={{t 'form.name.label'}} @error={{@model.errors.name}} @helperText={{t 'form.name.help'}} + disabled={{@model.isSaving}} readonly={{false}} as |field| > @@ -31,7 +32,7 @@ @label={{t 'form.description.label'}} @error={{@model.errors.description}} @helperText={{t 'form.description.help'}} - @disabled={{@model.isSaving}} + disabled={{@model.isSaving}} readonly={{false}} as |field| > @@ -51,6 +52,7 @@ @label={{t 'resources.credential-library.form.vault_path.label'}} @error={{@model.errors.attributes_path}} @helperText={{t 'resources.credential-library.form.vault_path.help'}} + disabled={{@model.isSaving}} readonly={{false}} as |field| > @@ -74,6 +76,7 @@ @selectedValue={{@model.attributes.http_method}} @changed={{fn (mut @model.attributes.http_method)}} @inline={{true}} + disabled={{@model.isSaving}} as |radioGroup| > {{#each this.httpMethodOptions as |httpMethod|}} diff --git a/ui/admin/app/router.js b/ui/admin/app/router.js index 3c359e268..a1bfa1e18 100644 --- a/ui/admin/app/router.js +++ b/ui/admin/app/router.js @@ -93,6 +93,11 @@ Router.map(function () { function () { this.route('credential-libraries', function () { this.route('new'); + this.route( + 'credential-library', + { path: ':credential_library_id' }, + function () {} + ); }); } ); diff --git a/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library.js b/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library.js new file mode 100644 index 000000000..45f5953fb --- /dev/null +++ b/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library.js @@ -0,0 +1,49 @@ +import Route from '@ember/routing/route'; + +export default class ScopesScopeCredentialStoresCredentialStoreCredentialLibrariesCredentialLibraryRoute extends Route { + // =methods + + /** + * Load a credential-library using current credential store and its parent scope. + * @param {object} params + * @param {string} params.credential_library_id + * @return {CredentialLibraryModel} + */ + async model({ credential_library_id }) { + return this.store.findRecord('credential-library', credential_library_id, { + reload: true, + }); + } + + /** + * Renders the credential library specific templates for header, navigation, and action page sections. + * @override + */ + renderTemplate() { + super.renderTemplate(...arguments); + + this.render( + 'scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/-header', + { + into: 'scopes/scope/credential-stores/credential-store', + outlet: 'header', + } + ); + + this.render( + 'scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/-navigation', + { + into: 'scopes/scope/credential-stores/credential-store', + outlet: 'navigation', + } + ); + + this.render( + 'scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/-actions', + { + into: 'scopes/scope/credential-stores/credential-store', + outlet: 'actions', + } + ); + } +} diff --git a/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/index.js b/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/index.js new file mode 100644 index 000000000..8d9b40c15 --- /dev/null +++ b/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/index.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class ScopesScopeCredentialStoresCredentialStoreCredentialLibrariesCredentialLibraryIndexRoute extends Route {} diff --git a/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library.hbs b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library.hbs new file mode 100644 index 000000000..7d32ecb0d --- /dev/null +++ b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library.hbs @@ -0,0 +1,3 @@ +{{page-title @model.displayName}} + +{{outlet}} \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/-actions.hbs b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/-actions.hbs new file mode 100644 index 000000000..e69de29bb diff --git a/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/-header.hbs b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/-header.hbs new file mode 100644 index 000000000..3c2de9eef --- /dev/null +++ b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/-header.hbs @@ -0,0 +1,9 @@ +
{{t 'resources.credential-library.description'}}
+{{@model.id}}
+{{credentialLibrary.description}}