diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index f433f247b..f185acb71 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -118,7 +118,7 @@ callback_url: filter: label: Filter help: A boolean expression defining a filter run against the provided information. -tenant_id: +tenant_id: label: Tenant ID help: The tenant (directory) ID for your Azure Active Directory application. subscription_id: @@ -134,4 +134,4 @@ region: label: Region secret: label: Client secret value - help: The client secret value for the client you want Boundary to use \ No newline at end of file + help: The client secret value for the client you want Boundary to use diff --git a/ui/admin/app/components/form/host-catalog/aws/index.hbs b/ui/admin/app/components/form/host-catalog/aws/index.hbs index b556220fe..01cafbe7a 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -13,7 +13,6 @@ @label={{t 'form.name.label'}} @helperText={{t 'form.name.help'}} @error={{@model.errors.name}} - disabled={{@model.isSaving}} readonly={{false}} as |field| > @@ -33,7 +32,6 @@ @label={{t 'form.description.label'}} @helperText={{t 'form.description.help'}} @error={{@model.errors.description}} - disabled={{@model.isSaving}} readonly={{false}} as |field| > @@ -152,6 +150,16 @@ @linkText={{t 'actions.learn-more'}} readonly={{false}} /> + + + +   + {{#if (can 'save model' @model)}} @@ -33,7 +32,6 @@ @label={{t 'form.description.label'}} @helperText={{t 'form.description.help'}} @error={{@model.errors.description}} - disabled={{@model.isSaving}} readonly={{false}} as |field| > diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/new.js index 040ee98d3..3c728dd1a 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/new.js @@ -15,9 +15,6 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsNewRoute extends const { id: host_catalog_id, compositeType } = this.modelFor( 'scopes.scope.host-catalogs.host-catalog' ); - if (this.currentModel?.isNew) { - this.currentModel.rollbackAttributes(); - } return this.store.createRecord('host-set', { compositeType, host_catalog_id, @@ -54,17 +51,10 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsNewRoute extends model: model, }); } - /** - * Update type of host set - * @param {string} type - */ - @action - async changeType(type) { - await this.router.replaceWith({ queryParams: { type } }); - } + /** * Adds a string item to array `property` on the passed `filter`. - + * @param {hostSetModel} hostSet * @param {string} property * @param {string} value diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index 1e4932280..7e2d12682 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -23,34 +23,32 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { * creating another, but reuse name/description if available. * @return {HostCatalogModel} */ - model() { + model({ type: compositeType = 'static' }) { const scopeModel = this.modelFor('scopes.scope'); - let name, description; + let name, description, disable_credential_rotation; if (this.currentModel?.isNew) { ({ name, description } = this.currentModel); this.currentModel.rollbackAttributes(); } + if (compositeType === 'azure') { + disable_credential_rotation = true; + } return this.store.createRecord('host-catalog', { scopeModel, + compositeType, name, description, + disable_credential_rotation, }); } - afterModel(model, transition) { - this.changeType(transition.to.queryParams?.type); - } - /** * Update type of host catalog * @param {string} type */ @action - async changeType(type) { - const model = this.modelFor('scopes.scope.host-catalogs.new'); - if (!type) type = 'static'; // Unknown host catalog type defaults to 'static' - if (model.isUnknown) type = 'aws'; //Is this the default case for plugin type? - model.compositeType = type; - await this.router.replaceWith({ queryParams: { type } }); + changeType(type) { + if (type === 'plugin') type = 'aws'; + this.router.replaceWith({ queryParams: { type } }); } } diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs index 4047f364c..2aec7f029 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs @@ -4,7 +4,6 @@ @model={{@model}} @submit={{route-action 'save' @model}} @cancel={{route-action 'cancel' @model}} - @changeType={{route-action 'changeType' @model.type}} @removeItemByIndex={{route-action 'removeItemByIndex' @model}} @addStringItem={{route-action 'addStringItem' @model}} /> \ No newline at end of file