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
parent
commit
fd27777551
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/key/data-key-config-dialog.component.html
  2. 4
      ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.ts
  3. 4
      ui-ngx/src/app/shared/components/time/timewindow-panel.component.ts
  4. 3
      ui-ngx/src/app/shared/components/time/timewindow.component.ts

2
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/key/data-key-config-dialog.component.html

@ -50,7 +50,7 @@
[hideDataKeyColor]="data.hideDataKeyColor" [hideDataKeyColor]="data.hideDataKeyColor"
[hideDataKeyUnits]="data.hideDataKeyUnits" [hideDataKeyUnits]="data.hideDataKeyUnits"
[hideDataKeyDecimals]="data.hideDataKeyDecimals" [hideDataKeyDecimals]="data.hideDataKeyDecimals"
[hideDataKeyAggregation]="data.hideDataKeyDecimals" [hideDataKeyAggregation]="data.hideDataKeyAggregation"
[supportsUnitConversion]="data.supportsUnitConversion" [supportsUnitConversion]="data.supportsUnitConversion"
formControlName="dataKey"> formControlName="dataKey">
</tb-data-key-config> </tb-data-key-config>

4
ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.ts

@ -164,7 +164,9 @@ export class TimewindowConfigDialogComponent extends PageComponent implements On
this.timewindowForm = this.fb.group({ this.timewindowForm = this.fb.group({
selectedTab: [isDefined(this.timewindow.selectedTab) ? this.timewindow.selectedTab : TimewindowType.REALTIME], selectedTab: [isDefined(this.timewindow.selectedTab) ? this.timewindow.selectedTab : TimewindowType.REALTIME],
realtime: this.fb.group({ 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 ], timewindowMs: [ isDefined(realtime?.timewindowMs) ? realtime.timewindowMs : null ],
interval: [ isDefined(realtime?.interval) ? realtime.interval : null ], interval: [ isDefined(realtime?.interval) ? realtime.interval : null ],
quickInterval: [ isDefined(realtime?.quickInterval) ? realtime.quickInterval : null ], quickInterval: [ isDefined(realtime?.quickInterval) ? realtime.quickInterval : null ],

4
ui-ngx/src/app/shared/components/time/timewindow-panel.component.ts

@ -276,7 +276,9 @@ export class TimewindowPanelComponent extends PageComponent implements OnInit, O
selectedTab: [isDefined(this.timewindow.selectedTab) ? this.timewindow.selectedTab : TimewindowType.REALTIME], selectedTab: [isDefined(this.timewindow.selectedTab) ? this.timewindow.selectedTab : TimewindowType.REALTIME],
realtime: this.fb.group({ realtime: this.fb.group({
realtimeType: [{ 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 disabled: realtime?.hideInterval
}], }],
timewindowMs: [{ timewindowMs: [{

3
ui-ngx/src/app/shared/components/time/timewindow.component.ts

@ -309,7 +309,8 @@ export class TimewindowComponent implements ControlValueAccessor, OnInit, OnChan
private onHistoryOnlyChanged(): boolean { private onHistoryOnlyChanged(): boolean {
if (this.historyOnlyValue && this.innerValue && this.innerValue.selectedTab !== TimewindowType.HISTORY) { 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(); this.updateDisplayValue();
return true; return true;
} }

Loading…
Cancel
Save