]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
a12846e5dac8ac756fddcf2d8592b04c800408dd
[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 name="subsystemForm"
7           #formDir="ngForm"
8           [formGroup]="subsystemForm"
9           novalidate>
10       <div class="modal-body">
11         <!-- NQN -->
12         <div class="form-group row">
13           <label class="cd-col-form-label"
14                  for="nqn">
15             <span class="required"
16                   i18n>NQN</span>
17           </label>
18           <div class="cd-col-form-input">
19             <input name="nqn"
20                    class="form-control"
21                    type="text"
22                    formControlName="nqn">
23               <cd-help-text>
24                 A unique and permanent name for the lifetime of the subsystem.
25               </cd-help-text>
26             <span class="invalid-feedback"
27                   *ngIf="subsystemForm.showError('nqn', formDir, 'required')"
28                   i18n>This field is required.</span>
29             <span class="invalid-feedback"
30                   *ngIf="subsystemForm.showError('nqn', formDir, 'unique')"
31                   i18n>This NQN is already in use.</span>
32             <span class="invalid-feedback"
33                   *ngIf="subsystemForm.showError('nqn', formDir, 'pattern')"
34                   i18n>Expected NQN format<br/>&lt;<code>nqn.$year-$month.$reverseDomainName:$utf8-string</code>".&gt; or <br/>&lt;<code>nqn.2014-08.org.nvmexpress:uuid:$UUID-string</code>".&gt;</span>
35             <span class="invalid-feedback"
36                   *ngIf="subsystemForm.showError('nqn', formDir, 'maxLength')"
37                   i18n>An NQN should not be more than 223 bytes in length.</span>
38           </div>
39         </div>
40         <!-- Maximum Namespaces -->
41         <div class="form-group row">
42           <label class="cd-col-form-label"
43                  for="max_namespaces">
44             <span i18n>Maximum Namespaces</span>
45           </label>
46           <div class="cd-col-form-input">
47             <input id="max_namespaces"
48                    class="form-control"
49                    type="text"
50                    name="max_namespaces"
51                    formControlName="max_namespaces">
52             <cd-help-text i18n>The maximum namespaces per subsystem. Default is 256.</cd-help-text>
53             <span class="invalid-feedback"
54                   *ngIf="subsystemForm.showError('max_namespaces', formDir, 'min')"
55                   i18n>The value must be at least 1.</span>
56             <span class="invalid-feedback"
57                   *ngIf="subsystemForm.showError('max_namespaces', formDir, 'max')"
58                   i18n>The value cannot be greated than 256.</span>
59             <span class="invalid-feedback"
60                   *ngIf="subsystemForm.showError('max_namespaces', formDir, 'pattern')"
61                   i18n>The value must be  a positive integer.</span>
62           </div>
63         </div>
64       </div>
65       <div class="modal-footer">
66         <div class="text-right">
67           <cd-form-button-panel (submitActionEvent)="onSubmit()"
68                                 [form]="subsystemForm"
69                                 [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel>
70         </div>
71       </div>
72     </form>
73   </ng-container>
74 </cd-modal>