]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/blob
5e6d9851d8c191ce734494fefeb4cbf9ef9af15f
[ceph-ci.git] /
1 <cd-modal [modalRef]="bsModalRef">
2   <ng-container class="modal-title"
3                 i18n>Reweight OSD</ng-container>
4
5   <ng-container class="modal-content">
6     <form class="form-horizontal"
7           [formGroup]="reweightForm">
8       <div class="modal-body" [ngClass]="{'has-error': weight.errors}">
9         <div class="row">
10           <label for="weight" class="col-sm-2 control-label">Weight</label>
11           <div class="col-sm-10">
12             <input id="weight" class="form-control" type="number"
13                    step="0.1" formControlName="weight" min="0" max="1"
14                    [value]="currentWeight">
15             <span class="help-block"
16                   *ngIf="weight.errors">
17               <span *ngIf="weight.errors?.required"
18                     i18n>This field is required.</span>
19               <span *ngIf="weight.errors?.max || weight.errors?.min"
20                     i18n>The value needs to be between 0 and 1.</span>
21             </span>
22           </div>
23         </div>
24       </div>
25
26       <div class="modal-footer">
27         <cd-submit-button (submitAction)="reweight()"
28                           [form]="reweightForm"
29                           [disabled]="reweightForm.invalid"
30                           i18n>Reweight</cd-submit-button>
31
32         <button class="btn btn-link btn-sm"
33                 (click)="bsModalRef.hide()"
34                 i18n>Cancel</button>
35       </div>
36     </form>
37   </ng-container>
38 </cd-modal>