Browse Source
Merge pull request #14473 from ChantsovaEkaterina/improvement/api-usage-widget-hide-agg-option-for-keys
API Usage widget: hide aggregation option for keys
pull/14486/head
Vladyslav Prykhodko
9 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with
8 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/api-usage-widget-settings.component.ts
-
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/key/data-key-config-dialog.component.html
-
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/key/data-key-config-dialog.component.ts
-
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/key/data-key-config.component.html
-
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/key/data-key-config.component.ts
|
|
|
@ -193,6 +193,7 @@ export class ApiUsageWidgetSettingsComponent extends WidgetSettingsComponent { |
|
|
|
hideDataKeyColor: true, |
|
|
|
hideDataKeyDecimals: true, |
|
|
|
hideDataKeyUnits: true, |
|
|
|
hideDataKeyAggregation: true, |
|
|
|
widget: this.widget, |
|
|
|
dashboard: null, |
|
|
|
dataKeySettingsForm: null, |
|
|
|
|
|
|
|
@ -50,6 +50,7 @@ |
|
|
|
[hideDataKeyColor]="data.hideDataKeyColor" |
|
|
|
[hideDataKeyUnits]="data.hideDataKeyUnits" |
|
|
|
[hideDataKeyDecimals]="data.hideDataKeyDecimals" |
|
|
|
[hideDataKeyAggregation]="data.hideDataKeyDecimals" |
|
|
|
[supportsUnitConversion]="data.supportsUnitConversion" |
|
|
|
formControlName="dataKey"> |
|
|
|
</tb-data-key-config> |
|
|
|
|
|
|
|
@ -56,6 +56,7 @@ export interface DataKeyConfigDialogData { |
|
|
|
hideDataKeyColor?: boolean; |
|
|
|
hideDataKeyUnits?: boolean; |
|
|
|
hideDataKeyDecimals?: boolean; |
|
|
|
hideDataKeyAggregation?: boolean; |
|
|
|
supportsUnitConversion?: boolean |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -79,7 +79,7 @@ |
|
|
|
formControlName="funcBody"> |
|
|
|
</tb-js-func> |
|
|
|
</section> |
|
|
|
<ng-container *ngIf="widgetType === widgetTypes.latest && modelValue.type === dataKeyTypes.timeseries"> |
|
|
|
<ng-container *ngIf="!hideDataKeyAggregation && widgetType === widgetTypes.latest && modelValue.type === dataKeyTypes.timeseries"> |
|
|
|
<div class="tb-form-row column"> |
|
|
|
<div class="tb-form-row space-between no-border no-padding"> |
|
|
|
<div>{{ 'datakey.aggregation' | translate }}</div> |
|
|
|
|
|
|
|
@ -153,6 +153,10 @@ export class DataKeyConfigComponent extends PageComponent implements OnInit, Con |
|
|
|
@coerceBoolean() |
|
|
|
hideDataKeyDecimals = false; |
|
|
|
|
|
|
|
@Input() |
|
|
|
@coerceBoolean() |
|
|
|
hideDataKeyAggregation = false; |
|
|
|
|
|
|
|
@Input() |
|
|
|
@coerceBoolean() |
|
|
|
supportsUnitConversion = false; |
|
|
|
|