|
|
|
@ -1,6 +1,7 @@ |
|
|
|
<div mat-dialog-title>{{ data.categoryName }} › {{ data.rule.name }}</div> |
|
|
|
|
|
|
|
<div class="py-3" mat-dialog-content> |
|
|
|
<form [formGroup]="settingsForm"> |
|
|
|
<div class="py-3" mat-dialog-content> |
|
|
|
@if ( |
|
|
|
data.rule.configuration.thresholdMin && data.rule.configuration.thresholdMax |
|
|
|
) { |
|
|
|
@ -12,14 +13,14 @@ |
|
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
|
[locale]="data.locale" |
|
|
|
[precision]="2" |
|
|
|
[value]="data.settings.thresholdMin" |
|
|
|
[value]="settingsForm.controls.thresholdMin.value" |
|
|
|
/> |
|
|
|
<span class="mx-1">-</span> |
|
|
|
<gf-value |
|
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
|
[locale]="data.locale" |
|
|
|
[precision]="2" |
|
|
|
[value]="data.settings.thresholdMax" |
|
|
|
[value]="settingsForm.controls.thresholdMax.value" |
|
|
|
/> |
|
|
|
</h6> |
|
|
|
<div class="align-items-center d-flex w-100"> |
|
|
|
@ -35,8 +36,8 @@ |
|
|
|
[min]="data.rule.configuration.threshold.min" |
|
|
|
[step]="data.rule.configuration.threshold.step" |
|
|
|
> |
|
|
|
<input matSliderStartThumb [(ngModel)]="data.settings.thresholdMin" /> |
|
|
|
<input matSliderEndThumb [(ngModel)]="data.settings.thresholdMax" /> |
|
|
|
<input formControlName="thresholdMin" matSliderStartThumb /> |
|
|
|
<input formControlName="thresholdMax" matSliderEndThumb /> |
|
|
|
</mat-slider> |
|
|
|
<gf-value |
|
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
|
@ -58,7 +59,7 @@ |
|
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
|
[locale]="data.locale" |
|
|
|
[precision]="2" |
|
|
|
[value]="data.settings.thresholdMin" |
|
|
|
[value]="settingsForm.controls.thresholdMin.value" |
|
|
|
/> |
|
|
|
</h6> |
|
|
|
<div class="align-items-center d-flex w-100"> |
|
|
|
@ -70,12 +71,11 @@ |
|
|
|
/> |
|
|
|
<mat-slider |
|
|
|
class="flex-grow-1" |
|
|
|
name="thresholdMin" |
|
|
|
[max]="data.rule.configuration.threshold.max" |
|
|
|
[min]="data.rule.configuration.threshold.min" |
|
|
|
[step]="data.rule.configuration.threshold.step" |
|
|
|
> |
|
|
|
<input matSliderThumb [(ngModel)]="data.settings.thresholdMin" /> |
|
|
|
<input formControlName="thresholdMin" matSliderThumb /> |
|
|
|
</mat-slider> |
|
|
|
<gf-value |
|
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
|
@ -96,7 +96,7 @@ |
|
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
|
[locale]="data.locale" |
|
|
|
[precision]="2" |
|
|
|
[value]="data.settings.thresholdMax" |
|
|
|
[value]="settingsForm.controls.thresholdMax.value" |
|
|
|
/> |
|
|
|
</h6> |
|
|
|
<div class="align-items-center d-flex w-100"> |
|
|
|
@ -108,12 +108,11 @@ |
|
|
|
/> |
|
|
|
<mat-slider |
|
|
|
class="flex-grow-1" |
|
|
|
name="thresholdMax" |
|
|
|
[max]="data.rule.configuration.threshold.max" |
|
|
|
[min]="data.rule.configuration.threshold.min" |
|
|
|
[step]="data.rule.configuration.threshold.step" |
|
|
|
> |
|
|
|
<input matSliderThumb [(ngModel)]="data.settings.thresholdMax" /> |
|
|
|
<input formControlName="thresholdMax" matSliderThumb /> |
|
|
|
</mat-slider> |
|
|
|
<gf-value |
|
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
|
@ -124,15 +123,17 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div align="end" mat-dialog-actions> |
|
|
|
<div align="end" mat-dialog-actions> |
|
|
|
<button i18n mat-button (click)="dialogRef.close()">Close</button> |
|
|
|
<button |
|
|
|
color="primary" |
|
|
|
mat-flat-button |
|
|
|
(click)="dialogRef.close(data.settings)" |
|
|
|
[disabled]="settingsForm.pristine" |
|
|
|
(click)="onSave()" |
|
|
|
> |
|
|
|
<ng-container i18n>Save</ng-container> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
|