fix: 🐛 Update worker_filter label for AWS DHC w/ static creds (#3114)
* fix: 🐛 Update worker_filter label for AWS DHC w/ static creds * test: 💍 add test case * test: 💍 fix serializer tests
This commit is contained in:
1 parent
1d0941865b
commit
773c1596e5
5 files changed
+62
-5
No files matched your search
@@ -34,9 +34,12 @@ export default class FormHostCatalogAwsComponent extends Component {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if current edition is HCP.
|
||||
* Returns true if current edition is HCP and dynamic credential type is specified.
|
||||
*/
|
||||
get isWorkerFilterRequired() {
|
||||
return this.featureEdition.edition === 'hcp';
|
||||
return (
|
||||
this.featureEdition.edition === 'hcp' &&
|
||||
this.args.model.credentialType === TYPE_CREDENTIAL_DYNAMIC
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -176,6 +176,34 @@
|
||||
</F.HelperText>
|
||||
</Hds::Form::TextInput::Field>
|
||||
|
||||
{{#if (feature-flag 'worker-filter')}}
|
||||
<Hds::Form::Textarea::Field
|
||||
name='worker_filter'
|
||||
@value={{@model.worker_filter}}
|
||||
@isOptional={{true}}
|
||||
@isInvalid={{@model.errors.worker_filter}}
|
||||
disabled={{form.disabled}}
|
||||
as |F|
|
||||
>
|
||||
<F.Label>{{t 'form.worker_filter.label'}}</F.Label>
|
||||
<F.HelperText>
|
||||
{{t 'resources.host-catalog.form.worker_filter.help'}}
|
||||
<Hds::Link::Inline @href={{doc-url 'worker.create-tags'}}>
|
||||
{{t 'actions.learn-more'}}
|
||||
</Hds::Link::Inline>
|
||||
</F.HelperText>
|
||||
{{#if @model.errors.worker_filter}}
|
||||
<F.Error as |E|>
|
||||
{{#each @model.errors.worker_filter as |error|}}
|
||||
<E.Message>
|
||||
{{error.message}}
|
||||
</E.Message>
|
||||
{{/each}}
|
||||
</F.Error>
|
||||
{{/if}}
|
||||
</Hds::Form::Textarea::Field>
|
||||
{{/if}}
|
||||
|
||||
<Hds::Form::Checkbox::Field
|
||||
name='disable_credential_rotation'
|
||||
checked={{@model.disable_credential_rotation}}
|
||||
|
||||
Reference in new issue
Block a user