]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
986d8d3aa85c76c352824944a8e673c986df1a1f
[ceph.git] /
1 <cd-modal [pageURL]="pageURL"
2           [modalRef]="activeModal">
3   <span class="modal-title"
4         i18n>{{ action | titlecase }} {{ resource | upperFirst }}</span>
5   <ng-container class="modal-content">
6     <form #frm="ngForm"
7           [formGroup]="serviceForm"
8           novalidate>
9       <div class="modal-body">
10
11         <!-- Service type -->
12         <div class="form-group row">
13           <label class="cd-col-form-label required"
14                  for="service_type"
15                  i18n>Type</label>
16           <div class="cd-col-form-input">
17             <select id="service_type"
18                     name="service_type"
19                     class="form-control"
20                     formControlName="service_type"
21                     (change)="getServiceIds($event.target.value)">
22               <option i18n
23                       [ngValue]="null">-- Select a service type --</option>
24               <option *ngFor="let serviceType of serviceTypes"
25                       [value]="serviceType">
26                 {{ serviceType }}
27               </option>
28             </select>
29             <span class="invalid-feedback"
30                   *ngIf="serviceForm.showError('service_type', frm, 'required')"
31                   i18n>This field is required.</span>
32           </div>
33         </div>
34
35         <!-- backend_service -->
36           <div *ngIf="serviceForm.controls.service_type.value === 'ingress'"
37                class="form-group row">
38             <label i18n
39                    class="cd-col-form-label"
40                    [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}"
41                    for="backend_service">Backend Service</label>
42             <div class="cd-col-form-input">
43               <select id="backend_service"
44                       name="backend_service"
45                       class="form-control"
46                       formControlName="backend_service"
47                       (change)="prePopulateId()">
48                 <option *ngIf="services === null"
49                         [ngValue]="null"
50                         i18n>Loading...</option>
51                 <option *ngIf="services !== null && services.length === 0"
52                         [ngValue]="null"
53                         i18n>-- No service available --</option>
54                 <option *ngIf="services !== null && services.length > 0"
55                         [ngValue]="null"
56                         i18n>-- Select an existing service --</option>
57                 <option *ngFor="let service of services"
58                         [value]="service.service_name">{{ service.service_name }}</option>
59               </select>
60               <span class="invalid-feedback"
61                     *ngIf="serviceForm.showError('backend_service', frm, 'required')"
62                     i18n>This field is required.</span>
63             </div>
64           </div>
65
66         <!-- Service id -->
67         <div class="form-group row"
68              *ngIf="serviceForm.controls.service_type.value !== 'snmp-gateway'">
69           <label i18n
70                  class="cd-col-form-label"
71                  [ngClass]="{'required': ['mds', 'rgw', 'nfs', 'iscsi', 'ingress'].includes(serviceForm.controls.service_type.value)}"
72                  for="service_id">Id</label>
73           <div class="cd-col-form-input">
74             <input id="service_id"
75                    class="form-control"
76                    type="text"
77                    formControlName="service_id">
78             <span class="invalid-feedback"
79                   *ngIf="serviceForm.showError('service_id', frm, 'required')"
80                   i18n>This field is required.</span>
81             <span class="invalid-feedback"
82                   *ngIf="serviceForm.showError('service_id', frm, 'uniqueName')"
83                   i18n>This service id is already in use.</span>
84             <span class="invalid-feedback"
85                   *ngIf="serviceForm.showError('service_id', frm, 'rgwPattern')"
86                   i18n>The value does not match the pattern <strong>&lt;service_id&gt;[.&lt;realm_name&gt;.&lt;zone_name&gt;]</strong>.</span>
87           </div>
88         </div>
89
90         <!-- unmanaged -->
91         <div class="form-group row"
92              *ngIf="serviceForm.controls.service_type.value !== 'snmp-gateway'">
93           <div class="cd-col-form-offset">
94             <div class="custom-control custom-checkbox">
95               <input class="custom-control-input"
96                      id="unmanaged"
97                      type="checkbox"
98                      formControlName="unmanaged">
99               <label class="custom-control-label"
100                      for="unmanaged"
101                      i18n>Unmanaged</label>
102             </div>
103           </div>
104         </div>
105
106         <!-- Placement -->
107         <div *ngIf="!serviceForm.controls.unmanaged.value"
108              class="form-group row">
109           <label class="cd-col-form-label"
110                  for="placement"
111                  i18n>Placement</label>
112           <div class="cd-col-form-input">
113             <select id="placement"
114                     class="form-control"
115                     formControlName="placement">
116               <option i18n
117                       value="hosts">Hosts</option>
118               <option i18n
119                       value="label">Label</option>
120             </select>
121           </div>
122         </div>
123
124         <!-- Label -->
125         <div *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.placement.value === 'label'"
126              class="form-group row">
127           <label i18n
128                  class="cd-col-form-label"
129                  for="label">Label</label>
130           <div class="cd-col-form-input">
131             <input id="label"
132                    class="form-control"
133                    type="text"
134                    formControlName="label"
135                    [ngbTypeahead]="searchLabels"
136                    (focus)="labelFocus.next($any($event).target.value)"
137                    (click)="labelClick.next($any($event).target.value)">
138             <span class="invalid-feedback"
139                   *ngIf="serviceForm.showError('label', frm, 'required')"
140                   i18n>This field is required.</span>
141           </div>
142         </div>
143
144         <!-- Hosts -->
145         <div *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.placement.value === 'hosts'"
146              class="form-group row">
147           <label class="cd-col-form-label"
148                  for="hosts"
149                  i18n>Hosts</label>
150           <div class="cd-col-form-input">
151             <cd-select-badges id="hosts"
152                               [data]="serviceForm.controls.hosts.value"
153                               [options]="hosts.options"
154                               [messages]="hosts.messages">
155             </cd-select-badges>
156           </div>
157         </div>
158
159         <!-- count -->
160         <div *ngIf="!serviceForm.controls.unmanaged.value"
161              class="form-group row">
162           <label class="cd-col-form-label"
163                  for="count">
164             <span i18n>Count</span>
165             <cd-helper i18n>Only that number of daemons will be created.</cd-helper>
166           </label>
167           <div class="cd-col-form-input">
168             <input id="count"
169                    class="form-control"
170                    type="number"
171                    formControlName="count"
172                    min="1">
173             <span class="invalid-feedback"
174                   *ngIf="serviceForm.showError('count', frm, 'min')"
175                   i18n>The value must be at least 1.</span>
176             <span class="invalid-feedback"
177                   *ngIf="serviceForm.showError('count', frm, 'pattern')"
178                   i18n>The entered value needs to be a number.</span>
179           </div>
180         </div>
181
182         <!-- RGW -->
183         <ng-container *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.service_type.value === 'rgw'">
184           <!-- rgw_frontend_port -->
185           <div class="form-group row">
186             <label i18n
187                    class="cd-col-form-label"
188                    for="rgw_frontend_port">Port</label>
189             <div class="cd-col-form-input">
190               <input id="rgw_frontend_port"
191                      class="form-control"
192                      type="number"
193                      formControlName="rgw_frontend_port"
194                      min="1"
195                      max="65535">
196               <span class="invalid-feedback"
197                     *ngIf="serviceForm.showError('rgw_frontend_port', frm, 'pattern')"
198                     i18n>The entered value needs to be a number.</span>
199               <span class="invalid-feedback"
200                     *ngIf="serviceForm.showError('rgw_frontend_port', frm, 'min')"
201                     i18n>The value must be at least 1.</span>
202               <span class="invalid-feedback"
203                     *ngIf="serviceForm.showError('rgw_frontend_port', frm, 'max')"
204                     i18n>The value cannot exceed 65535.</span>
205             </div>
206           </div>
207         </ng-container>
208
209         <!-- iSCSI -->
210         <ng-container *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.service_type.value === 'iscsi'">
211           <!-- pool -->
212           <div class="form-group row">
213             <label i18n
214                    class="cd-col-form-label required"
215                    for="pool">Pool</label>
216             <div class="cd-col-form-input">
217               <select id="pool"
218                       name="pool"
219                       class="form-control"
220                       formControlName="pool">
221                 <option *ngIf="pools === null"
222                         [ngValue]="null"
223                         i18n>Loading...</option>
224                 <option *ngIf="pools && pools.length === 0"
225                         [ngValue]="null"
226                         i18n>-- No pools available --</option>
227                 <option *ngIf="pools && pools.length > 0"
228                         [ngValue]="null"
229                         i18n>-- Select a pool --</option>
230                 <option *ngFor="let pool of pools"
231                         [value]="pool.pool_name">{{ pool.pool_name }}</option>
232               </select>
233               <span class="invalid-feedback"
234                     *ngIf="serviceForm.showError('pool', frm, 'required')"
235                     i18n>This field is required.</span>
236             </div>
237           </div>
238
239           <!-- trusted_ip_list -->
240           <div class="form-group row">
241             <label class="cd-col-form-label"
242                    for="trusted_ip_list">
243               <span i18n>Trusted IPs</span>
244               <cd-helper>
245                 <span i18n>Comma separated list of IP addresses.</span>
246                 <br>
247                 <span i18n>Please add the <b>Ceph Manager</b> IP addresses here, otherwise the iSCSI gateways can't be reached.</span>
248               </cd-helper>
249             </label>
250             <div class="cd-col-form-input">
251               <input id="trusted_ip_list"
252                      class="form-control"
253                      type="text"
254                      formControlName="trusted_ip_list">
255             </div>
256           </div>
257
258           <!-- api_port -->
259           <div class="form-group row">
260             <label i18n
261                    class="cd-col-form-label"
262                    for="api_port">Port</label>
263             <div class="cd-col-form-input">
264               <input id="api_port"
265                      class="form-control"
266                      type="number"
267                      formControlName="api_port"
268                      min="1"
269                      max="65535">
270               <span class="invalid-feedback"
271                     *ngIf="serviceForm.showError('api_port', frm, 'pattern')"
272                     i18n>The entered value needs to be a number.</span>
273               <span class="invalid-feedback"
274                     *ngIf="serviceForm.showError('api_port', frm, 'min')"
275                     i18n>The value must be at least 1.</span>
276               <span class="invalid-feedback"
277                     *ngIf="serviceForm.showError('api_port', frm, 'max')"
278                     i18n>The value cannot exceed 65535.</span>
279             </div>
280           </div>
281
282           <!-- api_user -->
283           <div class="form-group row">
284             <label i18n
285                    class="cd-col-form-label"
286                    [ngClass]="{'required': ['iscsi'].includes(serviceForm.controls.service_type.value)}"
287                    for="api_user">User</label>
288             <div class="cd-col-form-input">
289               <input id="api_user"
290                      class="form-control"
291                      type="text"
292                      formControlName="api_user">
293               <span class="invalid-feedback"
294                     *ngIf="serviceForm.showError('api_user', frm, 'required')"
295                     i18n>This field is required.</span>
296             </div>
297           </div>
298
299           <!-- api_password -->
300           <div class="form-group row">
301             <label i18n
302                    class="cd-col-form-label"
303                    [ngClass]="{'required': ['iscsi'].includes(serviceForm.controls.service_type.value)}"
304                    for="api_password">Password</label>
305             <div class="cd-col-form-input">
306               <div class="input-group">
307                 <input id="api_password"
308                        class="form-control"
309                        type="password"
310                        autocomplete="new-password"
311                        formControlName="api_password">
312                 <span class="input-group-append">
313                   <button type="button"
314                           class="btn btn-light"
315                           cdPasswordButton="api_password">
316                   </button>
317                   <cd-copy-2-clipboard-button source="api_password">
318                   </cd-copy-2-clipboard-button>
319                 </span>
320                 <span class="invalid-feedback"
321                       *ngIf="serviceForm.showError('api_password', frm, 'required')"
322                       i18n>This field is required.</span>
323               </div>
324             </div>
325           </div>
326         </ng-container>
327
328         <!-- Ingress -->
329         <ng-container *ngIf="serviceForm.controls.service_type.value === 'ingress'">
330           <!-- virtual_ip -->
331           <div class="form-group row">
332             <label class="cd-col-form-label"
333                    [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}"
334                    for="virtual_ip">
335               <span i18n>Virtual IP</span>
336               <cd-helper>
337                 <span i18n>The virtual IP address and subnet (in CIDR notation) where the ingress service will be available.</span>
338               </cd-helper>
339             </label>
340             <div class="cd-col-form-input">
341               <input id="virtual_ip"
342                      class="form-control"
343                      type="text"
344                      formControlName="virtual_ip">
345               <span class="invalid-feedback"
346                     *ngIf="serviceForm.showError('virtual_ip', frm, 'required')"
347                     i18n>This field is required.</span>
348             </div>
349           </div>
350
351           <!-- frontend_port -->
352           <div class="form-group row">
353             <label class="cd-col-form-label"
354                    [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}"
355                    for="frontend_port">
356               <span i18n>Frontend Port</span>
357               <cd-helper>
358                 <span i18n>The port used to access the ingress service.</span>
359               </cd-helper>
360             </label>
361             <div class="cd-col-form-input">
362               <input id="frontend_port"
363                      class="form-control"
364                      type="number"
365                      formControlName="frontend_port"
366                      min="1"
367                      max="65535">
368               <span class="invalid-feedback"
369                     *ngIf="serviceForm.showError('frontend_port', frm, 'pattern')"
370                     i18n>The entered value needs to be a number.</span>
371               <span class="invalid-feedback"
372                     *ngIf="serviceForm.showError('frontend_port', frm, 'min')"
373                     i18n>The value must be at least 1.</span>
374               <span class="invalid-feedback"
375                     *ngIf="serviceForm.showError('frontend_port', frm, 'max')"
376                     i18n>The value cannot exceed 65535.</span>
377               <span class="invalid-feedback"
378                     *ngIf="serviceForm.showError('frontend_port', frm, 'required')"
379                     i18n>This field is required.</span>
380             </div>
381           </div>
382
383           <!-- monitor_port -->
384           <div class="form-group row">
385             <label class="cd-col-form-label"
386                    [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}"
387                    for="monitor_port">
388               <span i18n>Monitor Port</span>
389               <cd-helper>
390                 <span i18n>The port used by haproxy for load balancer status.</span>
391               </cd-helper>
392             </label>
393             <div class="cd-col-form-input">
394               <input id="monitor_port"
395                      class="form-control"
396                      type="number"
397                      formControlName="monitor_port"
398                      min="1"
399                      max="65535">
400               <span class="invalid-feedback"
401                     *ngIf="serviceForm.showError('monitor_port', frm, 'pattern')"
402                     i18n>The entered value needs to be a number.</span>
403               <span class="invalid-feedback"
404                     *ngIf="serviceForm.showError('monitor_port', frm, 'min')"
405                     i18n>The value must be at least 1.</span>
406               <span class="invalid-feedback"
407                     *ngIf="serviceForm.showError('monitor_port', frm, 'max')"
408                     i18n>The value cannot exceed 65535.</span>
409               <span class="invalid-feedback"
410                     *ngIf="serviceForm.showError('monitor_port', frm, 'required')"
411                     i18n>This field is required.</span>
412             </div>
413           </div>
414           <!-- virtual_interface_networks -->
415           <div class="form-group row"
416                *ngIf="!serviceForm.controls.unmanaged.value">
417             <label class="cd-col-form-label"
418                    for="virtual_interface_networks">
419               <span i18n>CIDR Networks</span>
420               <cd-helper>
421                 <span i18n>A list of networks to identify which network interface to use for the virtual IP address.</span>
422               </cd-helper>
423             </label>
424             <div class="cd-col-form-input">
425               <input id="virtual_interface_networks"
426                      class="form-control"
427                      type="text"
428                      formControlName="virtual_interface_networks">
429             </div>
430           </div>
431         </ng-container>
432
433         <!-- SNMP-Gateway -->
434         <ng-container *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.service_type.value === 'snmp-gateway'">
435           <!-- snmp-version -->
436           <div class="form-group row">
437             <label class="cd-col-form-label required"
438                    for="snmp_version"
439                    i18n>Version</label>
440             <div class="cd-col-form-input">
441               <select id="snmp_version"
442                       name="snmp_version"
443                       class="form-control"
444                       formControlName="snmp_version"
445                       (change)="clearValidations()">
446                 <option i18n
447                         [ngValue]="null">-- Select SNMP version --</option>
448                 <option *ngFor="let snmpVersion of ['V2c', 'V3']"
449                         [value]="snmpVersion">{{ snmpVersion }}</option>
450               </select>
451               <span class="invalid-feedback"
452                     *ngIf="serviceForm.showError('snmp_version', frm, 'required')"
453                     i18n>This field is required.</span>
454             </div>
455           </div>
456           <!-- Destination -->
457           <div class="form-group row">
458             <label class="cd-col-form-label required"
459                    for="snmp_destination">
460               <span i18n>Destination</span>
461               <cd-helper>
462                 <span i18n>Must be of the format hostname:port.</span>
463               </cd-helper>
464             </label>
465             <div class="cd-col-form-input">
466               <input id="snmp_destination"
467                      class="form-control"
468                      type="text"
469                      formControlName="snmp_destination">
470               <span class="invalid-feedback"
471                     *ngIf="serviceForm.showError('snmp_destination', frm, 'required')"
472                     i18n>This field is required.</span>
473               <span class="invalid-feedback"
474                     *ngIf="serviceForm.showError('snmp_destination', frm, 'snmpDestinationPattern')"
475                     i18n>The value does not match the pattern: <strong>hostname:port</strong></span>
476             </div>
477           </div>
478           <!-- Engine id for snmp V3 -->
479           <div class="form-group row"
480                *ngIf="serviceForm.controls.snmp_version.value === 'V3'">
481             <label class="cd-col-form-label required"
482                    for="engine_id">
483               <span i18n>Engine Id</span>
484               <cd-helper>
485                 <span i18n>Unique identifier for the device (in hex).</span>
486               </cd-helper>
487             </label>
488             <div class="cd-col-form-input">
489               <input id="engine_id"
490                      class="form-control"
491                      type="text"
492                      formControlName="engine_id">
493               <span class="invalid-feedback"
494                     *ngIf="serviceForm.showError('engine_id', frm, 'required')"
495                     i18n>This field is required.</span>
496               <span class="invalid-feedback"
497                     *ngIf="serviceForm.showError('engine_id', frm, 'snmpEngineIdPattern')"
498                     i18n>The value does not match the pattern: <strong>Must be in hexadecimal and length must be multiple of 2 with min value = 10 amd max value = 64.</strong></span>
499             </div>
500           </div>
501           <!-- Auth protocol for snmp V3 -->
502           <div class="form-group row"
503                *ngIf="serviceForm.controls.snmp_version.value === 'V3'">
504             <label class="cd-col-form-label required"
505                    for="auth_protocol"
506                    i18n>Auth Protocol</label>
507             <div class="cd-col-form-input">
508               <select id="auth_protocol"
509                       name="auth_protocol"
510                       class="form-control"
511                       formControlName="auth_protocol">
512                 <option i18n
513                         [ngValue]="null">-- Select auth protocol --</option>
514                 <option *ngFor="let authProtocol of ['SHA', 'MD5']"
515                         [value]="authProtocol">
516                   {{ authProtocol }}
517                 </option>
518               </select>
519               <span class="invalid-feedback"
520                     *ngIf="serviceForm.showError('auth_protocol', frm, 'required')"
521                     i18n>This field is required.</span>
522             </div>
523           </div>
524           <!-- Privacy protocol for snmp V3 -->
525           <div class="form-group row"
526                *ngIf="serviceForm.controls.snmp_version.value === 'V3'">
527             <label class="cd-col-form-label"
528                    for="privacy_protocol"
529                    i18n>Privacy Protocol</label>
530             <div class="cd-col-form-input">
531               <select id="privacy_protocol"
532                       name="privacy_protocol"
533                       class="form-control"
534                       formControlName="privacy_protocol">
535                 <option i18n
536                         [ngValue]="null">-- Select privacy protocol --</option>
537                 <option *ngFor="let privacyProtocol of ['DES', 'AES']"
538                         [value]="privacyProtocol">
539                   {{ privacyProtocol }}
540                 </option>
541               </select>
542             </div>
543           </div>
544           <!-- Credentials -->
545           <fieldset>
546             <legend i18n>Credentials</legend>
547             <!-- snmp v2c snmp_community -->
548             <div class="form-group row"
549                  *ngIf="serviceForm.controls.snmp_version.value === 'V2c'">
550               <label class="cd-col-form-label required"
551                      for="snmp_community">
552                 <span i18n>SNMP Community</span>
553               </label>
554               <div class="cd-col-form-input">
555                 <input id="snmp_community"
556                        class="form-control"
557                        type="text"
558                        formControlName="snmp_community">
559                 <span class="invalid-feedback"
560                       *ngIf="serviceForm.showError('snmp_community', frm, 'required')"
561                       i18n>This field is required.</span>
562               </div>
563             </div>
564             <!-- snmp v3 auth username -->
565             <div class="form-group row"
566                  *ngIf="serviceForm.controls.snmp_version.value === 'V3'">
567               <label class="cd-col-form-label required"
568                      for="snmp_v3_auth_username">
569                 <span i18n>Username</span>
570               </label>
571               <div class="cd-col-form-input">
572                 <input id="snmp_v3_auth_username"
573                        class="form-control"
574                        type="text"
575                        formControlName="snmp_v3_auth_username">
576                 <span class="invalid-feedback"
577                       *ngIf="serviceForm.showError('snmp_v3_auth_username', frm, 'required')"
578                       i18n>This field is required.</span>
579               </div>
580             </div>
581             <!-- snmp v3 auth password -->
582             <div class="form-group row"
583                  *ngIf="serviceForm.controls.snmp_version.value === 'V3'">
584               <label class="cd-col-form-label required"
585                      for="snmp_v3_auth_password">
586                 <span i18n>Password</span>
587               </label>
588               <div class="cd-col-form-input">
589                 <input id="snmp_v3_auth_password"
590                        class="form-control"
591                        type="password"
592                        formControlName="snmp_v3_auth_password">
593                 <span class="invalid-feedback"
594                       *ngIf="serviceForm.showError('snmp_v3_auth_password', frm, 'required')"
595                       i18n>This field is required.</span>
596               </div>
597             </div>
598             <!-- snmp v3 priv password -->
599             <div class="form-group row"
600                  *ngIf="serviceForm.controls.snmp_version.value === 'V3' && serviceForm.controls.privacy_protocol.value !== null && serviceForm.controls.privacy_protocol.value !== undefined">
601               <label class="cd-col-form-label required"
602                      for="snmp_v3_priv_password">
603                 <span i18n>Encryption</span>
604               </label>
605               <div class="cd-col-form-input">
606                 <input id="snmp_v3_priv_password"
607                        class="form-control"
608                        type="password"
609                        formControlName="snmp_v3_priv_password">
610                 <span class="invalid-feedback"
611                       *ngIf="serviceForm.showError('snmp_v3_priv_password', frm, 'required')"
612                       i18n>This field is required.</span>
613               </div>
614             </div>
615           </fieldset>
616         </ng-container>
617         <!-- RGW, Ingress & iSCSI -->
618         <ng-container *ngIf="!serviceForm.controls.unmanaged.value && ['rgw', 'iscsi', 'ingress'].includes(serviceForm.controls.service_type.value)">
619           <!-- ssl -->
620           <div class="form-group row">
621             <div class="cd-col-form-offset">
622               <div class="custom-control custom-checkbox">
623                 <input class="custom-control-input"
624                        id="ssl"
625                        type="checkbox"
626                        formControlName="ssl">
627                 <label class="custom-control-label"
628                        for="ssl"
629                        i18n>SSL</label>
630               </div>
631             </div>
632           </div>
633
634           <!-- ssl_cert -->
635           <div *ngIf="serviceForm.controls.ssl.value"
636                class="form-group row">
637             <label class="cd-col-form-label"
638                    for="ssl_cert">
639               <span i18n>Certificate</span>
640               <cd-helper i18n>The SSL certificate in PEM format.</cd-helper>
641             </label>
642             <div class="cd-col-form-input">
643               <textarea id="ssl_cert"
644                         class="form-control resize-vertical text-monospace text-pre"
645                         formControlName="ssl_cert"
646                         rows="5">
647               </textarea>
648               <input type="file"
649                      (change)="fileUpload($event.target.files, 'ssl_cert')">
650               <span class="invalid-feedback"
651                     *ngIf="serviceForm.showError('ssl_cert', frm, 'required')"
652                     i18n>This field is required.</span>
653               <span class="invalid-feedback"
654                     *ngIf="serviceForm.showError('ssl_cert', frm, 'pattern')"
655                     i18n>Invalid SSL certificate.</span>
656             </div>
657           </div>
658
659           <!-- ssl_key -->
660           <div *ngIf="serviceForm.controls.ssl.value && !(['rgw', 'ingress'].includes(serviceForm.controls.service_type.value))"
661                class="form-group row">
662             <label class="cd-col-form-label"
663                    for="ssl_key">
664               <span i18n>Private key</span>
665               <cd-helper i18n>The SSL private key in PEM format.</cd-helper>
666             </label>
667             <div class="cd-col-form-input">
668               <textarea id="ssl_key"
669                         class="form-control resize-vertical text-monospace text-pre"
670                         formControlName="ssl_key"
671                         rows="5">
672               </textarea>
673               <input type="file"
674                      (change)="fileUpload($event.target.files,'ssl_key')">
675               <span class="invalid-feedback"
676                     *ngIf="serviceForm.showError('ssl_key', frm, 'required')"
677                     i18n>This field is required.</span>
678               <span class="invalid-feedback"
679                     *ngIf="serviceForm.showError('ssl_key', frm, 'pattern')"
680                     i18n>Invalid SSL private key.</span>
681             </div>
682           </div>
683         </ng-container>
684       </div>
685
686       <div class="modal-footer">
687         <div class="text-right">
688           <cd-form-button-panel (submitActionEvent)="onSubmit()"
689                                 [form]="serviceForm"
690                                 [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel>
691         </div>
692       </div>
693     </form>
694   </ng-container>
695 </cd-modal>