feat: dynamic line stroke settings
This commit is contained in:
+11
@@ -53,6 +53,17 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col mt-5 gt-md:flex-row">
|
||||
<mat-form-field class="flex-auto gt-xs:pr-3 gt-md:pr-3">
|
||||
<mat-label>Line stroke</mat-label>
|
||||
<mat-select [(ngModel)]="lineStroke">
|
||||
<mat-option value="smooth">Smooth</mat-option>
|
||||
<mat-option value="straight">Straight</mat-option>
|
||||
<mat-option value="stepline">Stepline</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col mt-5 gt-md:flex-row">
|
||||
<mat-form-field class="flex-auto gt-xs:pr-3 gt-md:pr-3">
|
||||
<mat-label>Device Status - Thresholds</mat-label>
|
||||
|
||||
+4
@@ -6,6 +6,7 @@ import {
|
||||
MetricsStatusFilterAttributes,
|
||||
MetricsStatusThreshold,
|
||||
TemperatureUnit,
|
||||
LineStroke,
|
||||
Theme
|
||||
} from 'app/core/config/app.config';
|
||||
import {ScrutinyConfigService} from 'app/core/config/scrutiny-config.service';
|
||||
@@ -23,6 +24,7 @@ export class DashboardSettingsComponent implements OnInit {
|
||||
dashboardSort: string;
|
||||
temperatureUnit: string;
|
||||
fileSizeSIUnits: boolean;
|
||||
lineStroke: string;
|
||||
theme: string;
|
||||
statusThreshold: number;
|
||||
statusFilterAttributes: number;
|
||||
@@ -48,6 +50,7 @@ export class DashboardSettingsComponent implements OnInit {
|
||||
this.dashboardSort = config.dashboard_sort;
|
||||
this.temperatureUnit = config.temperature_unit;
|
||||
this.fileSizeSIUnits = config.file_size_si_units;
|
||||
this.lineStroke = config.line_stroke;
|
||||
this.theme = config.theme;
|
||||
|
||||
this.statusFilterAttributes = config.metrics.status_filter_attributes;
|
||||
@@ -63,6 +66,7 @@ export class DashboardSettingsComponent implements OnInit {
|
||||
dashboard_sort: this.dashboardSort as DashboardSort,
|
||||
temperature_unit: this.temperatureUnit as TemperatureUnit,
|
||||
file_size_si_units: this.fileSizeSIUnits,
|
||||
line_stroke: this.lineStroke as LineStroke,
|
||||
theme: this.theme as Theme,
|
||||
metrics: {
|
||||
status_filter_attributes: this.statusFilterAttributes as MetricsStatusFilterAttributes,
|
||||
|
||||
Reference in New Issue
Block a user