|
|
@ -1,8 +1,14 @@ |
|
|
<div mat-dialog-title>{{ data.categoryName }} › {{ data.rule.name }}</div> |
|
|
<div mat-dialog-title>{{ data.categoryName }} › {{ data.rule.name }}</div> |
|
|
|
|
|
|
|
|
|
|
|
<form |
|
|
|
|
|
class="d-flex flex-column h-100" |
|
|
|
|
|
[formGroup]="settingsForm" |
|
|
|
|
|
(ngSubmit)="onSubmit()" |
|
|
|
|
|
> |
|
|
<div class="py-3" mat-dialog-content> |
|
|
<div class="py-3" mat-dialog-content> |
|
|
@if ( |
|
|
@if ( |
|
|
data.rule.configuration.thresholdMin && data.rule.configuration.thresholdMax |
|
|
data.rule.configuration.thresholdMin && |
|
|
|
|
|
data.rule.configuration.thresholdMax |
|
|
) { |
|
|
) { |
|
|
<div class="w-100"> |
|
|
<div class="w-100"> |
|
|
<h6 class="d-flex mb-0"> |
|
|
<h6 class="d-flex mb-0"> |
|
|
@ -12,14 +18,14 @@ |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
[locale]="data.locale" |
|
|
[locale]="data.locale" |
|
|
[precision]="2" |
|
|
[precision]="2" |
|
|
[value]="data.settings.thresholdMin" |
|
|
[value]="settingsForm.get('thresholdMin').value" |
|
|
/> |
|
|
/> |
|
|
<span class="mx-1">-</span> |
|
|
<span class="mx-1">-</span> |
|
|
<gf-value |
|
|
<gf-value |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
[locale]="data.locale" |
|
|
[locale]="data.locale" |
|
|
[precision]="2" |
|
|
[precision]="2" |
|
|
[value]="data.settings.thresholdMax" |
|
|
[value]="settingsForm.get('thresholdMax').value" |
|
|
/> |
|
|
/> |
|
|
</h6> |
|
|
</h6> |
|
|
<div class="align-items-center d-flex w-100"> |
|
|
<div class="align-items-center d-flex w-100"> |
|
|
@ -35,8 +41,8 @@ |
|
|
[min]="data.rule.configuration.threshold.min" |
|
|
[min]="data.rule.configuration.threshold.min" |
|
|
[step]="data.rule.configuration.threshold.step" |
|
|
[step]="data.rule.configuration.threshold.step" |
|
|
> |
|
|
> |
|
|
<input matSliderStartThumb [(ngModel)]="data.settings.thresholdMin" /> |
|
|
<input formControlName="thresholdMin" matSliderStartThumb /> |
|
|
<input matSliderEndThumb [(ngModel)]="data.settings.thresholdMax" /> |
|
|
<input formControlName="thresholdMax" matSliderEndThumb /> |
|
|
</mat-slider> |
|
|
</mat-slider> |
|
|
<gf-value |
|
|
<gf-value |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
@ -55,7 +61,7 @@ |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
[locale]="data.locale" |
|
|
[locale]="data.locale" |
|
|
[precision]="2" |
|
|
[precision]="2" |
|
|
[value]="data.settings.thresholdMin" |
|
|
[value]="settingsForm.get('thresholdMin').value" |
|
|
/> |
|
|
/> |
|
|
</h6> |
|
|
</h6> |
|
|
<div class="align-items-center d-flex w-100"> |
|
|
<div class="align-items-center d-flex w-100"> |
|
|
@ -72,7 +78,7 @@ |
|
|
[min]="data.rule.configuration.threshold.min" |
|
|
[min]="data.rule.configuration.threshold.min" |
|
|
[step]="data.rule.configuration.threshold.step" |
|
|
[step]="data.rule.configuration.threshold.step" |
|
|
> |
|
|
> |
|
|
<input matSliderThumb [(ngModel)]="data.settings.thresholdMin" /> |
|
|
<input formControlName="thresholdMin" matSliderThumb /> |
|
|
</mat-slider> |
|
|
</mat-slider> |
|
|
<gf-value |
|
|
<gf-value |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
@ -90,7 +96,7 @@ |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
[locale]="data.locale" |
|
|
[locale]="data.locale" |
|
|
[precision]="2" |
|
|
[precision]="2" |
|
|
[value]="data.settings.thresholdMax" |
|
|
[value]="settingsForm.get('thresholdMax').value" |
|
|
/> |
|
|
/> |
|
|
</h6> |
|
|
</h6> |
|
|
<div class="align-items-center d-flex w-100"> |
|
|
<div class="align-items-center d-flex w-100"> |
|
|
@ -107,7 +113,7 @@ |
|
|
[min]="data.rule.configuration.threshold.min" |
|
|
[min]="data.rule.configuration.threshold.min" |
|
|
[step]="data.rule.configuration.threshold.step" |
|
|
[step]="data.rule.configuration.threshold.step" |
|
|
> |
|
|
> |
|
|
<input matSliderThumb [(ngModel)]="data.settings.thresholdMax" /> |
|
|
<input formControlName="thresholdMax" matSliderThumb /> |
|
|
</mat-slider> |
|
|
</mat-slider> |
|
|
<gf-value |
|
|
<gf-value |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
|
|
@ -121,12 +127,16 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div align="end" mat-dialog-actions> |
|
|
<div align="end" mat-dialog-actions> |
|
|
<button i18n mat-button (click)="dialogRef.close()">Close</button> |
|
|
<button mat-button type="button" (click)="dialogRef.close()"> |
|
|
|
|
|
<ng-container i18n>Close</ng-container> |
|
|
|
|
|
</button> |
|
|
<button |
|
|
<button |
|
|
color="primary" |
|
|
color="primary" |
|
|
mat-flat-button |
|
|
mat-flat-button |
|
|
(click)="dialogRef.close(data.settings)" |
|
|
type="submit" |
|
|
|
|
|
[disabled]="!settingsForm.dirty" |
|
|
> |
|
|
> |
|
|
<ng-container i18n>Save</ng-container> |
|
|
<ng-container i18n>Save</ng-container> |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</form> |
|
|
|