Browse Source
Merge pull request #14508 from ChantsovaEkaterina/bug/hide-data-key-aggregation
Improvements related to aggregation option for widget latest data keys
pull/14512/head
Vladyslav Prykhodko
9 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
9 additions and
4 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/key/data-key-config-dialog.component.html
-
ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.ts
-
ui-ngx/src/app/shared/components/time/timewindow-panel.component.ts
-
ui-ngx/src/app/shared/components/time/timewindow.component.ts
|
|
|
@ -50,7 +50,7 @@ |
|
|
|
[hideDataKeyColor]="data.hideDataKeyColor" |
|
|
|
[hideDataKeyUnits]="data.hideDataKeyUnits" |
|
|
|
[hideDataKeyDecimals]="data.hideDataKeyDecimals" |
|
|
|
[hideDataKeyAggregation]="data.hideDataKeyDecimals" |
|
|
|
[hideDataKeyAggregation]="data.hideDataKeyAggregation" |
|
|
|
[supportsUnitConversion]="data.supportsUnitConversion" |
|
|
|
formControlName="dataKey"> |
|
|
|
</tb-data-key-config> |
|
|
|
|
|
|
|
@ -164,7 +164,9 @@ export class TimewindowConfigDialogComponent extends PageComponent implements On |
|
|
|
this.timewindowForm = this.fb.group({ |
|
|
|
selectedTab: [isDefined(this.timewindow.selectedTab) ? this.timewindow.selectedTab : TimewindowType.REALTIME], |
|
|
|
realtime: this.fb.group({ |
|
|
|
realtimeType: [ isDefined(realtime?.realtimeType) ? realtime.realtimeType : RealtimeWindowType.LAST_INTERVAL ], |
|
|
|
realtimeType: [ this.quickIntervalOnly |
|
|
|
? RealtimeWindowType.INTERVAL |
|
|
|
: (isDefined(realtime?.realtimeType) ? realtime.realtimeType : RealtimeWindowType.LAST_INTERVAL) ], |
|
|
|
timewindowMs: [ isDefined(realtime?.timewindowMs) ? realtime.timewindowMs : null ], |
|
|
|
interval: [ isDefined(realtime?.interval) ? realtime.interval : null ], |
|
|
|
quickInterval: [ isDefined(realtime?.quickInterval) ? realtime.quickInterval : null ], |
|
|
|
|
|
|
|
@ -276,7 +276,9 @@ export class TimewindowPanelComponent extends PageComponent implements OnInit, O |
|
|
|
selectedTab: [isDefined(this.timewindow.selectedTab) ? this.timewindow.selectedTab : TimewindowType.REALTIME], |
|
|
|
realtime: this.fb.group({ |
|
|
|
realtimeType: [{ |
|
|
|
value: isDefined(realtime?.realtimeType) ? realtime.realtimeType : RealtimeWindowType.LAST_INTERVAL, |
|
|
|
value: this.quickIntervalOnly |
|
|
|
? RealtimeWindowType.INTERVAL |
|
|
|
: (isDefined(realtime?.realtimeType) ? realtime.realtimeType : RealtimeWindowType.LAST_INTERVAL), |
|
|
|
disabled: realtime?.hideInterval |
|
|
|
}], |
|
|
|
timewindowMs: [{ |
|
|
|
|
|
|
|
@ -309,7 +309,8 @@ export class TimewindowComponent implements ControlValueAccessor, OnInit, OnChan |
|
|
|
|
|
|
|
private onHistoryOnlyChanged(): boolean { |
|
|
|
if (this.historyOnlyValue && this.innerValue && this.innerValue.selectedTab !== TimewindowType.HISTORY) { |
|
|
|
this.innerValue.selectedTab = TimewindowType.HISTORY; |
|
|
|
this.innerValue = initModelFromDefaultTimewindow(this.innerValue, this.quickIntervalOnly, this.historyOnly, |
|
|
|
this.timeService, this.aggregation); |
|
|
|
this.updateDisplayValue(); |
|
|
|
return true; |
|
|
|
} |
|
|
|
|