+
@@ -57,6 +68,7 @@
formControlName="titleIcon">
@@ -70,12 +82,14 @@
diff --git a/ui-ngx/src/app/modules/home/components/widget/config/basic/chart/flot-basic-config.component.ts b/ui-ngx/src/app/modules/home/components/widget/config/basic/chart/flot-basic-config.component.ts
index 9d3dc4f1dd..c77d0ecb76 100644
--- a/ui-ngx/src/app/modules/home/components/widget/config/basic/chart/flot-basic-config.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/config/basic/chart/flot-basic-config.component.ts
@@ -66,6 +66,8 @@ export class FlotBasicConfigComponent extends BasicWidgetConfigComponent {
series: [this.getSeries(configData.config.datasources), []],
showTitle: [configData.config.showTitle, []],
title: [configData.config.title, []],
+ titleFont: [configData.config.titleFont, []],
+ titleColor: [configData.config.titleColor, []],
showTitleIcon: [configData.config.showTitleIcon, []],
titleIcon: [configData.config.titleIcon, []],
iconColor: [configData.config.iconColor, []],
@@ -89,6 +91,8 @@ export class FlotBasicConfigComponent extends BasicWidgetConfigComponent {
this.widgetConfig.config.actions = config.actions;
this.widgetConfig.config.showTitle = config.showTitle;
this.widgetConfig.config.title = config.title;
+ this.widgetConfig.config.titleFont = config.titleFont;
+ this.widgetConfig.config.titleColor = config.titleColor;
this.widgetConfig.config.showTitleIcon = config.showTitleIcon;
this.widgetConfig.config.titleIcon = config.titleIcon;
this.widgetConfig.config.iconColor = config.iconColor;
@@ -114,6 +118,8 @@ export class FlotBasicConfigComponent extends BasicWidgetConfigComponent {
const showLegend: boolean = this.flotWidgetConfigForm.get('showLegend').value;
if (showTitle) {
this.flotWidgetConfigForm.get('title').enable();
+ this.flotWidgetConfigForm.get('titleFont').enable();
+ this.flotWidgetConfigForm.get('titleColor').enable();
this.flotWidgetConfigForm.get('showTitleIcon').enable({emitEvent: false});
if (showTitleIcon) {
this.flotWidgetConfigForm.get('titleIcon').enable();
@@ -124,6 +130,8 @@ export class FlotBasicConfigComponent extends BasicWidgetConfigComponent {
}
} else {
this.flotWidgetConfigForm.get('title').disable();
+ this.flotWidgetConfigForm.get('titleFont').disable();
+ this.flotWidgetConfigForm.get('titleColor').disable();
this.flotWidgetConfigForm.get('showTitleIcon').disable({emitEvent: false});
this.flotWidgetConfigForm.get('titleIcon').disable();
this.flotWidgetConfigForm.get('iconColor').disable();
@@ -134,6 +142,8 @@ export class FlotBasicConfigComponent extends BasicWidgetConfigComponent {
this.flotWidgetConfigForm.get('legendConfig').disable();
}
this.flotWidgetConfigForm.get('title').updateValueAndValidity({emitEvent});
+ this.flotWidgetConfigForm.get('titleFont').updateValueAndValidity({emitEvent});
+ this.flotWidgetConfigForm.get('titleColor').updateValueAndValidity({emitEvent});
this.flotWidgetConfigForm.get('showTitleIcon').updateValueAndValidity({emitEvent: false});
this.flotWidgetConfigForm.get('titleIcon').updateValueAndValidity({emitEvent});
this.flotWidgetConfigForm.get('iconColor').updateValueAndValidity({emitEvent});
diff --git a/ui-ngx/src/app/modules/home/components/widget/config/widget-config-components.module.ts b/ui-ngx/src/app/modules/home/components/widget/config/widget-config-components.module.ts
index 3777973eff..392a829955 100644
--- a/ui-ngx/src/app/modules/home/components/widget/config/widget-config-components.module.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/config/widget-config-components.module.ts
@@ -29,6 +29,7 @@ import { FilterSelectComponent } from '@home/components/filter/filter-select.com
import { WidgetSettingsModule } from '@home/components/widget/lib/settings/widget-settings.module';
import { WidgetSettingsComponent } from '@home/components/widget/config/widget-settings.component';
import { TimewindowConfigPanelComponent } from '@home/components/widget/config/timewindow-config-panel.component';
+import { WidgetSettingsCommonModule } from '@home/components/widget/lib/settings/common/widget-settings-common.module';
@NgModule({
declarations:
@@ -48,7 +49,8 @@ import { TimewindowConfigPanelComponent } from '@home/components/widget/config/t
imports: [
CommonModule,
SharedModule,
- WidgetSettingsModule
+ WidgetSettingsModule,
+ WidgetSettingsCommonModule
],
exports: [
AlarmAssigneeSelectComponent,
@@ -61,7 +63,8 @@ import { TimewindowConfigPanelComponent } from '@home/components/widget/config/t
EntityAliasSelectComponent,
FilterSelectComponent,
TimewindowConfigPanelComponent,
- WidgetSettingsComponent
+ WidgetSettingsComponent,
+ WidgetSettingsCommonModule
]
})
export class WidgetConfigComponentsModule { }
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts
index 8c08d900a3..f799ed43ff 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts
@@ -585,10 +585,13 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
$event.stopPropagation();
}
const target = $event.target || $event.srcElement || $event.currentTarget;
- const config = new OverlayConfig();
- config.backdropClass = 'cdk-overlay-transparent-backdrop';
- config.panelClass = 'tb-filter-panel';
- config.hasBackdrop = true;
+ const config = new OverlayConfig({
+ panelClass: 'tb-filter-panel',
+ backdropClass: 'cdk-overlay-transparent-backdrop',
+ hasBackdrop: true,
+ height: 'fit-content',
+ maxHeight: '75vh'
+ });
const connectedPosition: ConnectedPosition = {
originX: 'end',
originY: 'bottom',
@@ -630,7 +633,11 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
const injector = Injector.create({parent: this.viewContainerRef.injector, providers});
const componentRef = overlayRef.attach(new ComponentPortal(AlarmFilterConfigComponent,
this.viewContainerRef, injector));
+
+ const resizeWindows = this.utils.updateOverlayMaxHeigth(overlayRef, componentRef.location);
+
componentRef.onDestroy(() => {
+ resizeWindows.unsubscribe();
if (componentRef.instance.panelResult) {
const result = componentRef.instance.panelResult;
const alarmFilter = this.entityService.resolveAlarmFilter(result, false);
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/cards/value-card-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/cards/value-card-widget.component.ts
index f495581571..ac2cb62fee 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/cards/value-card-widget.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/cards/value-card-widget.component.ts
@@ -28,7 +28,7 @@ import {
iconStyle,
overlayStyle,
textStyle
-} from '@home/components/widget/config/widget-settings.models';
+} from '@shared/models/widget-settings.models';
import { valueCardDefaultSettings, ValueCardLayout, ValueCardWidgetSettings } from './value-card-widget.models';
import { WidgetComponent } from '@home/components/widget/widget.component';
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/cards/value-card-widget.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/cards/value-card-widget.models.ts
index 23d9a30329..549ba4abcd 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/cards/value-card-widget.models.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/cards/value-card-widget.models.ts
@@ -21,7 +21,7 @@ import {
constantColor,
cssUnit, DateFormatSettings,
Font, lastUpdateAgoDateFormat
-} from '@home/components/widget/config/widget-settings.models';
+} from '@shared/models/widget-settings.models';
export enum ValueCardLayout {
square = 'square',
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.scss
index 87e099d652..1edb40967c 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.scss
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.scss
@@ -92,8 +92,8 @@
}
.dot {
- height: 25px;
- width: 25px;
+ height: 12px;
+ width: 12px;
background-color: #bbb;
border-radius: 50%;
display: inline-block;
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/value-card-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/value-card-widget-settings.component.ts
index 6f76546ac1..ad50dde8d2 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/value-card-widget-settings.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/value-card-widget-settings.component.ts
@@ -30,7 +30,7 @@ import {
DateFormatProcessor,
DateFormatSettings,
getLabel
-} from '@home/components/widget/config/widget-settings.models';
+} from '@shared/models/widget-settings.models';
@Component({
selector: 'tb-value-card-widget-settings',
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/background-settings-panel.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/background-settings-panel.component.ts
index 465d3383e2..ab94b95800 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/background-settings-panel.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/background-settings-panel.component.ts
@@ -22,7 +22,7 @@ import {
BackgroundSettings,
BackgroundType,
backgroundTypeTranslations, ComponentStyle
-} from '@home/components/widget/config/widget-settings.models';
+} from '@shared/models/widget-settings.models';
import { TbPopoverComponent } from '@shared/components/popover.component';
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { Store } from '@ngrx/store';
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/background-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/background-settings.component.ts
index f8162575a3..62a2495942 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/background-settings.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/background-settings.component.ts
@@ -22,7 +22,7 @@ import {
BackgroundType,
ComponentStyle,
overlayStyle
-} from '@home/components/widget/config/widget-settings.models';
+} from '@shared/models/widget-settings.models';
import { MatButton } from '@angular/material/button';
import { TbPopoverService } from '@shared/components/popover.service';
import {
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-settings-panel.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-settings-panel.component.ts
index 2118bde6df..483674437d 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-settings-panel.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-settings-panel.component.ts
@@ -21,7 +21,7 @@ import {
ColorSettings,
ColorType,
colorTypeTranslations
-} from '@home/components/widget/config/widget-settings.models';
+} from '@shared/models/widget-settings.models';
import { TbPopoverComponent } from '@shared/components/popover.component';
import {
AbstractControl,
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-settings.component.ts
index bffad41080..6d8ad1eefe 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-settings.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-settings.component.ts
@@ -16,7 +16,7 @@
import { Component, forwardRef, Input, OnInit, Renderer2, ViewContainerRef } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
-import { ColorSettings, ColorType, ComponentStyle } from '@home/components/widget/config/widget-settings.models';
+import { ColorSettings, ColorType, ComponentStyle } from '@shared/models/widget-settings.models';
import { MatButton } from '@angular/material/button';
import { TbPopoverService } from '@shared/components/popover.service';
import {
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/css-unit-select.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/css-unit-select.component.html
index eaca1b6d40..1c00141b1d 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/css-unit-select.component.html
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/css-unit-select.component.html
@@ -16,7 +16,9 @@
-->
-
+
+
+
{{ cssUnit }}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/css-unit-select.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/css-unit-select.component.ts
index dc593e9564..3d2658dae1 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/css-unit-select.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/css-unit-select.component.ts
@@ -16,7 +16,8 @@
import { Component, forwardRef, Input, OnInit } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR, UntypedFormControl } from '@angular/forms';
-import { cssUnit, cssUnits } from '@home/components/widget/config/widget-settings.models';
+import { cssUnit, cssUnits } from '@shared/models/widget-settings.models';
+import { coerceBoolean } from '@shared/decorators/coercion';
@Component({
selector: 'tb-css-unit-select',
@@ -35,6 +36,10 @@ export class CssUnitSelectComponent implements OnInit, ControlValueAccessor {
@Input()
disabled: boolean;
+ @Input()
+ @coerceBoolean()
+ allowEmpty = false;
+
cssUnitsList = cssUnits;
cssUnitFormControl: UntypedFormControl;
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/date-format-select.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/date-format-select.component.ts
index 413111ad1e..6393a92054 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/date-format-select.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/date-format-select.component.ts
@@ -20,7 +20,7 @@ import {
compareDateFormats,
dateFormats,
DateFormatSettings
-} from '@home/components/widget/config/widget-settings.models';
+} from '@shared/models/widget-settings.models';
import { TranslateService } from '@ngx-translate/core';
import { DatePipe } from '@angular/common';
import { MatButton } from '@angular/material/button';
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/date-format-settings-panel.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/date-format-settings-panel.component.ts
index 47f54fd5d5..be120b80f6 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/date-format-settings-panel.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/date-format-settings-panel.component.ts
@@ -16,7 +16,7 @@
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
import { PageComponent } from '@shared/components/page.component';
-import { DateFormatSettings } from '@home/components/widget/config/widget-settings.models';
+import { DateFormatSettings } from '@shared/models/widget-settings.models';
import { TbPopoverComponent } from '@shared/components/popover.component';
import { UntypedFormControl, Validators } from '@angular/forms';
import { Store } from '@ngrx/store';
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/font-settings-panel.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/font-settings-panel.component.html
index 140c525ac2..36d488d766 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/font-settings-panel.component.html
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/font-settings-panel.component.html
@@ -51,7 +51,9 @@