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 required"
15 <div class=
"col-sm-6">
16 <select class=
"form-control custom-select"
17 formControlName=
"priority"
19 (change)=
"onPriorityChange($event.target.value)">
20 <option *
ngFor=
"let priority of priorities"
21 [value]=
"priority.name">
25 <span class=
"invalid-feedback"
26 *
ngIf=
"osdRecvSpeedForm.showError('priority', formDir, 'required')"
27 i18n
>This field is required.
</span>
31 <!-- Customize priority -->
32 <div class=
"form-group row">
33 <div class=
"offset-sm-6 col-sm-6">
34 <div class=
"custom-control custom-checkbox">
35 <input formControlName=
"customizePriority"
36 class=
"custom-control-input"
37 id=
"customizePriority"
38 name=
"customizePriority"
40 (change)=
"onCustomizePriorityChange()">
41 <label class=
"custom-control-label"
42 for=
"customizePriority"
43 i18n
>Customize priority values
</label>
48 <!-- Priority values -->
49 <div class=
"form-group row"
50 *
ngFor=
"let attr of priorityAttrs | keyvalue">
51 <label class=
"col-form-label col-sm-6"
53 <span [ngClass]=
"{'required': osdRecvSpeedForm.getValue('customizePriority')}">
56 <cd-helper *
ngIf=
"attr.value.desc">{{ attr.value.desc }}
</cd-helper>
58 <div class=
"col-sm-6">
59 <input class=
"form-control"
62 [formControlName]=
"attr.key"
63 [readonly]=
"!osdRecvSpeedForm.getValue('customizePriority')">
64 <span class=
"invalid-feedback"
65 *
ngIf=
"osdRecvSpeedForm.getValue('customizePriority') &&
66 osdRecvSpeedForm.showError(attr.key, formDir, 'required')"
67 i18n
>This field is required!
</span>
68 <span class=
"invalid-feedback"
69 *
ngIf=
"osdRecvSpeedForm.getValue('customizePriority') &&
70 osdRecvSpeedForm.showError(attr.key, formDir, 'pattern')"
71 i18n
>{{ attr.value.patternHelpText }}
</span>
72 <span class=
"invalid-feedback"
73 *
ngIf=
"osdRecvSpeedForm.getValue('customizePriority') &&
74 osdRecvSpeedForm.showError(attr.key, formDir, 'max')"
75 i18n
>The entered value is too high! It must not be greater than {{ attr.value.maxValue }}.
</span>
76 <span class=
"invalid-feedback"
77 *
ngIf=
"osdRecvSpeedForm.getValue('customizePriority') &&
78 osdRecvSpeedForm.showError(attr.key, formDir, 'min')"
79 i18n
>The entered value is too low! It must not be lower than {{ attr.value.minValue }}.
</span>
83 <div class=
"modal-footer">
84 <div class=
"button-group text-right">
85 <cd-submit-button *
ngIf=
"permissions.configOpt.update"
86 (submitAction)=
"submitAction()"
87 [form]=
"osdRecvSpeedForm"
88 i18n
>Submit
</cd-submit-button>
89 <cd-back-button [back]=
"bsModalRef.hide"