|
12 | 12 | <h3>{{t 'resources.worker.form.steps.1.title'}}</h3> |
13 | 13 | <div class='worker-create-section'> |
14 | 14 | {{#if (feature-flag 'byow-pki-hcp-cluster-id')}} |
15 | | - <form.input |
16 | | - @name='cluster_id' |
| 15 | + <Hds::Form::TextInput::Field |
| 16 | + name='cluster_id' |
17 | 17 | @value={{this.clusterID}} |
18 | | - @label={{t 'resources.worker.form.cluster_id.label'}} |
19 | | - @helperText={{t 'resources.worker.form.cluster_id.help'}} |
20 | | - @linkText={{t 'actions.learn-more'}} |
21 | | - @link={{doc-url 'worker.manage-workers'}} |
| 18 | + @isOptional={{true}} |
22 | 19 | placeholder='69b6ddb3-ffec-42ab-a994-f43a6519470a' |
23 | | - /> |
| 20 | + {{on 'input' (set-from-event this 'clusterID')}} |
| 21 | + as |F| |
| 22 | + > |
| 23 | + <F.Label>{{t 'resources.worker.form.cluster_id.label'}}</F.Label> |
| 24 | + <F.HelperText> |
| 25 | + {{t 'resources.worker.form.cluster_id.help'}} |
| 26 | + <Hds::Link::Inline @href={{doc-url 'worker.manage-workers'}}> |
| 27 | + {{t 'actions.learn-more'}} |
| 28 | + </Hds::Link::Inline> |
| 29 | + </F.HelperText> |
| 30 | + </Hds::Form::TextInput::Field> |
24 | 31 | {{/if}} |
25 | 32 |
|
26 | | - <form.input |
27 | | - @name='ip_address' |
| 33 | + <Hds::Form::TextInput::Field |
| 34 | + name='ip_address' |
28 | 35 | @value={{this.ipAddress}} |
29 | | - @label={{t 'resources.worker.form.ip_address.label'}} |
30 | | - @helperText={{t 'resources.worker.form.ip_address.help'}} |
31 | | - @linkText={{t 'actions.learn-more'}} |
32 | | - @link={{doc-url 'worker'}} |
| 36 | + @isOptional={{true}} |
33 | 37 | placeholder='worker1.example.com' |
34 | | - /> |
35 | | - |
36 | | - <form.input |
37 | | - @name='config_file_path' |
| 38 | + {{on 'input' (set-from-event this 'ipAddress')}} |
| 39 | + as |F| |
| 40 | + > |
| 41 | + <F.Label>{{t 'resources.worker.form.ip_address.label'}}</F.Label> |
| 42 | + <F.HelperText> |
| 43 | + {{t 'resources.worker.form.ip_address.help'}} |
| 44 | + <Hds::Link::Inline @href={{doc-url 'worker'}}> |
| 45 | + {{t 'actions.learn-more'}} |
| 46 | + </Hds::Link::Inline> |
| 47 | + </F.HelperText> |
| 48 | + </Hds::Form::TextInput::Field> |
| 49 | + |
| 50 | + <Hds::Form::TextInput::Field |
| 51 | + name='config_file_path' |
38 | 52 | @value={{this.configFilePath}} |
39 | | - @label={{t 'resources.worker.form.config_file_path.label'}} |
40 | | - @helperText={{t 'resources.worker.form.config_file_path.help'}} |
| 53 | + @isOptional={{true}} |
41 | 54 | placeholder='/home/ubuntu/boundary' |
42 | | - /> |
| 55 | + {{on 'input' (set-from-event this 'configFilePath')}} |
| 56 | + as |F| |
| 57 | + > |
| 58 | + <F.Label>{{t 'resources.worker.form.config_file_path.label'}}</F.Label> |
| 59 | + <F.HelperText> |
| 60 | + {{t 'resources.worker.form.config_file_path.help'}} |
| 61 | + </F.HelperText> |
| 62 | + </Hds::Form::TextInput::Field> |
43 | 63 |
|
44 | 64 | {{#if (not (feature-flag 'byow-pki-hcp-cluster-id'))}} |
45 | | - <form.input |
46 | | - @name='initial_upstreams' |
| 65 | + <Hds::Form::TextInput::Field |
| 66 | + name='initial_upstreams' |
47 | 67 | @value={{this.initialUpstreams}} |
48 | | - @label={{t 'resources.worker.form.initial_upstreams.label'}} |
49 | | - @helperText={{t 'resources.worker.form.initial_upstreams.help'}} |
| 68 | + @isOptional={{true}} |
50 | 69 | placeholder='10.0.0.1, 10.0.0.2, 10.0.0.3' |
51 | | - /> |
| 70 | + {{on 'input' (set-from-event this 'initialUpstreams')}} |
| 71 | + as |F| |
| 72 | + > |
| 73 | + <F.Label>{{t 'resources.worker.form.initial_upstreams.label'}}</F.Label> |
| 74 | + <F.HelperText> |
| 75 | + {{t 'resources.worker.form.initial_upstreams.help'}} |
| 76 | + </F.HelperText> |
| 77 | + </Hds::Form::TextInput::Field> |
52 | 78 | {{/if}} |
53 | | - <Form::Field::ListWrapper @layout='horizontal' @disabled={{form.disabled}}> |
| 79 | + <Form::Field::ListWrapper |
| 80 | + @layout='horizontal' |
| 81 | + @disabled={{form.disabled}} |
| 82 | + @isOptional={{true}} |
| 83 | + > |
54 | 84 | <:fieldset as |F|> |
55 | 85 | <F.Legend>{{t 'resources.worker.form.worker_tags.label'}}</F.Legend> |
56 | 86 | <F.HelperText> |
|
70 | 100 | </Form::Field::ListWrapper> |
71 | 101 |
|
72 | 102 | {{#if (feature-flag 'ssh-session-recording')}} |
73 | | - <Hds::Form::Fieldset as |F|> |
| 103 | + <Hds::Form::Fieldset @isOptional={{true}} as |F|> |
74 | 104 | <F.Legend>{{t |
75 | 105 | 'resources.worker.form.local_session_recording_storage.label' |
76 | 106 | }}</F.Legend> |
|
94 | 124 | </F.Control> |
95 | 125 | {{#if this.enableRecordingStoragePath}} |
96 | 126 | <F.Control> |
97 | | - <form.input |
98 | | - @name='recording_storage_path' |
| 127 | + <Hds::Form::TextInput::Field |
| 128 | + name='recording_storage_path' |
99 | 129 | @value={{this.recording_storage_path}} |
100 | | - @label={{t 'resources.worker.form.recording_storage_path.label'}} |
101 | | - @helperText={{t |
102 | | - 'resources.worker.form.recording_storage_path.help' |
103 | | - }} |
104 | 130 | placeholder='/tmp/worker1' |
105 | | - /> |
| 131 | + as |F| |
| 132 | + > |
| 133 | + <F.Label>{{t |
| 134 | + 'resources.worker.form.recording_storage_path.label' |
| 135 | + }}</F.Label> |
| 136 | + <F.HelperText> |
| 137 | + {{t 'resources.worker.form.recording_storage_path.help'}} |
| 138 | + </F.HelperText> |
| 139 | + </Hds::Form::TextInput::Field> |
106 | 140 | </F.Control> |
107 | 141 | {{/if}} |
108 | 142 | </Hds::Form::Fieldset> |
|
160 | 194 | <h3>{{t 'resources.worker.form.steps.3.title'}}</h3> |
161 | 195 | <div class='worker-create-section'> |
162 | 196 | <div class='worker-auth-token'> |
163 | | - <form.input |
164 | | - @name='worker_auth_registration_request' |
| 197 | + <Hds::Form::TextInput::Field |
| 198 | + name='worker_auth_registration_request' |
165 | 199 | @value={{this.generatedWorkerAuthToken}} |
166 | | - @disabled={{@model.cannotSave}} |
167 | | - @label={{t |
168 | | - 'resources.worker.form.steps.3.worker_auth_registration_request.label' |
169 | | - }} |
170 | | - @helperText={{t |
171 | | - 'resources.worker.form.steps.3.worker_auth_registration_request.help' |
172 | | - }} |
173 | | - /> |
| 200 | + @isRequired={{true}} |
| 201 | + @isInvalid={{@model.errors.worker_generated_auth_token}} |
| 202 | + disabled={{form.disabled}} |
| 203 | + {{on 'input' (set-from-event this 'generatedWorkerAuthToken')}} |
| 204 | + as |F| |
| 205 | + > |
| 206 | + <F.Label>{{t |
| 207 | + 'resources.worker.form.steps.3.worker_auth_registration_request.label' |
| 208 | + }}</F.Label> |
| 209 | + <F.HelperText> |
| 210 | + {{t |
| 211 | + 'resources.worker.form.steps.3.worker_auth_registration_request.help' |
| 212 | + }} |
| 213 | + </F.HelperText> |
| 214 | + {{#if @model.errors.worker_generated_auth_token}} |
| 215 | + <F.Error as |E|> |
| 216 | + {{#each @model.errors.worker_generated_auth_token as |error|}} |
| 217 | + <E.Message>{{error.message}}</E.Message> |
| 218 | + {{/each}} |
| 219 | + </F.Error> |
| 220 | + {{/if}} |
| 221 | + </Hds::Form::TextInput::Field> |
174 | 222 | {{#if (can 'save worker' @model)}} |
175 | | - <Rose::Button |
176 | | - @onSubmit={{true}} |
177 | | - @style='primary' |
| 223 | + <Hds::Button |
| 224 | + @text={{t 'resources.worker.actions.register'}} |
| 225 | + type='submit' |
| 226 | + disabled={{@model.cannotSave}} |
178 | 227 | class='nowrap' |
179 | | - @disabled={{@model.cannotSave}} |
180 | | - > |
181 | | - {{t 'resources.worker.actions.register'}} |
182 | | - </Rose::Button> |
| 228 | + /> |
183 | 229 | {{/if}} |
184 | 230 | </div> |
185 | 231 |
|
|
0 commit comments