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">
7 [formGroup]="serviceForm"
9 <div class="modal-body">
10 <cd-alert-panel *ngIf="serviceForm.controls.service_type.value === 'rgw' && showRealmCreationForm"
14 <a class="text-decoration-underline"
15 (click)="createMultisiteSetup()">
16 Click here</a> to create a new Realm/Zone Group/Zone
20 <div class="form-group row">
21 <label class="cd-col-form-label required"
24 <div class="cd-col-form-input">
25 <select id="service_type"
28 formControlName="service_type"
29 (change)="onServiceTypeChange($event.target.value)">
31 [ngValue]="null">-- Select a service type --</option>
32 <option *ngFor="let serviceType of serviceTypes"
33 [value]="serviceType">
37 <span class="invalid-feedback"
38 *ngIf="serviceForm.showError('service_type', frm, 'required')"
39 i18n>This field is required.</span>
43 <!-- backend_service -->
44 <div *ngIf="serviceForm.controls.service_type.value === 'ingress'"
45 class="form-group row">
47 class="cd-col-form-label"
48 [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}"
49 for="backend_service">Backend Service</label>
50 <div class="cd-col-form-input">
51 <select id="backend_service"
52 name="backend_service"
54 formControlName="backend_service"
55 (change)="prePopulateId()">
56 <option *ngIf="services === null"
58 i18n>Loading...</option>
59 <option *ngIf="services !== null && services.length === 0"
61 i18n>-- No service available --</option>
62 <option *ngIf="services !== null && services.length > 0"
64 i18n>-- Select an existing service --</option>
65 <option *ngFor="let service of services"
66 [value]="service.service_name">{{ service.service_name }}</option>
68 <span class="invalid-feedback"
69 *ngIf="serviceForm.showError('backend_service', frm, 'required')"
70 i18n>This field is required.</span>
76 <div class="form-group row"
77 *ngIf="serviceForm.controls.service_type.value === 'nvmeof'">
79 class="cd-col-form-label required"
80 for="pool">Block Pool</label>
81 <div class="cd-col-form-input">
85 formControlName="pool"
86 (change)="onBlockPoolChange()">
87 <option *ngIf="rbdPools === null"
89 i18n>Loading...</option>
90 <option *ngIf="rbdPools && rbdPools.length === 0"
92 i18n>-- No block pools available --</option>
93 <option *ngIf="rbdPools && rbdPools.length > 0"
95 i18n>-- Select a pool --</option>
96 <option *ngFor="let pool of rbdPools"
97 [value]="pool.pool_name">{{ pool.pool_name }}</option>
100 An RBD application-enabled pool in which the gateway configuration can be managed.
102 <span class="invalid-feedback"
103 *ngIf="serviceForm.showError('pool', frm, 'required')"
104 i18n>This field is required.</span>
109 <div class="form-group row"
110 *ngIf="serviceForm.controls.service_type.value === 'nvmeof'">
111 <label class="cd-col-form-label required"
113 <span i18n>Group Name</span>
115 <div class="cd-col-form-input">
116 <div class="input-group">
120 formControlName="group"
121 (change)="onNvmeofGroupChange($event.target.value)">
124 The name of the gateway group.
126 <span class="invalid-feedback"
127 *ngIf="serviceForm.showError('service_id', frm, 'required')"
128 i18n>This field is required.</span>
133 <div class="form-group row"
134 *ngIf="serviceForm.controls.service_type.value !== 'snmp-gateway'">
135 <label class="cd-col-form-label"
136 [ngClass]="{'required': ['mds', 'rgw', 'nfs', 'iscsi', 'nvmeof', 'smb', 'ingress'].includes(serviceForm.controls.service_type.value)}"
138 <span i18n>Service Name</span>
140 <div class="cd-col-form-input">
141 <div class="input-group">
142 <span class="input-group-text"
143 *ngIf="serviceForm.controls.service_type.value && ['mds', 'rgw', 'nfs', 'iscsi', 'nvmeof', 'smb', 'ingress'].includes(serviceForm.controls.service_type.value)"
145 i18n>{{serviceForm.controls.service_type.value}}.
147 <input id="service_id"
150 formControlName="service_id">
152 <span class="invalid-feedback"
153 *ngIf="serviceForm.showError('service_id', frm, 'required')"
154 i18n>This field is required.</span>
155 <span class="invalid-feedback"
156 *ngIf="serviceForm.showError('service_id', frm, 'uniqueName')"
157 i18n>This service id is already in use.</span>
158 <span class="invalid-feedback"
159 *ngIf="serviceForm.showError('service_id', frm, 'mdsPattern')"
160 i18n>MDS service id must start with a letter and contain alphanumeric characters or '.', '-', and '_'</span>
164 <div class="form-group row"
165 *ngIf="serviceForm.controls.service_type.value === 'rgw'">
166 <label class="cd-col-form-label"
169 <div class="cd-col-form-input">
170 <select class="form-select"
172 formControlName="realm_name"
174 [attr.disabled]="realmList.length === 0 || editing ? true : null">
175 <option *ngIf="realmList.length === 0"
177 selected>-- No realm available --</option>
178 <option *ngFor="let realm of realmList"
179 [value]="realm.name">
186 <div class="form-group row"
187 *ngIf="serviceForm.controls.service_type.value === 'rgw'">
188 <label class="cd-col-form-label"
190 i18n>Zone Group</label>
191 <div class="cd-col-form-input">
192 <select class="form-select"
194 formControlName="zonegroup_name"
195 name="zonegroup_name"
196 [attr.disabled]="zonegroupList.length === 0 || editing ? true : null">
197 <option *ngFor="let zonegroup of zonegroupList"
198 [value]="zonegroup.name">
205 <div class="form-group row"
206 *ngIf="serviceForm.controls.service_type.value === 'rgw'">
207 <label class="cd-col-form-label"
210 <div class="cd-col-form-input">
211 <select class="form-select"
213 formControlName="zone_name"
215 [attr.disabled]="zoneList.length === 0 || editing ? true : null">
216 <option *ngFor="let zone of zoneList"
225 <div class="form-group row">
226 <div class="cd-col-form-offset">
227 <div class="custom-control custom-checkbox">
228 <input class="custom-control-input"
231 formControlName="unmanaged">
232 <label class="custom-control-label m-0"
234 i18n>Unmanaged</label>
235 <cd-help-text i18n>If Unmanaged is selected, the orchestrator will not stop or stop any daemons associated with this service. Placement and all other properties will be ignored.</cd-help-text>
241 <div *ngIf="!serviceForm.controls.unmanaged.value"
242 class="form-group row">
243 <label class="cd-col-form-label"
245 i18n>Placement</label>
246 <div class="cd-col-form-input">
247 <select id="placement"
249 formControlName="placement"
250 (change)="onPlacementChange($event.target.value)">
252 value="hosts">Hosts</option>
254 value="label">Label</option>
260 <div *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.placement.value === 'label'"
261 class="form-group row">
263 class="cd-col-form-label"
264 for="label">Label</label>
265 <div class="cd-col-form-input">
269 formControlName="label"
270 [ngbTypeahead]="searchLabels"
271 (focus)="labelFocus.next($any($event).target.value)"
272 (click)="labelClick.next($any($event).target.value)">
273 <span class="invalid-feedback"
274 *ngIf="serviceForm.showError('label', frm, 'required')"
275 i18n>This field is required.</span>
280 <div *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.placement.value === 'hosts'"
281 class="form-group row">
282 <label class="cd-col-form-label"
285 <div class="cd-col-form-input">
286 <cd-select-badges id="hosts"
287 [data]="serviceForm.controls.hosts.value"
288 [options]="hosts.options"
289 [messages]="hosts.messages">
295 <div *ngIf="!serviceForm.controls.unmanaged.value"
296 class="form-group row">
297 <label class="cd-col-form-label"
299 <span i18n>Count</span>
301 <div class="cd-col-form-input">
305 formControlName="count"
307 <cd-help-text i18n>Number of deamons that will be deployed</cd-help-text>
308 <span class="invalid-feedback"
309 *ngIf="serviceForm.showError('count', frm, 'min')"
310 i18n>The value must be at least 1.</span>
311 <span class="invalid-feedback"
312 *ngIf="serviceForm.showError('count', frm, 'pattern')"
313 i18n>The entered value needs to be a number.</span>
318 <ng-container *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.service_type.value === 'rgw'">
319 <!-- rgw_frontend_port -->
320 <div class="form-group row">
322 class="cd-col-form-label"
323 for="rgw_frontend_port">Port</label>
324 <div class="cd-col-form-input">
325 <input id="rgw_frontend_port"
328 formControlName="rgw_frontend_port"
331 <span class="invalid-feedback"
332 *ngIf="serviceForm.showError('rgw_frontend_port', frm, 'pattern')"
333 i18n>The entered value needs to be a number.</span>
334 <span class="invalid-feedback"
335 *ngIf="serviceForm.showError('rgw_frontend_port', frm, 'min')"
336 i18n>The value must be at least 1.</span>
337 <span class="invalid-feedback"
338 *ngIf="serviceForm.showError('rgw_frontend_port', frm, 'max')"
339 i18n>The value cannot exceed 65535.</span>
346 <div class="form-group row"
347 *ngIf="serviceForm.controls.service_type.value === 'iscsi'">
349 class="cd-col-form-label required"
350 for="pool">Pool</label>
351 <div class="cd-col-form-input">
355 formControlName="pool">
356 <option *ngIf="pools === null"
358 i18n>Loading...</option>
359 <option *ngIf="pools && pools.length === 0"
361 i18n>-- No pools available --</option>
362 <option *ngIf="pools && pools.length > 0"
364 i18n>-- Select a pool --</option>
365 <option *ngFor="let pool of pools"
366 [value]="pool.pool_name">{{ pool.pool_name }}</option>
368 <span class="invalid-feedback"
369 *ngIf="serviceForm.showError('pool', frm, 'required')"
370 i18n>This field is required.</span>
374 <!-- fields in iSCSI which are hidden when unmanaged is true -->
375 <ng-container *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.service_type.value === 'iscsi'">
376 <!-- trusted_ip_list -->
377 <div class="form-group row">
378 <label class="cd-col-form-label"
379 for="trusted_ip_list">
380 <span i18n>Trusted IPs</span>
382 <span i18n>Comma separated list of IP addresses.</span>
384 <span i18n>Please add the <b>Ceph Manager</b> IP addresses here, otherwise the iSCSI gateways can't be reached.</span>
387 <div class="cd-col-form-input">
388 <input id="trusted_ip_list"
391 formControlName="trusted_ip_list">
396 <div class="form-group row">
398 class="cd-col-form-label"
399 for="api_port">Port</label>
400 <div class="cd-col-form-input">
404 formControlName="api_port"
407 <span class="invalid-feedback"
408 *ngIf="serviceForm.showError('api_port', frm, 'pattern')"
409 i18n>The entered value needs to be a number.</span>
410 <span class="invalid-feedback"
411 *ngIf="serviceForm.showError('api_port', frm, 'min')"
412 i18n>The value must be at least 1.</span>
413 <span class="invalid-feedback"
414 *ngIf="serviceForm.showError('api_port', frm, 'max')"
415 i18n>The value cannot exceed 65535.</span>
420 <div class="form-group row">
422 class="cd-col-form-label"
423 [ngClass]="{'required': ['iscsi'].includes(serviceForm.controls.service_type.value)}"
424 for="api_user">User</label>
425 <div class="cd-col-form-input">
429 formControlName="api_user">
430 <span class="invalid-feedback"
431 *ngIf="serviceForm.showError('api_user', frm, 'required')"
432 i18n>This field is required.</span>
436 <!-- api_password -->
437 <div class="form-group row">
439 class="cd-col-form-label"
440 [ngClass]="{'required': ['iscsi'].includes(serviceForm.controls.service_type.value)}"
441 for="api_password">Password</label>
442 <div class="cd-col-form-input">
443 <div class="input-group">
444 <input id="api_password"
447 autocomplete="new-password"
448 formControlName="api_password">
449 <button type="button"
450 class="btn btn-light"
451 cdPasswordButton="api_password">
453 <cd-copy-2-clipboard-button source="api_password">
454 </cd-copy-2-clipboard-button>
455 <span class="invalid-feedback"
456 *ngIf="serviceForm.showError('api_password', frm, 'required')"
457 i18n>This field is required.</span>
464 <ng-container *ngIf="serviceForm.controls.service_type.value === 'smb'">
465 <div class="form-group row">
466 <label class="cd-col-form-label required"
471 <span>A short name identifying the SMB “cluster”. In this case a cluster is simply a management unit of one or more Samba services sharing a common configuration,
472 and may not provide actual clustering or availability mechanisms.</span>
475 <div class="cd-col-form-input">
476 <input id="cluster_id"
479 formControlName="cluster_id"
482 <span class="invalid-feedback"
483 *ngIf="serviceForm.showError('cluster_id', frm, 'required')"
484 i18n>This field is required.</span>
488 <div class="form-group row">
489 <label class="cd-col-form-label required"
491 <span i18n>Config URI</span>
493 Configuration source that should be loaded by the samba-container as the primary configuration file.
496 <div class="cd-col-form-input">
497 <input id="config_uri"
500 formControlName="config_uri"
501 placeholder="rados://.smb/foo/scc.toml"
503 <span class="invalid-feedback"
504 *ngIf="serviceForm.showError('config_uri', frm, 'required')"
505 i18n>This field is required.</span>
506 <span class="invalid-feedback"
507 *ngIf="serviceForm.showError('config_uri', frm, 'configUriPattern')"
508 i18n>The value must start with either 'http:', 'https:', 'rados:' or 'rados:mon-config-key:'</span>
512 <div class="form-group row"
513 formGroupName="features">
514 <label class="cd-col-form-label"
518 <span>Pre-defined terms enabling specific deployment characteristics.</span>
521 <div class="cd-col-form-input">
522 <div class="custom-control custom-checkbox"
523 *ngFor="let feature of smbFeaturesList">
524 <input class="custom-control-input"
528 formControlName="{{feature}}">
529 <label class="custom-control-label"
537 <div class="form-group row">
538 <label class="cd-col-form-label"
540 <span i18n>Custom DNS</span>
542 <span>Comma separated list of DNSs.</span>
544 <span>A list of IP addresses that will be used as the DNS servers for a Samba container.</span>
547 <div class="cd-col-form-input">
548 <input id="custom_dns"
551 formControlName="custom_dns"
552 placeholder="192.168.76.204"
557 <div class="form-group row">
558 <label class="cd-col-form-label"
560 <span i18n>Join sources</span>
562 <span>Comma separated list of URIs.</span>
564 <span>A list of values that will be used to identify where authentication data that will be used to perform domain joins are located.</span>
567 <div class="cd-col-form-input">
568 <input id="join_sources"
571 formControlName="join_sources"
572 placeholder="rados:mon-config-key:smb/config/foo/join1.json"
577 <div class="form-group row">
578 <label class="cd-col-form-label"
580 <span i18n>User sources</span>
582 <span>Comma separated list of URIs.</span>
584 <span>A list of pseudo-uris containing data the samba-container can use to create users (and/or
585 groups). A ceph based samba container may typically use a rados uri
586 or a mon config-key store uri </span>
589 <div class="cd-col-form-input">
590 <input id="user_sources"
593 formControlName="user_sources"
594 placeholder="rados:mon-config-key:smb/config/foo/join2.json"
599 <div class="form-group row">
600 <label class="cd-col-form-label"
601 for="include_ceph_users">
602 <span i18n>Ceph users</span>
604 <span>Comma separated list of Ceph users.</span>
606 <span>A list of cephx user names that the Samba Containers may use.</span>
609 <div class="cd-col-form-input">
610 <input id="include_ceph_users"
613 formControlName="include_ceph_users"
614 placeholder="client.smb.fs.cluster.foo"
622 <ng-container *ngIf="serviceForm.controls.service_type.value === 'ingress'">
624 <div class="form-group row">
625 <label class="cd-col-form-label"
626 [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}"
628 <span i18n>Virtual IP</span>
630 <span i18n>The virtual IP address and subnet (in CIDR notation) where the ingress service will be available.</span>
633 <div class="cd-col-form-input">
634 <input id="virtual_ip"
637 formControlName="virtual_ip">
638 <span class="invalid-feedback"
639 *ngIf="serviceForm.showError('virtual_ip', frm, 'required')"
640 i18n>This field is required.</span>
644 <!-- frontend_port -->
645 <div class="form-group row">
646 <label class="cd-col-form-label"
647 [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}"
649 <span i18n>Frontend Port</span>
651 <span i18n>The port used to access the ingress service.</span>
654 <div class="cd-col-form-input">
655 <input id="frontend_port"
658 formControlName="frontend_port"
661 <span class="invalid-feedback"
662 *ngIf="serviceForm.showError('frontend_port', frm, 'pattern')"
663 i18n>The entered value needs to be a number.</span>
664 <span class="invalid-feedback"
665 *ngIf="serviceForm.showError('frontend_port', frm, 'min')"
666 i18n>The value must be at least 1.</span>
667 <span class="invalid-feedback"
668 *ngIf="serviceForm.showError('frontend_port', frm, 'max')"
669 i18n>The value cannot exceed 65535.</span>
670 <span class="invalid-feedback"
671 *ngIf="serviceForm.showError('frontend_port', frm, 'required')"
672 i18n>This field is required.</span>
676 <!-- monitor_port -->
677 <div class="form-group row">
678 <label class="cd-col-form-label"
679 [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}"
681 <span i18n>Monitor Port</span>
683 <span i18n>The port used by haproxy for load balancer status.</span>
686 <div class="cd-col-form-input">
687 <input id="monitor_port"
690 formControlName="monitor_port"
693 <span class="invalid-feedback"
694 *ngIf="serviceForm.showError('monitor_port', frm, 'pattern')"
695 i18n>The entered value needs to be a number.</span>
696 <span class="invalid-feedback"
697 *ngIf="serviceForm.showError('monitor_port', frm, 'min')"
698 i18n>The value must be at least 1.</span>
699 <span class="invalid-feedback"
700 *ngIf="serviceForm.showError('monitor_port', frm, 'max')"
701 i18n>The value cannot exceed 65535.</span>
702 <span class="invalid-feedback"
703 *ngIf="serviceForm.showError('monitor_port', frm, 'required')"
704 i18n>This field is required.</span>
707 <!-- virtual_interface_networks -->
708 <div class="form-group row"
709 *ngIf="!serviceForm.controls.unmanaged.value">
710 <label class="cd-col-form-label"
711 for="virtual_interface_networks">
712 <span i18n>CIDR Networks</span>
714 <span i18n>A list of networks to identify which network interface to use for the virtual IP address.</span>
717 <div class="cd-col-form-input">
718 <input id="virtual_interface_networks"
721 formControlName="virtual_interface_networks">
726 <!-- SNMP-Gateway -->
727 <ng-container *ngIf="serviceForm.controls.service_type.value === 'snmp-gateway'">
728 <!-- snmp-version -->
729 <div class="form-group row">
730 <label class="cd-col-form-label required"
733 <div class="cd-col-form-input">
734 <select id="snmp_version"
737 formControlName="snmp_version"
738 (change)="clearValidations()">
740 [ngValue]="null">-- Select SNMP version --</option>
741 <option *ngFor="let snmpVersion of ['V2c', 'V3']"
742 [value]="snmpVersion">{{ snmpVersion }}</option>
744 <span class="invalid-feedback"
745 *ngIf="serviceForm.showError('snmp_version', frm, 'required')"
746 i18n>This field is required.</span>
750 <div class="form-group row">
751 <label class="cd-col-form-label required"
752 for="snmp_destination">
753 <span i18n>Destination</span>
755 <span i18n>Must be of the format hostname:port.</span>
758 <div class="cd-col-form-input">
759 <input id="snmp_destination"
762 formControlName="snmp_destination">
763 <span class="invalid-feedback"
764 *ngIf="serviceForm.showError('snmp_destination', frm, 'required')"
765 i18n>This field is required.</span>
766 <span class="invalid-feedback"
767 *ngIf="serviceForm.showError('snmp_destination', frm, 'snmpDestinationPattern')"
768 i18n>The value does not match the pattern: <strong>hostname:port</strong></span>
771 <!-- Engine id for snmp V3 -->
772 <div class="form-group row"
773 *ngIf="serviceForm.controls.snmp_version.value === 'V3'">
774 <label class="cd-col-form-label required"
776 <span i18n>Engine Id</span>
778 <span i18n>Unique identifier for the device (in hex).</span>
781 <div class="cd-col-form-input">
782 <input id="engine_id"
785 formControlName="engine_id">
786 <span class="invalid-feedback"
787 *ngIf="serviceForm.showError('engine_id', frm, 'required')"
788 i18n>This field is required.</span>
789 <span class="invalid-feedback"
790 *ngIf="serviceForm.showError('engine_id', frm, 'snmpEngineIdPattern')"
791 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>
794 <!-- Auth protocol for snmp V3 -->
795 <div class="form-group row"
796 *ngIf="serviceForm.controls.snmp_version.value === 'V3'">
797 <label class="cd-col-form-label required"
799 i18n>Auth Protocol</label>
800 <div class="cd-col-form-input">
801 <select id="auth_protocol"
804 formControlName="auth_protocol">
806 [ngValue]="null">-- Select auth protocol --</option>
807 <option *ngFor="let authProtocol of ['SHA', 'MD5']"
808 [value]="authProtocol">
812 <span class="invalid-feedback"
813 *ngIf="serviceForm.showError('auth_protocol', frm, 'required')"
814 i18n>This field is required.</span>
817 <!-- Privacy protocol for snmp V3 -->
818 <div class="form-group row"
819 *ngIf="serviceForm.controls.snmp_version.value === 'V3'">
820 <label class="cd-col-form-label"
821 for="privacy_protocol"
822 i18n>Privacy Protocol</label>
823 <div class="cd-col-form-input">
824 <select id="privacy_protocol"
825 name="privacy_protocol"
827 formControlName="privacy_protocol">
829 [ngValue]="null">-- Select privacy protocol --</option>
830 <option *ngFor="let privacyProtocol of ['DES', 'AES']"
831 [value]="privacyProtocol">
832 {{ privacyProtocol }}
839 <legend i18n>Credentials</legend>
840 <!-- snmp v2c snmp_community -->
841 <div class="form-group row"
842 *ngIf="serviceForm.controls.snmp_version.value === 'V2c'">
843 <label class="cd-col-form-label required"
844 for="snmp_community">
845 <span i18n>SNMP Community</span>
847 <div class="cd-col-form-input">
848 <input id="snmp_community"
851 formControlName="snmp_community">
852 <span class="invalid-feedback"
853 *ngIf="serviceForm.showError('snmp_community', frm, 'required')"
854 i18n>This field is required.</span>
857 <!-- snmp v3 auth username -->
858 <div class="form-group row"
859 *ngIf="serviceForm.controls.snmp_version.value === 'V3'">
860 <label class="cd-col-form-label required"
861 for="snmp_v3_auth_username">
862 <span i18n>Username</span>
864 <div class="cd-col-form-input">
865 <input id="snmp_v3_auth_username"
868 formControlName="snmp_v3_auth_username">
869 <span class="invalid-feedback"
870 *ngIf="serviceForm.showError('snmp_v3_auth_username', frm, 'required')"
871 i18n>This field is required.</span>
874 <!-- snmp v3 auth password -->
875 <div class="form-group row"
876 *ngIf="serviceForm.controls.snmp_version.value === 'V3'">
877 <label class="cd-col-form-label required"
878 for="snmp_v3_auth_password">
879 <span i18n>Password</span>
881 <div class="cd-col-form-input">
882 <input id="snmp_v3_auth_password"
885 formControlName="snmp_v3_auth_password">
886 <span class="invalid-feedback"
887 *ngIf="serviceForm.showError('snmp_v3_auth_password', frm, 'required')"
888 i18n>This field is required.</span>
891 <!-- snmp v3 priv password -->
892 <div class="form-group row"
893 *ngIf="serviceForm.controls.snmp_version.value === 'V3' && serviceForm.controls.privacy_protocol.value !== null && serviceForm.controls.privacy_protocol.value !== undefined">
894 <label class="cd-col-form-label required"
895 for="snmp_v3_priv_password">
896 <span i18n>Encryption</span>
898 <div class="cd-col-form-input">
899 <input id="snmp_v3_priv_password"
902 formControlName="snmp_v3_priv_password">
903 <span class="invalid-feedback"
904 *ngIf="serviceForm.showError('snmp_v3_priv_password', frm, 'required')"
905 i18n>This field is required.</span>
910 <!-- RGW, Ingress & iSCSI -->
911 <ng-container *ngIf="!serviceForm.controls.unmanaged.value && ['rgw', 'iscsi', 'ingress'].includes(serviceForm.controls.service_type.value)">
913 <div class="form-group row">
914 <div class="cd-col-form-offset">
915 <div class="custom-control custom-checkbox">
916 <input class="custom-control-input"
919 formControlName="ssl">
920 <label class="custom-control-label"
928 <div *ngIf="serviceForm.controls.ssl.value"
929 class="form-group row">
930 <label class="cd-col-form-label"
932 <span i18n>Certificate</span>
933 <cd-helper i18n>The SSL certificate in PEM format.</cd-helper>
935 <div class="cd-col-form-input">
936 <textarea id="ssl_cert"
937 class="form-control resize-vertical text-monospace text-pre"
938 formControlName="ssl_cert"
942 (change)="fileUpload($event.target.files, 'ssl_cert')">
943 <span class="invalid-feedback"
944 *ngIf="serviceForm.showError('ssl_cert', frm, 'required')"
945 i18n>This field is required.</span>
946 <span class="invalid-feedback"
947 *ngIf="serviceForm.showError('ssl_cert', frm, 'pattern')"
948 i18n>Invalid SSL certificate.</span>
953 <div *ngIf="serviceForm.controls.ssl.value && !(['rgw', 'ingress'].includes(serviceForm.controls.service_type.value))"
954 class="form-group row">
955 <label class="cd-col-form-label"
957 <span i18n>Private key</span>
958 <cd-helper i18n>The SSL private key in PEM format.</cd-helper>
960 <div class="cd-col-form-input">
961 <textarea id="ssl_key"
962 class="form-control resize-vertical text-monospace text-pre"
963 formControlName="ssl_key"
967 (change)="fileUpload($event.target.files,'ssl_key')">
968 <span class="invalid-feedback"
969 *ngIf="serviceForm.showError('ssl_key', frm, 'required')"
970 i18n>This field is required.</span>
971 <span class="invalid-feedback"
972 *ngIf="serviceForm.showError('ssl_key', frm, 'pattern')"
973 i18n>Invalid SSL private key.</span>
978 <ng-container *ngIf="serviceForm.controls.service_type.value === 'grafana'">
979 <div class="form-group row">
980 <label class="cd-col-form-label"
982 <span i18n>Grafana Port</span>
984 <span i18n>The default port used by grafana.</span>
987 <div class="cd-col-form-input">
988 <input id="grafana_port"
991 formControlName="grafana_port"
994 <span class="invalid-feedback"
995 *ngIf="serviceForm.showError('grafana_port', frm, 'pattern')"
996 i18n>The entered value needs to be a number.</span>
997 <span class="invalid-feedback"
998 *ngIf="serviceForm.showError('grafana_port', frm, 'min')"
999 i18n>The value must be at least 1.</span>
1000 <span class="invalid-feedback"
1001 *ngIf="serviceForm.showError('grafana_port', frm, 'max')"
1002 i18n>The value cannot exceed 65535.</span>
1003 <span class="invalid-feedback"
1004 *ngIf="serviceForm.showError('grafana_port', frm, 'required')"
1005 i18n>This field is required.</span>
1009 <div class="form-group row">
1011 class="cd-col-form-label"
1012 for="grafana_admin_password">
1013 <span>Grafana Password</span>
1014 <cd-helper>The password of the default Grafana Admin. Set once on first-run.</cd-helper>
1016 <div class="cd-col-form-input">
1017 <div class="input-group">
1018 <input id="grafana_admin_password"
1019 class="form-control"
1021 autocomplete="new-password"
1022 [attr.disabled]="editing ? true:null"
1023 formControlName="grafana_admin_password">
1024 <span class="input-group-append">
1025 <button type="button"
1026 class="btn btn-light"
1027 cdPasswordButton="grafana_admin_password">
1029 <cd-copy-2-clipboard-button source="grafana_admin_password">
1030 </cd-copy-2-clipboard-button>
1038 <div class="modal-footer">
1039 <div class="text-right">
1040 <cd-form-button-panel (submitActionEvent)="onSubmit()"
1041 [form]="serviceForm"
1042 [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel>