From 662bfb647e2a5873c53b67a3eaebe1cca0347ecf Mon Sep 17 00:00:00 2001 From: vitalymatyushik Date: Mon, 14 Oct 2024 21:38:57 +0200 Subject: [PATCH] Feature/add sliders to customize x-ray rules (#3922) * Add sliders to customize X-ray rules * Update changelog --- CHANGELOG.md | 1 + .../rule-settings-dialog.component.ts | 6 +-- .../rule-settings-dialog.html | 50 ++++++++++++------- 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 021aaa9fb..47ebfb7dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the backgrounds of the chart of the holdings tab on the home page (experimental) - Improved the labels of the chart of the holdings tab on the home page (experimental) +- Improved the usability to customize the rule thresholds in the _X-ray_ section by introducing sliders (experimental) - Refactored the rule thresholds in the _X-ray_ section (experimental) - Exposed the timeout of the portfolio snapshot computation as an environment variable (`PROCESSOR_PORTFOLIO_SNAPSHOT_COMPUTATION_TIMEOUT`) - Harmonized the processor concurrency environment variables diff --git a/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts b/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts index 0dd23ab16..7aa228776 100644 --- a/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts +++ b/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts @@ -9,8 +9,7 @@ import { MatDialogModule, MatDialogRef } from '@angular/material/dialog'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; +import { MatSliderModule } from '@angular/material/slider'; import { IRuleSettingsDialogParams } from './interfaces/interfaces'; @@ -20,8 +19,7 @@ import { IRuleSettingsDialogParams } from './interfaces/interfaces'; FormsModule, MatButtonModule, MatDialogModule, - MatFormFieldModule, - MatInputModule + MatSliderModule ], selector: 'gf-rule-settings-dialog', standalone: true, 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 0c2477b63..3ae5234e9 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,32 +1,46 @@
{{ data.rule.name }}
- - Threshold Min - + Threshold Min ({{ + data.settings.thresholdMin?.toFixed(2) + }}) + + + - - + + + +
+
- Threshold Max - + Threshold Max ({{ + data.settings.thresholdMax?.toFixed(2) + }}) + + + - + [max]="data.rule.configuration.threshold.max" + [min]="data.rule.configuration.threshold.min" + [step]="data.rule.configuration.threshold.step" + > + + + +