Feature/add sliders to customize x-ray rules (#3922)

* Add sliders to customize X-ray rules

* Update changelog
pull/3925/head
vitalymatyushik 1 month ago committed by GitHub
parent a14c10bad2
commit 662bfb647e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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

@ -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,

@ -1,32 +1,46 @@
<div mat-dialog-title>{{ data.rule.name }}</div>
<div class="py-3" mat-dialog-content>
<mat-form-field
appearance="outline"
<div
class="w-100"
[ngClass]="{ 'd-none': !data.rule.configuration.thresholdMin }"
>
<mat-label i18n>Threshold Min</mat-label>
<input
matInput
<h6 class="mb-0">
<ng-container i18n>Threshold Min</ng-container> ({{
data.settings.thresholdMin?.toFixed(2)
}})
</h6>
<label>{{ data.rule.configuration.threshold.min.toFixed(2) }}</label>
<mat-slider
name="thresholdMin"
type="number"
[(ngModel)]="data.settings.thresholdMin"
/>
</mat-form-field>
<mat-form-field
appearance="outline"
[max]="data.rule.configuration.threshold.max"
[min]="data.rule.configuration.threshold.min"
[step]="data.rule.configuration.threshold.step"
>
<input matSliderThumb [(ngModel)]="data.settings.thresholdMin" />
</mat-slider>
<label>{{ data.rule.configuration.threshold.max.toFixed(2) }}</label>
</div>
<div
class="w-100"
[ngClass]="{ 'd-none': !data.rule.configuration.thresholdMax }"
>
<mat-label i18n>Threshold Max</mat-label>
<input
matInput
<h6 class="mb-0">
<ng-container i18n>Threshold Max</ng-container> ({{
data.settings.thresholdMax?.toFixed(2)
}})
</h6>
<label>{{ data.rule.configuration.threshold.min.toFixed(2) }}</label>
<mat-slider
name="thresholdMax"
type="number"
[(ngModel)]="data.settings.thresholdMax"
/>
</mat-form-field>
[max]="data.rule.configuration.threshold.max"
[min]="data.rule.configuration.threshold.min"
[step]="data.rule.configuration.threshold.step"
>
<input matSliderThumb [(ngModel)]="data.settings.thresholdMax" />
</mat-slider>
<label>{{ data.rule.configuration.threshold.max.toFixed(2) }}</label>
</div>
</div>
<div align="end" mat-dialog-actions>

Loading…
Cancel
Save