]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/blob
276a92ec2a44dd10fa05ab4741e7b21dcc7fcfd9
[ceph.git] /
1 <div class="col-sm-12 col-lg-6">
2   <form name="configForm"
3         class="form-horizontal"
4         #formDir="ngForm"
5         [formGroup]="configForm"
6         novalidate>
7     <div class="panel panel-default">
8       <div class="panel-heading">
9         <h3 class="panel-title">
10           <ng-container i18n>Edit</ng-container> {{ configForm.getValue('name') }}
11         </h3>
12       </div>
13       <div class="panel-body">
14
15         <!-- Name -->
16         <div class="form-group">
17           <label i18n
18                  class="control-label col-sm-3">Name
19           </label>
20           <div class="col-sm-9">
21             <input class="form-control"
22                    type="text"
23                    id="name"
24                    formControlName="name"
25                    readonly>
26           </div>
27         </div>
28
29         <!-- Description -->
30         <div class="form-group"
31              *ngIf="configForm.getValue('desc')">
32           <label i18n
33                  class="control-label col-sm-3">Description
34           </label>
35           <div class="col-sm-9">
36             <textarea class="form-control resize-vertical"
37                       id="desc"
38                       formControlName="desc"
39                       readonly>
40             </textarea>
41           </div>
42         </div>
43
44         <!-- Long description -->
45         <div class="form-group"
46              *ngIf="configForm.getValue('long_desc')">
47           <label i18n
48                  class="control-label col-sm-3">Long description
49           </label>
50           <div class="col-sm-9">
51             <textarea class="form-control resize-vertical"
52                       id="long_desc"
53                       formControlName="long_desc"
54                       readonly>
55             </textarea>
56           </div>
57         </div>
58
59         <!-- Default -->
60         <div class="form-group"
61              *ngIf="configForm.getValue('default') !== ''">
62           <label i18n
63                  class="control-label col-sm-3">Default
64           </label>
65           <div class="col-sm-9">
66             <input class="form-control"
67                    type="text"
68                    id="default"
69                    formControlName="default"
70                    readonly>
71           </div>
72         </div>
73
74         <!-- Daemon default -->
75         <div class="form-group"
76              *ngIf="configForm.getValue('daemon_default') !== ''">
77           <label i18n
78                  class="control-label col-sm-3">Daemon default
79           </label>
80           <div class="col-sm-9">
81             <input class="form-control"
82                    type="text"
83                    id="daemon_default"
84                    formControlName="daemon_default"
85                    readonly>
86           </div>
87         </div>
88
89         <!-- Services -->
90         <div class="form-group"
91              *ngIf="configForm.getValue('services').length > 0">
92           <label i18n
93                  class="control-label col-sm-3">Services
94           </label>
95           <div class="col-sm-9">
96             <span *ngFor="let service of configForm.getValue('services')"
97                   class="form-component-badge">
98               <span class="badge badge-pill badge-primary">{{ service }}</span>
99             </span>
100           </div>
101         </div>
102
103         <!-- Values -->
104         <div class="col-sm-12"
105              formGroupName="values">
106           <h2 i18n
107               class="page-header">Values</h2>
108           <div class="row"
109                *ngFor="let section of availSections">
110             <div class="form-group"
111                  *ngIf="type === 'bool'">
112               <div class="col-sm-offset-3 col-sm-9">
113                 <div class="checkbox checkbox-primary">
114                   <input [id]="section"
115                          type="checkbox"
116                          [formControlName]="section">
117                   <label [for]="section">{{ section }}
118                   </label>
119                 </div>
120               </div>
121             </div>
122             <div class="form-group"
123                  [ngClass]="{'has-error': configForm.showError(section, formDir)}"
124                  *ngIf="type !== 'bool'">
125               <label class="control-label col-sm-3"
126                      [for]="section">{{ section }}
127               </label>
128               <div class="col-sm-9">
129                 <input class="form-control"
130                        [type]="inputType"
131                        [id]="section"
132                        [placeholder]="humanReadableType"
133                        [formControlName]="section"
134                        [step]="getStep(type, this.configForm.getValue(section))">
135                 <span class="help-block"
136                       *ngIf="configForm.showError(section, formDir, 'pattern')">
137                   {{ patternHelpText }}
138                 </span>
139                 <span class="help-block"
140                       *ngIf="configForm.showError(section, formDir, 'invalidUuid')">
141                   {{ patternHelpText }}
142                 </span>
143                 <span class="help-block"
144                       *ngIf="configForm.showError(section, formDir, 'max')"
145                       i18n>
146                   The entered value is too high! It must not be greater than {{ maxValue }}.
147                 </span>
148                 <span class="help-block"
149                       *ngIf="configForm.showError(section, formDir, 'min')"
150                       i18n>
151                   The entered value is too low! It must not be lower than {{ minValue }}.
152                 </span>
153               </div>
154             </div>
155           </div>
156         </div>
157       </div>
158       <!-- Footer -->
159       <div class="panel-footer">
160         <div class="button-group text-right">
161           <cd-submit-button [form]="formDir"
162                             type="button"
163                             (submitAction)="submit()">
164             <span i18n>Save</span>
165           </cd-submit-button>
166           <button type="button"
167                   class="btn btn-sm btn-default"
168                   routerLink="/configuration"
169                   i18n>
170             Back
171           </button>
172         </div>
173       </div>
174     </div>
175   </form>
176 </div>