From 692780b710b96cefe77ae8e2c36916ae0cceb034 Mon Sep 17 00:00:00 2001 From: Amandee Ellawala Date: Thu, 14 Nov 2024 02:39:25 +0000 Subject: [PATCH] Implement range slider in rule settings dialog --- .../rule-settings-dialog.html | 174 +++++++++++------- 1 file changed, 112 insertions(+), 62 deletions(-) diff --git a/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.html b/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.html index 8806dae6a..3c353146e 100644 --- a/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.html +++ b/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.html @@ -1,76 +1,126 @@
{{ data.rule.name }}
-
-
- Threshold Min: + @if ( + data.rule.configuration.thresholdMin && data.rule.configuration.thresholdMax + ) { +
+
+ Threshold: + @if (data.rule.configuration.threshold.unit === '%') { + {{ data.settings.thresholdMin | percent: '1.2-2' }} + } @else { + {{ data.settings.thresholdMin }} + } + - + @if (data.rule.configuration.threshold.unit === '%') { + {{ data.settings.thresholdMax | percent: '1.2-2' }} + } @else { + {{ data.settings.thresholdMax }} + } +
+ @if (data.rule.configuration.threshold.unit === '%') { + + } @else { + + } + + + + @if (data.rule.configuration.threshold.unit === '%') { - {{ data.settings.thresholdMin | percent: '1.2-2' }} + } @else { - {{ data.settings.thresholdMin }} + } -
- @if (data.rule.configuration.threshold.unit === '%') { - - } @else { - - } - + } @else { +
- - - @if (data.rule.configuration.threshold.unit === '%') { - - } @else { - - } -
-
-
- Threshold Max: +
+ Threshold Min: + @if (data.rule.configuration.threshold.unit === '%') { + {{ data.settings.thresholdMin | percent: '1.2-2' }} + } @else { + {{ data.settings.thresholdMin }} + } +
@if (data.rule.configuration.threshold.unit === '%') { - {{ data.settings.thresholdMax | percent: '1.2-2' }} + } @else { - {{ data.settings.thresholdMax }} + } - - @if (data.rule.configuration.threshold.unit === '%') { - - } @else { - - } - + + + @if (data.rule.configuration.threshold.unit === '%') { + + } @else { + + } +
+
- - - @if (data.rule.configuration.threshold.unit === '%') { - - } @else { - - } -
+
+ Threshold Max: + @if (data.rule.configuration.threshold.unit === '%') { + {{ data.settings.thresholdMax | percent: '1.2-2' }} + } @else { + {{ data.settings.thresholdMax }} + } +
+ @if (data.rule.configuration.threshold.unit === '%') { + + } @else { + + } + + + + @if (data.rule.configuration.threshold.unit === '%') { + + } @else { + + } +
+ }