|
|
|
@ -1,8 +1,10 @@ |
|
|
|
<div mat-dialog-title>{{ data.categoryName }} › {{ data.rule.name }}</div> |
|
|
|
|
|
|
|
<div class="py-3" mat-dialog-content> |
|
|
|
<form class="d-flex flex-column h-100" [formGroup]="form" (ngSubmit)="onSave()"> |
|
|
|
<div class="py-3" mat-dialog-content> |
|
|
|
@if ( |
|
|
|
data.rule.configuration.thresholdMin && data.rule.configuration.thresholdMax |
|
|
|
data.rule.configuration.thresholdMin && |
|
|
|
data.rule.configuration.thresholdMax |
|
|
|
) { |
|
|
|
<div class="w-100"> |
|
|
|
<h6 class="d-flex mb-0"> |
|
|
|
@ -12,14 +14,14 @@ |
|
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
|
[locale]="data.locale" |
|
|
|
[precision]="2" |
|
|
|
[value]="data.settings.thresholdMin" |
|
|
|
[value]="form.value.thresholdMin" |
|
|
|
/> |
|
|
|
<span class="mx-1">-</span> |
|
|
|
<gf-value |
|
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
|
[locale]="data.locale" |
|
|
|
[precision]="2" |
|
|
|
[value]="data.settings.thresholdMax" |
|
|
|
[value]="form.value.thresholdMax" |
|
|
|
/> |
|
|
|
</h6> |
|
|
|
<div class="align-items-center d-flex w-100"> |
|
|
|
@ -35,8 +37,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 +60,7 @@ |
|
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
|
[locale]="data.locale" |
|
|
|
[precision]="2" |
|
|
|
[value]="data.settings.thresholdMin" |
|
|
|
[value]="form.value.thresholdMin" |
|
|
|
/> |
|
|
|
</h6> |
|
|
|
<div class="align-items-center d-flex w-100"> |
|
|
|
@ -75,7 +77,7 @@ |
|
|
|
[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 +98,7 @@ |
|
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
|
[locale]="data.locale" |
|
|
|
[precision]="2" |
|
|
|
[value]="data.settings.thresholdMax" |
|
|
|
[value]="form.value.thresholdMax" |
|
|
|
/> |
|
|
|
</h6> |
|
|
|
<div class="align-items-center d-flex w-100"> |
|
|
|
@ -113,7 +115,7 @@ |
|
|
|
[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 +126,19 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div align="end" mat-dialog-actions> |
|
|
|
<button i18n mat-button (click)="dialogRef.close()">Close</button> |
|
|
|
<div align="end" mat-dialog-actions> |
|
|
|
<button i18n mat-button type="button" (click)="dialogRef.close()"> |
|
|
|
Close |
|
|
|
</button> |
|
|
|
<button |
|
|
|
color="primary" |
|
|
|
mat-flat-button |
|
|
|
(click)="dialogRef.close(data.settings)" |
|
|
|
type="submit" |
|
|
|
[disabled]="!(form.dirty && form.valid)" |
|
|
|
> |
|
|
|
<ng-container i18n>Save</ng-container> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
|