+
-
-
-
+
-
-
-
-
-
-
-
- widget-config.icon-size
-
-
-
-
-
-
-
- {{ 'widget-config.display-title' | translate }}
-
-
- {{ 'widget-config.drop-shadow' | translate }}
-
-
- {{ 'widget-config.enable-fullscreen' | translate }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- widget-config.units
-
-
-
- widget-config.decimals
-
-
-
-
-
- {{ 'widget-config.display-legend' | translate }}
-
-
-
-
-
diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-config.component.scss b/ui-ngx/src/app/modules/home/components/widget/widget-config.component.scss
index 6e1e1cabdf..8d8cd742c6 100644
--- a/ui-ngx/src/app/modules/home/components/widget/widget-config.component.scss
+++ b/ui-ngx/src/app/modules/home/components/widget/widget-config.component.scss
@@ -17,9 +17,6 @@
:host {
.tb-widget-config {
- .tb-advanced-widget-config {
- height: 100%;
- }
.tb-advanced-widget-config {
height: 100%;
}
@@ -69,6 +66,28 @@
padding-left: 8px;
}
}
+ .fields-group {
+ padding: 0 16px 8px;
+ margin-bottom: 10px;
+ border: 1px groove rgba(0, 0, 0, .25);
+ border-radius: 4px;
+ legend {
+ color: rgba(0, 0, 0, .7);
+ width: fit-content;
+ }
+ }
+ .fields-group-slider {
+ padding: 0;
+ legend {
+ margin-left: 16px;
+ }
+ .tb-settings {
+ padding: 0 16px 8px;
+ }
+ }
+ .tb-widget-style {
+ margin-top: 16px;
+ }
}
}
@@ -94,6 +113,36 @@
white-space: normal;
}
.mat-expansion-panel {
+ &.tb-settings {
+ box-shadow: none;
+ .mat-content {
+ overflow: visible;
+ }
+ .mat-expansion-panel-header {
+ padding: 0;
+ &:hover {
+ background: none;
+ }
+ .mat-expansion-indicator {
+ padding: 2px;
+ }
+ }
+ .mat-expansion-panel-header-description {
+ align-items: center;
+ }
+ .mat-expansion-panel-body{
+ padding: 0;
+ }
+ .tb-json-object-panel {
+ margin: 0 0 8px;
+ }
+ .mat-checkbox-layout {
+ margin: 5px 0;
+ }
+ .mat-checkbox-inner-container {
+ margin-right: 12px;
+ }
+ }
&.tb-datasources {
&.mat-expanded {
overflow: visible;
@@ -152,5 +201,8 @@
}
}
}
+ .mat-slide-toggle-content {
+ white-space: normal;
+ }
}
}
diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-config.component.ts b/ui-ngx/src/app/modules/home/components/widget/widget-config.component.ts
index 7351f9985a..48ed4bf700 100644
--- a/ui-ngx/src/app/modules/home/components/widget/widget-config.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/widget-config.component.ts
@@ -212,11 +212,28 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont
showLegend: [null, []],
legendConfig: [null, []]
});
+ this.widgetSettings.get('showTitle').valueChanges.subscribe((value: boolean) => {
+ if (value) {
+ this.widgetSettings.get('titleStyle').enable({emitEvent: false});
+ this.widgetSettings.get('titleTooltip').enable({emitEvent: false});
+ this.widgetSettings.get('showTitleIcon').enable({emitEvent: false});
+ } else {
+ this.widgetSettings.get('titleStyle').disable({emitEvent: false});
+ this.widgetSettings.get('titleTooltip').disable({emitEvent: false});
+ this.widgetSettings.get('showTitleIcon').patchValue(false);
+ this.widgetSettings.get('showTitleIcon').disable({emitEvent: false});
+ }
+ });
+
this.widgetSettings.get('showTitleIcon').valueChanges.subscribe((value: boolean) => {
if (value) {
this.widgetSettings.get('titleIcon').enable({emitEvent: false});
+ this.widgetSettings.get('iconColor').enable({emitEvent: false});
+ this.widgetSettings.get('iconSize').enable({emitEvent: false});
} else {
this.widgetSettings.get('titleIcon').disable({emitEvent: false});
+ this.widgetSettings.get('iconColor').disable({emitEvent: false});
+ this.widgetSettings.get('iconSize').disable({emitEvent: false});
}
});
this.widgetSettings.get('showLegend').valueChanges.subscribe((value: boolean) => {
@@ -236,6 +253,10 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont
});
}
+ ngOnDestroy(): void {
+ this.removeChangeSubscriptions();
+ }
+
private removeChangeSubscriptions() {
if (this.dataSettingsChangesSubscription) {
this.dataSettingsChangesSubscription.unsubscribe();
@@ -376,7 +397,7 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont
iconColor: isDefined(config.iconColor) ? config.iconColor : 'rgba(0, 0, 0, 0.87)',
iconSize: isDefined(config.iconSize) ? config.iconSize : '24px',
titleTooltip: isDefined(config.titleTooltip) ? config.titleTooltip : '',
- showTitle: config.showTitle,
+ showTitle: isDefined(config.showTitle) ? config.showTitle : false,
dropShadow: isDefined(config.dropShadow) ? config.dropShadow : true,
enableFullscreen: isDefined(config.enableFullscreen) ? config.enableFullscreen : true,
backgroundColor: config.backgroundColor,
@@ -396,11 +417,25 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont
},
{emitEvent: false}
);
+ const showTitle: boolean = this.widgetSettings.get('showTitle').value;
+ if (showTitle) {
+ this.widgetSettings.get('titleTooltip').enable({emitEvent: false});
+ this.widgetSettings.get('titleStyle').enable({emitEvent: false});
+ this.widgetSettings.get('showTitleIcon').enable({emitEvent: false});
+ } else {
+ this.widgetSettings.get('titleTooltip').disable({emitEvent: false});
+ this.widgetSettings.get('titleStyle').disable({emitEvent: false});
+ this.widgetSettings.get('showTitleIcon').disable({emitEvent: false});
+ }
const showTitleIcon: boolean = this.widgetSettings.get('showTitleIcon').value;
if (showTitleIcon) {
this.widgetSettings.get('titleIcon').enable({emitEvent: false});
+ this.widgetSettings.get('iconColor').enable({emitEvent: false});
+ this.widgetSettings.get('iconSize').enable({emitEvent: false});
} else {
this.widgetSettings.get('titleIcon').disable({emitEvent: false});
+ this.widgetSettings.get('iconColor').disable({emitEvent: false});
+ this.widgetSettings.get('iconSize').disable({emitEvent: false});
}
const showLegend: boolean = this.widgetSettings.get('showLegend').value;
if (showLegend) {
diff --git a/ui-ngx/src/app/shared/components/material-icon-select.component.ts b/ui-ngx/src/app/shared/components/material-icon-select.component.ts
index 5878751ac9..12f7e3f11f 100644
--- a/ui-ngx/src/app/shared/components/material-icon-select.component.ts
+++ b/ui-ngx/src/app/shared/components/material-icon-select.component.ts
@@ -92,14 +92,16 @@ export class MaterialIconSelectComponent extends PageComponent implements OnInit
}
openIconDialog() {
- this.dialogs.materialIconPicker(this.materialIconFormGroup.get('icon').value).subscribe(
- (icon) => {
- if (icon) {
- this.materialIconFormGroup.patchValue(
- {icon}, {emitEvent: true}
- );
+ if (!this.disabled) {
+ this.dialogs.materialIconPicker(this.materialIconFormGroup.get('icon').value).subscribe(
+ (icon) => {
+ if (icon) {
+ this.materialIconFormGroup.patchValue(
+ {icon}, {emitEvent: true}
+ );
+ }
}
- }
- );
+ );
+ }
}
}
diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json
index 1a58e1b83b..ed1ae2404d 100644
--- a/ui-ngx/src/assets/locale/locale.constant-en_US.json
+++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json
@@ -3030,7 +3030,7 @@
"title": "Title",
"title-tooltip": "Title Tooltip",
"general-settings": "General settings",
- "display-title": "Display title",
+ "display-title": "Display widget title",
"drop-shadow": "Drop shadow",
"enable-fullscreen": "Enable fullscreen",
"background-color": "Background color",
@@ -3039,7 +3039,7 @@
"margin": "Margin",
"widget-style": "Widget style",
"title-style": "Title style",
- "mobile-mode-settings": "Mobile mode settings",
+ "mobile-mode-settings": "Mobile mode",
"order": "Order",
"height": "Height",
"mobile-hide": "Hide widget in mobile mode",
@@ -3048,6 +3048,7 @@
"timewindow": "Timewindow",
"use-dashboard-timewindow": "Use dashboard timewindow",
"display-timewindow": "Display timewindow",
+ "legend": "Legend",
"display-legend": "Display legend",
"datasources": "Datasources",
"maximum-datasources": "Maximum { count, plural, 1 {1 datasource is allowed.} other {# datasources are allowed} }",
@@ -3075,9 +3076,12 @@
"delete-action": "Delete action",
"delete-action-title": "Delete widget action",
"delete-action-text": "Are you sure you want delete widget action with name '{{actionName}}'?",
+ "title-icon": "Title icon",
"display-icon": "Display title icon",
"icon-color": "Icon color",
- "icon-size": "Icon size"
+ "icon-size": "Icon size",
+ "advanced-settings": "Advanced settings",
+ "data-settings": "Data settings"
},
"widget-type": {
"import": "Import widget type",
diff --git a/ui-ngx/src/assets/locale/locale.constant-ru_RU.json b/ui-ngx/src/assets/locale/locale.constant-ru_RU.json
index 35df70e300..d6fefd0e55 100644
--- a/ui-ngx/src/assets/locale/locale.constant-ru_RU.json
+++ b/ui-ngx/src/assets/locale/locale.constant-ru_RU.json
@@ -1631,7 +1631,7 @@
"advanced": "Дополнительно",
"title": "Название",
"general-settings": "Общие настройки",
- "display-title": "Показать название",
+ "display-title": "Показать название на виджете",
"drop-shadow": "Тень",
"enable-fullscreen": "Во весь экран",
"background-color": "Цвет фона",
@@ -1640,7 +1640,7 @@
"margin": "Margin",
"widget-style": "Стиль виджета",
"title-style": "Стиль названия",
- "mobile-mode-settings": "Настройки мобильного режима",
+ "mobile-mode-settings": "Мобильный режим",
"order": "Порядок",
"height": "Высота",
"units": "Специальный символ после значения",
@@ -1648,6 +1648,7 @@
"timewindow": "Временное окно",
"use-dashboard-timewindow": "Использовать временное окно дашборда",
"display-timewindow": "Показывать временное окно",
+ "legend": "Легенда",
"display-legend": "Показать легенду",
"datasources": "Источники данных",
"maximum-datasources": "Максимальной количество источников данных равно {{count}}",
@@ -1673,9 +1674,12 @@
"delete-action": "Удалить действие",
"delete-action-title": "Удалить действие виджета",
"delete-action-text": "Вы точно хотите удалить действие виджета '{{actionName}}'?",
- "display-icon": "Показывать иконку в названии",
+ "title-icon": "Иконка в названии виджета",
+ "display-icon": "Показывать иконку в названии виджета",
"icon-color": "Цвет иконки",
- "icon-size": "Размер иконки"
+ "icon-size": "Размер иконки",
+ "advanced-settings": "Расширенные настройки",
+ "data-settings": "Настройки данных"
},
"widget-type": {
"import": "Импортировать тип виджета",
diff --git a/ui-ngx/src/assets/locale/locale.constant-uk_UA.json b/ui-ngx/src/assets/locale/locale.constant-uk_UA.json
index 257a3519a9..0031ca2ad0 100644
--- a/ui-ngx/src/assets/locale/locale.constant-uk_UA.json
+++ b/ui-ngx/src/assets/locale/locale.constant-uk_UA.json
@@ -2202,7 +2202,7 @@
"advanced": "Додатково",
"title": "Назва",
"general-settings": "Загальні налаштування",
- "display-title": "Відобразити назву",
+ "display-title": "Відобразити назву у віджеті",
"drop-shadow": "Тінь",
"enable-fullscreen": "Увімкнути повноекранний режим",
"enable-data-export": "Увімкнути експорт даних",
@@ -2212,7 +2212,7 @@
"margin": "Границі",
"widget-style": "Стиль віджетів",
"title-style": "Стиль заголовка",
- "mobile-mode-settings": "Налаштування мобільного режиму",
+ "mobile-mode-settings": "мобільний режим",
"order": "Порядок",
"height": "Висота",
"units": "Спеціальний символ після значення",
@@ -2220,6 +2220,7 @@
"timewindow": "Вікно часу",
"use-dashboard-timewindow": "Використати вікно часу на панелі візуалізації",
"display-timewindow": "Показувати вікно часу",
+ "legend": "Легенда",
"display-legend": "Показати легенду",
"datasources": "Джерела даних",
"maximum-datasources": "Максимально { count, plural, 1 {1 дозволене джерело даних.} other {# дозволені джерела даних } }",
@@ -2245,9 +2246,12 @@
"delete-action": "Видалити дію",
"delete-action-title": "Видалити дію віджета",
"delete-action-text": "Ви впевнені, що хочете видалити дію віджета '{{actionName}}'?",
- "display-icon": "Показувати іконку у назві",
+ "title-icon": "Іконка у назві віджету",
+ "display-icon": "Показувати іконку у назві віджету",
"icon-color": "Колір іконки",
- "icon-size": "Розмір іконки"
+ "icon-size": "Розмір іконки",
+ "advanced-settings": "Розширені налаштування",
+ "data-settings": "Налаштування даних"
},
"widget-type": {
"import": "Імпортувати тип віджета",