feat: 🎸 add disable_credential_rotation field to forms
This commit is contained in:
5 files changed
+45
-13
No files matched your search
@@ -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.
|
||||
link-text: Learn more
|
||||
@@ -134,20 +134,22 @@ secret_access_key:
|
||||
label: Secret Access Key
|
||||
help: The subscription ID for the subscription with read access.
|
||||
link-text: Learn more
|
||||
region:
|
||||
region:
|
||||
label: Region
|
||||
provider:
|
||||
label: Provider Details
|
||||
description: This is the provider for this host catalog. The format of the host set filters are specific to each provider.
|
||||
help:
|
||||
client:
|
||||
help:
|
||||
client:
|
||||
label: Client ID
|
||||
help: The client ID for the client you want Boundary to use.
|
||||
link-text : Learn more
|
||||
choose_a_provider:
|
||||
label: Choose a provider
|
||||
choose_a_provider:
|
||||
label: Choose a provider
|
||||
description: There are several built-in plugins for the most common providers. You can choose from on of the included plugins or use a custom plugin.
|
||||
filter:
|
||||
filter:
|
||||
label: Filter
|
||||
help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider.
|
||||
link-text: Learn more about using filters for Azure resources.
|
||||
link-text: Learn more about using filters for Azure resources.
|
||||
disable_credential_rotation:
|
||||
label: Disable credential rotation
|
||||
@@ -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|
|
||||
>
|
||||
@@ -156,6 +154,16 @@
|
||||
@link='https://learn.hashicorp.com/tutorials/boundary/cloud-host-catalogs#set-up-cloud-hosts'
|
||||
readonly={{false}}
|
||||
/>
|
||||
|
||||
<form.checkbox
|
||||
@name='disable_credential_rotation'
|
||||
@value={{@model.disable_credential_rotation}}
|
||||
@label={{t 'form.disable_credential_rotation.label'}}
|
||||
@onChange={{fn this.toggleDisableCredentialRotation @model}}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
{{#if (can 'save model' @model)}}
|
||||
<form.actions
|
||||
@disabled={{if @model.cannotSave @model.cannotSave}}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import Component from '@glimmer/component';
|
||||
import { action } from '@ember/object';
|
||||
|
||||
export default class FormHostCatalogAwsComponent extends Component {
|
||||
// =actions
|
||||
|
||||
@action
|
||||
toggleDisableCredentialRotation(model) {
|
||||
model.disable_credential_rotation = !model.disable_credential_rotation;
|
||||
}
|
||||
}
|
||||
@@ -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|
|
||||
>
|
||||
@@ -161,6 +159,15 @@
|
||||
readonly={{false}}
|
||||
/>
|
||||
|
||||
<form.checkbox
|
||||
@name='disable_credential_rotation'
|
||||
@value={{@model.disable_credential_rotation}}
|
||||
@label={{t 'form.disable_credential_rotation.label'}}
|
||||
@disabled={{true}}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
{{#if (can 'save model' @model)}}
|
||||
<form.actions
|
||||
@disabled={{if @model.cannotSave @model.cannotSave}}
|
||||
|
||||
@@ -25,16 +25,20 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route {
|
||||
*/
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user