Browse Source

Merge remote-tracking branch 'upstream/lts-4.3' into rc

pull/15542/merge
Vladyslav_Prykhodko 3 months ago
parent
commit
f882faecc9
  1. 2
      ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts
  2. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/button/power-button-basic-config.component.html
  3. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/button/toggle-button-basic-config.component.html
  4. 2
      ui-ngx/src/app/modules/home/components/widget/config/basic/cards/aggregated-value-card-basic-config.component.html
  5. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/cards/label-value-card-basic-config.component.html
  6. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/cards/progress-bar-basic-config.component.html
  7. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/cards/timeseries-table-basic-config.component.html
  8. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/cards/value-card-basic-config.component.html
  9. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/cards/value-chart-card-basic-config.component.html
  10. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/chart/bar-chart-with-labels-basic-config.component.html
  11. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/chart/flot-basic-config.component.html
  12. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/chart/latest-chart-basic-config.component.html
  13. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/chart/range-chart-basic-config.component.html
  14. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/chart/time-series-chart-basic-config.component.html
  15. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/entity/entities-table-basic-config.component.html
  16. 11
      ui-ngx/src/app/modules/home/components/widget/config/basic/gauge/digital-simple-gauge-basic-config.component.ts
  17. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/battery-level-basic-config.component.html
  18. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/liquid-level-card-basic-config.component.html
  19. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/signal-strength-basic-config.component.html
  20. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/map/map-basic-config.component.html
  21. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/rpc/slider-basic-config.component.html
  22. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/scada/scada-symbol-basic-config.component.html
  23. 1
      ui-ngx/src/app/modules/home/components/widget/config/basic/weather/wind-speed-direction-basic-config.component.html
  24. 2
      ui-ngx/src/app/modules/home/components/widget/lib/cards/label-value-card-widget.component.html
  25. 25
      ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.ts
  26. 1
      ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/aggregated-value-card-widget-settings.component.html
  27. 1
      ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-value-card-widget-settings.component.html
  28. 1
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/button/widget-button-appearance.component.html
  29. 1
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/count-widget-settings.component.html
  30. 1
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/indicator/status-widget-state-settings.component.html
  31. 1
      ui-ngx/src/app/modules/home/components/widget/lib/settings/control/single-switch-widget-settings.component.html
  32. 11
      ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/digital-gauge-widget-settings.component.ts
  33. 1
      ui-ngx/src/app/modules/home/components/widget/widget-config.component.html

2
ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts

@ -132,7 +132,7 @@ export class CalculatedFieldComponent extends EntityComponent<CalculatedFieldsTa
onTestScript(expression?: string): Observable<string> { onTestScript(expression?: string): Observable<string> {
return this.cfFormService.testScript( return this.cfFormService.testScript(
this.entity?.id?.id, this.entity?.id?.id,
this.entityValue, this.entityFormValue(),
this.entitiesTableConfig.getTestScriptDialog.bind(this.entitiesTableConfig), this.entitiesTableConfig.getTestScriptDialog.bind(this.entitiesTableConfig),
this.destroyRef, this.destroyRef,
expression expression

1
ui-ngx/src/app/modules/home/components/widget/config/basic/button/power-button-basic-config.component.html

@ -88,7 +88,6 @@
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
[disabled]="!powerButtonWidgetConfigForm.get('showTitle').value"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"
></tb-string-pattern-autocomplete> ></tb-string-pattern-autocomplete>

1
ui-ngx/src/app/modules/home/components/widget/config/basic/button/toggle-button-basic-config.component.html

@ -98,7 +98,6 @@
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
[disabled]="!toggleButtonWidgetConfigForm.get('showTitle').value"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"
></tb-string-pattern-autocomplete> ></tb-string-pattern-autocomplete>

2
ui-ngx/src/app/modules/home/components/widget/config/basic/cards/aggregated-value-card-basic-config.component.html

@ -45,7 +45,6 @@
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
[disabled]="!aggregatedValueCardWidgetConfigForm.get('showTitle').value"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"
></tb-string-pattern-autocomplete> ></tb-string-pattern-autocomplete>
@ -91,7 +90,6 @@
subscriptSizing="dynamic" subscriptSizing="dynamic"
[predefinedValuesButton]="true" [predefinedValuesButton]="true"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
[disabled]="!aggregatedValueCardWidgetConfigForm.get('showSubtitle').value"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="subtitle" formControlName="subtitle"
></tb-string-pattern-autocomplete> ></tb-string-pattern-autocomplete>

1
ui-ngx/src/app/modules/home/components/widget/config/basic/cards/label-value-card-basic-config.component.html

@ -46,7 +46,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!labelValueCardWidgetConfigForm.get('showLabel').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="label" formControlName="label"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/cards/progress-bar-basic-config.component.html

@ -58,7 +58,6 @@
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
[disabled]="!progressBarWidgetConfigForm.get('showTitle').value"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"
></tb-string-pattern-autocomplete> ></tb-string-pattern-autocomplete>

1
ui-ngx/src/app/modules/home/components/widget/config/basic/cards/timeseries-table-basic-config.component.html

@ -49,7 +49,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!timeseriesTableWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/cards/value-card-basic-config.component.html

@ -58,7 +58,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!valueCardWidgetConfigForm.get('showLabel').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="label" formControlName="label"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/cards/value-chart-card-basic-config.component.html

@ -56,7 +56,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!valueChartCardWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/chart/bar-chart-with-labels-basic-config.component.html

@ -54,7 +54,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!barChartWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/chart/flot-basic-config.component.html

@ -49,7 +49,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!flotWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/chart/latest-chart-basic-config.component.html

@ -55,7 +55,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!latestChartWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/chart/range-chart-basic-config.component.html

@ -38,7 +38,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!rangeChartWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/chart/time-series-chart-basic-config.component.html

@ -131,7 +131,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!timeSeriesChartWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/entity/entities-table-basic-config.component.html

@ -49,7 +49,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!entitiesTableWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

11
ui-ngx/src/app/modules/home/components/widget/config/basic/gauge/digital-simple-gauge-basic-config.component.ts

@ -30,7 +30,7 @@ import {
getTimewindowConfig, getTimewindowConfig,
setTimewindowConfig setTimewindowConfig
} from '@home/components/widget/config/timewindow-config-panel.component'; } from '@home/components/widget/config/timewindow-config-panel.component';
import { formatValue, isDefined, isUndefined } from '@core/utils'; import { formatValue, isDefined, isDefinedAndNotNull, isNumeric, isUndefined } from '@core/utils';
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { import {
convertLevelColorsSettingsToColorProcessor, convertLevelColorsSettingsToColorProcessor,
@ -189,11 +189,10 @@ export class DigitalSimpleGaugeBasicConfigComponent extends BasicWidgetConfigCom
private maxValueValidation(): ValidatorFn { private maxValueValidation(): ValidatorFn {
return (control: AbstractControl): ValidationErrors | null => { return (control: AbstractControl): ValidationErrors | null => {
const value: string = control.value; const value: number = control.value;
if (value) { const minValue = control.parent?.get('minValue').value;
if (value < control.parent?.get('minValue').value) { if (isNumeric(value) && isDefinedAndNotNull(minValue) && value < minValue) {
return {maxValue: true}; return {maxValue: true};
}
} }
return null; return null;
}; };

1
ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/battery-level-basic-config.component.html

@ -58,7 +58,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!batteryLevelWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/liquid-level-card-basic-config.component.html

@ -40,7 +40,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!levelCardWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/signal-strength-basic-config.component.html

@ -52,7 +52,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!signalStrengthWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/map/map-basic-config.component.html

@ -40,7 +40,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!mapWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/rpc/slider-basic-config.component.html

@ -81,7 +81,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!sliderWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/scada/scada-symbol-basic-config.component.html

@ -40,7 +40,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!scadaSymbolWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

1
ui-ngx/src/app/modules/home/components/widget/config/basic/weather/wind-speed-direction-basic-config.component.html

@ -100,7 +100,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!windSpeedDirectionWidgetConfigForm.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

2
ui-ngx/src/app/modules/home/components/widget/lib/cards/label-value-card-widget.component.html

@ -28,7 +28,7 @@
<div *ngIf="showLabel" [class.tb-label-value-card-label]="!settings.autoScale" [style]="labelStyle" [style.color]="labelColor.color" <div *ngIf="showLabel" [class.tb-label-value-card-label]="!settings.autoScale" [style]="labelStyle" [style.color]="labelColor.color"
[innerHTML]="label$ | async | safe:'html'"></div> [innerHTML]="label$ | async | safe:'html'"></div>
</div> </div>
<div class="tb-label-value-card-value" [style]="valueStyle" [style.color]="valueColor.color">{{ valueText }}</div> <div class="tb-label-value-card-value" [style]="valueStyle" [style.color]="valueColor.color">{{ valueText | customTranslate }}</div>
</div> </div>
</div> </div>
</div> </div>

25
ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.ts

@ -1023,15 +1023,29 @@ export class TbTimeSeriesChart {
} }
} }
private maxTickLabelHalfHeight(): number {
const axes = this.yAxisList.filter(a => a.settings.show && a.settings.showTickLabels);
if (!axes.length) {
return 0;
}
const defaultSize = defaultTimeSeriesChartYAxisSettings.tickLabelFont.size;
const maxFontSize = Math.max(...axes.map(a => a.settings.tickLabelFont?.size || defaultSize));
return Math.ceil(maxFontSize / 2);
}
private minTopOffset(): number { private minTopOffset(): number {
const showTickLabels = if (this.topPointLabels) {
!!this.yAxisList.find(yAxis => yAxis.settings.show && yAxis.settings.showTickLabels); return 25;
return (this.topPointLabels) ? 25 : }
(showTickLabels ? 10 : 5); const half = this.maxTickLabelHalfHeight();
return half ? Math.max(10, half) : 5;
} }
private minBottomOffset(): number { private minBottomOffset(): number {
return this.settings.dataZoom ? 45 : 5; const half = this.maxTickLabelHalfHeight();
const minOffset = half ? Math.max(5, half) : 5;
return this.settings.dataZoom ? Math.max(45, minOffset) : minOffset;
} }
private _onParentScroll() { private _onParentScroll() {
@ -1060,6 +1074,7 @@ export class TbTimeSeriesChart {
this.updateBarsAnimation(barItems, false); this.updateBarsAnimation(barItems, false);
} }
this.timeSeriesChart.resize(); this.timeSeriesChart.resize();
this.updateAxes();
if (this.animationEnabled()) { if (this.animationEnabled()) {
this.updateBarsAnimation(barItems, true); this.updateBarsAnimation(barItems, true);
} }

1
ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/aggregated-value-card-widget-settings.component.html

@ -33,7 +33,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
[predefinedValuesButton]="true" [predefinedValuesButton]="true"
[disabled]="!aggregatedValueCardWidgetSettingsForm.get('showSubtitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="subtitle" formControlName="subtitle"

1
ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-value-card-widget-settings.component.html

@ -33,7 +33,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
[predefinedValuesButton]="true" [predefinedValuesButton]="true"
[disabled]="!labelValueCardWidgetSettingsForm.get('showLabel').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="label" formControlName="label"

1
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/button/widget-button-appearance.component.html

@ -42,7 +42,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!appearanceFormGroup.get('showLabel').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="label" formControlName="label"

1
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/count-widget-settings.component.html

@ -48,7 +48,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!countWidgetConfigForm.get('showLabel').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="label" formControlName="label"

1
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/indicator/status-widget-state-settings.component.html

@ -26,7 +26,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!stateSettingsFormGroup.get('showLabel').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="label" formControlName="label"

1
ui-ngx/src/app/modules/home/components/widget/lib/settings/control/single-switch-widget-settings.component.html

@ -91,7 +91,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
predefinedValuesButton="true" predefinedValuesButton="true"
[disabled]="!singleSwitchWidgetSettingsForm.get('showLabel').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="label" formControlName="label"

11
ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/digital-gauge-widget-settings.component.ts

@ -37,7 +37,7 @@ import {
digitalGaugeLayoutTranslations, digitalGaugeLayoutTranslations,
DigitalGaugeType DigitalGaugeType
} from '@home/components/widget/lib/digital-gauge.models'; } from '@home/components/widget/lib/digital-gauge.models';
import { formatValue, isDefined } from '@core/utils'; import { formatValue, isDefined, isDefinedAndNotNull, isNumeric } from '@core/utils';
import { import {
ColorSettings, ColorSettings,
ColorType, ColorType,
@ -218,11 +218,10 @@ export class DigitalGaugeWidgetSettingsComponent extends WidgetSettingsComponent
private maxValueValidation(): ValidatorFn { private maxValueValidation(): ValidatorFn {
return (control: AbstractControl): ValidationErrors | null => { return (control: AbstractControl): ValidationErrors | null => {
const value: string = control.value; const value: number = control.value;
if (value) { const minValue = control.parent?.get('minValue').value;
if (value < control.parent?.get('minValue').value) { if (isNumeric(value) && isDefinedAndNotNull(minValue) && value < minValue) {
return {maxValue: true}; return {maxValue: true};
}
} }
return null; return null;
}; };

1
ui-ngx/src/app/modules/home/components/widget/widget-config.component.html

@ -51,7 +51,6 @@
brackets="curly" brackets="curly"
subscriptSizing="dynamic" subscriptSizing="dynamic"
[predefinedValuesButton]="true" [predefinedValuesButton]="true"
[disabled]="!widgetSettings.get('showTitle').value"
[predefinedValues]="predefinedValues" [predefinedValues]="predefinedValues"
placeholderText="{{ 'widget-config.set' | translate }}" placeholderText="{{ 'widget-config.set' | translate }}"
formControlName="title" formControlName="title"

Loading…
Cancel
Save