1 <cd-modal [modalRef]="bsModalRef">
2 <ng-container class="modal-title"
3 i18n>OSD Recovery Priority</ng-container>
5 <ng-container class="modal-content">
6 <form #formDir="ngForm"
7 [formGroup]="osdRecvSpeedForm"
9 <div class="modal-body">
11 <div class="form-group row">
12 <label class="col-form-label col-sm-6"
14 <ng-container i18n>Priority</ng-container>
15 <span class="required"></span>
17 <div class="col-sm-6">
18 <select class="form-control custom-select"
19 formControlName="priority"
21 (change)="onPriorityChange($event.target.value)">
22 <option *ngFor="let priority of priorities"
23 [value]="priority.name">
27 <span class="invalid-feedback"
28 *ngIf="osdRecvSpeedForm.showError('priority', formDir, 'required')"
29 i18n>This field is required.</span>
33 <!-- Customize priority -->
34 <div class="form-group row">
35 <div class="offset-sm-6 col-sm-6">
36 <div class="custom-control custom-checkbox">
37 <input formControlName="customizePriority"
38 class="custom-control-input"
39 id="customizePriority"
40 name="customizePriority"
42 (change)="onCustomizePriorityChange()">
43 <label class="custom-control-label"
44 for="customizePriority"
45 i18n>Customize priority values</label>
50 <!-- Priority values -->
51 <div class="form-group row"
52 *ngFor="let attr of priorityAttrs | keyvalue">
53 <label class="col-form-label col-sm-6"
54 [for]="attr.key">{{ attr.value.text }}
55 <cd-helper *ngIf="attr.value.desc">{{ attr.value.desc }}</cd-helper>
56 <span class="required"
57 *ngIf="osdRecvSpeedForm.getValue('customizePriority')"></span>
59 <div class="col-sm-6">
60 <input class="form-control"
63 [formControlName]="attr.key"
64 [readonly]="!osdRecvSpeedForm.getValue('customizePriority')">
65 <span class="invalid-feedback"
66 *ngIf="osdRecvSpeedForm.getValue('customizePriority') &&
67 osdRecvSpeedForm.showError(attr.key, formDir, 'required')"
68 i18n>This field is required!</span>
69 <span class="invalid-feedback"
70 *ngIf="osdRecvSpeedForm.getValue('customizePriority') &&
71 osdRecvSpeedForm.showError(attr.key, formDir, 'pattern')"
72 i18n>{{ attr.value.patternHelpText }}</span>
73 <span class="invalid-feedback"
74 *ngIf="osdRecvSpeedForm.getValue('customizePriority') &&
75 osdRecvSpeedForm.showError(attr.key, formDir, 'max')"
76 i18n>The entered value is too high! It must not be greater than {{ attr.value.maxValue }}.</span>
77 <span class="invalid-feedback"
78 *ngIf="osdRecvSpeedForm.getValue('customizePriority') &&
79 osdRecvSpeedForm.showError(attr.key, formDir, 'min')"
80 i18n>The entered value is too low! It must not be lower than {{ attr.value.minValue }}.</span>
84 <div class="modal-footer">
85 <div class="button-group text-right">
86 <cd-submit-button *ngIf="permissions.configOpt.update"
87 (submitAction)="submitAction()"
88 [form]="osdRecvSpeedForm"
89 i18n>Submit</cd-submit-button>
90 <cd-back-button [back]="bsModalRef.hide"