]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
279d108d3fe2021488fbbaaeedd0f8ab83df6f6e
[ceph.git] /
1 <cd-modal [pageURL]="pageURL">
2   <span class="modal-title"
3         i18n>{{ action | titlecase }} {{ resource | upperFirst }}</span>
4   <ng-container class="modal-content">
5     <form name="listenerForm"
6           #formDir="ngForm"
7           [formGroup]="listenerForm"
8           novalidate>
9       <div class="modal-body">
10         <!-- Host -->
11         <div class="form-group row">
12           <label class="cd-col-form-label"
13                  for="host">
14             <span class="required"
15                   i18n>Host Name</span>
16           </label>
17           <div class="cd-col-form-input">
18             <select id="host"
19                     name="host"
20                     class="form-select"
21                     formControlName="host">
22               <option *ngIf="hosts === null"
23                       [ngValue]="null"
24                       i18n>Loading...</option>
25               <option *ngIf="hosts && hosts.length === 0"
26                       [ngValue]="null"
27                       i18n>-- No hosts available --</option>
28               <option *ngIf="hosts && hosts.length > 0"
29                       [ngValue]="null"
30                       i18n>-- Select a host --</option>
31               <option *ngFor="let hostsItem of hosts"
32                       [ngValue]="hostsItem">{{ hostsItem.hostname }}</option>
33             </select>
34             <cd-help-text i18n>
35                 This hostname uniquely identifies the gateway on which the listener is being set up.
36             </cd-help-text>
37             <span class="invalid-feedback"
38                   *ngIf="listenerForm.showError('host', formDir, 'required')"
39                   i18n>This field is required.</span>
40           </div>
41         </div>
42         <!-- Transport Service ID -->
43         <div class="form-group row">
44           <label class="cd-col-form-label"
45                  for="trsvcid">
46             <span i18n>Transport Service ID</span>
47           </label>
48           <div class="cd-col-form-input">
49             <input id="trsvcid"
50                    class="form-control"
51                    type="text"
52                    name="trsvcid"
53                    formControlName="trsvcid">
54             <cd-help-text i18n>The IP port to use. Default is 4420.</cd-help-text>
55             <span class="invalid-feedback"
56                   *ngIf="listenerForm.showError('trsvcid', formDir, 'required')"
57                   i18n>This field is required.</span>
58             <span class="invalid-feedback"
59                   *ngIf="listenerForm.showError('trsvcid', formDir, 'max')"
60                   i18n>The value cannot be greated than 65535.</span>
61             <span class="invalid-feedback"
62                   *ngIf="listenerForm.showError('trsvcid', formDir, 'pattern')"
63                   i18n>The value must be a positive integer.</span>
64           </div>
65         </div>
66       </div>
67       <div class="modal-footer">
68         <div class="text-right">
69           <cd-form-button-panel (submitActionEvent)="onSubmit()"
70                                 [form]="listenerForm"
71                                 [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel>
72         </div>
73       </div>
74     </form>
75   </ng-container>
76 </cd-modal>