Skip to content

Commit b2fcde6

Browse files
fix: 🐛 Update worker_filter label for AWS DHC w/ static creds
1 parent 4324916 commit b2fcde6

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

addons/api/addon/generated/models/host-catalog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default class GeneratedHostCatalogModel extends BaseModel {
7272
@attr('string', {
7373
for: {
7474
type: 'plugin',
75-
name: ['aws', 'gcp'],
75+
name: ['aws', 'azure', 'gcp'],
7676
},
7777
description:
7878
'An expression used to filter the workers that have network access to a service that is hosting the external object store.',

ui/admin/app/components/form/host-catalog/aws/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ export default class FormHostCatalogAwsComponent extends Component {
3434
}
3535

3636
/**
37-
* Returns true if current edition is HCP.
37+
* Returns true if current edition is HCP and dynamic credential type is specified.
3838
*/
3939
get isWorkerFilterRequired() {
40-
return this.featureEdition.edition === 'hcp';
40+
return (
41+
this.featureEdition.edition === 'hcp' &&
42+
this.args.model.credentialType === TYPE_CREDENTIAL_DYNAMIC
43+
);
4144
}
4245
}

ui/admin/app/components/form/host-catalog/azure/index.hbs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,34 @@
176176
</F.HelperText>
177177
</Hds::Form::TextInput::Field>
178178

179+
{{#if (feature-flag 'worker-filter')}}
180+
<Hds::Form::Textarea::Field
181+
name='worker_filter'
182+
@value={{@model.worker_filter}}
183+
@isOptional={{true}}
184+
@isInvalid={{@model.errors.worker_filter}}
185+
disabled={{form.disabled}}
186+
as |F|
187+
>
188+
<F.Label>{{t 'form.worker_filter.label'}}</F.Label>
189+
<F.HelperText>
190+
{{t 'resources.host-catalog.form.worker_filter.help'}}
191+
<Hds::Link::Inline @href={{doc-url 'worker.create-tags'}}>
192+
{{t 'actions.learn-more'}}
193+
</Hds::Link::Inline>
194+
</F.HelperText>
195+
{{#if @model.errors.worker_filter}}
196+
<F.Error as |E|>
197+
{{#each @model.errors.worker_filter as |error|}}
198+
<E.Message>
199+
{{error.message}}
200+
</E.Message>
201+
{{/each}}
202+
</F.Error>
203+
{{/if}}
204+
</Hds::Form::Textarea::Field>
205+
{{/if}}
206+
179207
<Hds::Form::Checkbox::Field
180208
name='disable_credential_rotation'
181209
checked={{@model.disable_credential_rotation}}

0 commit comments

Comments
 (0)