Add option to discard SCT Data Table Temperature History (#557)
Fixes #494
This commit is contained in:
@@ -54,6 +54,10 @@ export interface AppConfig {
|
||||
line_stroke?: LineStroke;
|
||||
|
||||
// Settings from Scrutiny API
|
||||
|
||||
collector?: {
|
||||
discard_sct_temp_history?: boolean
|
||||
}
|
||||
|
||||
metrics?: {
|
||||
notify_level?: MetricsNotifyLevel
|
||||
@@ -84,6 +88,10 @@ export const appConfig: AppConfig = {
|
||||
powered_on_hours_unit: 'humanize',
|
||||
|
||||
line_stroke: 'smooth',
|
||||
|
||||
collector: {
|
||||
discard_sct_temp_history : false,
|
||||
},
|
||||
|
||||
metrics: {
|
||||
notify_level: MetricsNotifyLevel.Fail,
|
||||
|
||||
+17
@@ -102,6 +102,23 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 mb-2">
|
||||
<h3 class="text-lg font-medium">Quirks</h3>
|
||||
<div class="w-full border-b mt-1"></div>
|
||||
</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"
|
||||
matTooltip="Discard historical temperature data retrieved from the SMART Command Transport (SCT) Data Table, which may be inaccurate for some drives. The current temperature is always stored."
|
||||
matTooltipPosition="right">
|
||||
<mat-label>Discard SCT Temperature History</mat-label>
|
||||
<mat-select [(ngModel)]=discardSCTTempHistory>
|
||||
<mat-option [value]=true>Enabled</mat-option>
|
||||
<mat-option [value]=false>Disabled</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-dialog-content>
|
||||
|
||||
+6
@@ -28,6 +28,7 @@ export class DashboardSettingsComponent implements OnInit {
|
||||
poweredOnHoursUnit: string;
|
||||
lineStroke: string;
|
||||
theme: string;
|
||||
discardSCTTempHistory: boolean;
|
||||
statusThreshold: number;
|
||||
statusFilterAttributes: number;
|
||||
repeatNotifications: boolean;
|
||||
@@ -57,6 +58,8 @@ export class DashboardSettingsComponent implements OnInit {
|
||||
this.lineStroke = config.line_stroke;
|
||||
this.theme = config.theme;
|
||||
|
||||
this.discardSCTTempHistory = config.collector.discard_sct_temp_history;
|
||||
|
||||
this.statusFilterAttributes = config.metrics.status_filter_attributes;
|
||||
this.statusThreshold = config.metrics.status_threshold;
|
||||
this.repeatNotifications = config.metrics.repeat_notifications;
|
||||
@@ -74,6 +77,9 @@ export class DashboardSettingsComponent implements OnInit {
|
||||
powered_on_hours_unit: this.poweredOnHoursUnit as DevicePoweredOnUnit,
|
||||
line_stroke: this.lineStroke as LineStroke,
|
||||
theme: this.theme as Theme,
|
||||
collector: {
|
||||
discard_sct_temp_history: this.discardSCTTempHistory
|
||||
},
|
||||
metrics: {
|
||||
status_filter_attributes: this.statusFilterAttributes as MetricsStatusFilterAttributes,
|
||||
status_threshold: this.statusThreshold as MetricsStatusThreshold,
|
||||
|
||||
Reference in New Issue
Block a user