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

1
ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/api-usage-widget-settings.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,

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

@ -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>

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

@ -56,6 +56,7 @@ export interface DataKeyConfigDialogData {
hideDataKeyColor?: boolean;
hideDataKeyUnits?: boolean;
hideDataKeyDecimals?: boolean;
hideDataKeyAggregation?: boolean;
supportsUnitConversion?: boolean
}

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

@ -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>

4
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/key/data-key-config.component.ts

@ -153,6 +153,10 @@ export class DataKeyConfigComponent extends PageComponent implements OnInit, Con
@coerceBoolean()
hideDataKeyDecimals = false;
@Input()
@coerceBoolean()
hideDataKeyAggregation = false;
@Input()
@coerceBoolean()
supportsUnitConversion = false;

Loading…
Cancel
Save