From 5097d7276aea992e7b3b2e437d9cdb79efe41301 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Thu, 3 Apr 2025 09:12:22 +0300 Subject: [PATCH 01/11] UI: Fixed powered by typo on the dashboard footer --- .../components/dashboard-page/dashboard-page.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html index 5fd247e072..77f882d191 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html @@ -365,7 +365,7 @@ close Date: Fri, 4 Apr 2025 09:19:20 +0300 Subject: [PATCH 02/11] UI: Color settings panel tab validation --- .../common/color-settings-panel.component.ts | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) 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 2cba44d334..13fe9b42b9 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 @@ -102,14 +102,28 @@ export class ColorSettingsPanelComponent extends PageComponent implements OnInit { type: [this.colorSettings?.type || ColorType.constant, []], color: [this.colorSettings?.color, []], - gradient: [this.colorSettings?.gradient || defaultGradient(this.minValue, this.maxValue), []], - rangeList: [this.colorSettings?.rangeList || defaultRange(), []], - colorFunction: [this.colorSettings?.colorFunction, []] + gradient: [{value: this.colorSettings?.gradient || defaultGradient(this.minValue, this.maxValue), disabled: this.colorSettings?.type !== ColorType.gradient}, []], + rangeList: [{value: this.colorSettings?.rangeList || defaultRange(), disabled: this.colorSettings?.type !== ColorType.range}, []], + colorFunction: [{value: this.colorSettings?.colorFunction, disabled: this.colorSettings?.type !== ColorType.function}, []] } ); this.colorSettingsFormGroup.get('type').valueChanges.pipe( takeUntilDestroyed(this.destroyRef) - ).subscribe(() => { + ).subscribe((type: ColorType) => { + this.colorSettingsFormGroup.get('gradient').disable({emitEvent: false}); + this.colorSettingsFormGroup.get('rangeList').disable({emitEvent: false}); + this.colorSettingsFormGroup.get('colorFunction').disable({emitEvent: false}); + switch (type) { + case ColorType.gradient: + this.colorSettingsFormGroup.get('gradient').enable({emitEvent: false}); + break; + case ColorType.range: + this.colorSettingsFormGroup.get('rangeList').enable({emitEvent: false}); + break; + case ColorType.function: + this.colorSettingsFormGroup.get('colorFunction').enable({emitEvent: false}); + break; + } setTimeout(() => {this.popover?.updatePosition();}, 0); }); } @@ -131,7 +145,7 @@ export class ColorSettingsPanelComponent extends PageComponent implements OnInit } applyColorSettings() { - const colorSettings = this.colorSettingsFormGroup.value; + const colorSettings: ColorSettings = {...this.colorSettings, ...this.colorSettingsFormGroup.value}; this.colorSettingsApplied.emit(colorSettings); } From 8c8485d7a70e8057c52e929ad80f7981f9e13004 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Fri, 4 Apr 2025 10:38:42 +0300 Subject: [PATCH 03/11] UI: tab validation for data layer colors panel --- .../data-layer-color-settings-panel.component.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/data-layer-color-settings-panel.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/data-layer-color-settings-panel.component.ts index 895fb3e782..dfb049af19 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/data-layer-color-settings-panel.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/data-layer-color-settings-panel.component.ts @@ -82,9 +82,9 @@ export class DataLayerColorSettingsPanelComponent extends PageComponent implemen { type: [this.colorSettings?.type || DataLayerColorType.constant, []], color: [this.colorSettings?.color, []], - rangeKey: [this.colorSettings?.rangeKey, [Validators.required]], - range: [this.colorSettings?.range, []], - colorFunction: [this.colorSettings?.colorFunction, []] + rangeKey: [{value: this.colorSettings?.rangeKey, disabled: this.colorSettings.type !== DataLayerColorType.range}, [Validators.required]], + range: [{value: this.colorSettings?.range, disabled: this.colorSettings.type !== DataLayerColorType.range}, []], + colorFunction: [{value: this.colorSettings?.colorFunction, disabled: this.colorSettings.type !== DataLayerColorType.function}, []] } ); this.colorSettingsFormGroup.get('type').valueChanges.pipe( @@ -101,7 +101,7 @@ export class DataLayerColorSettingsPanelComponent extends PageComponent implemen } applyColorSettings() { - const colorSettings: DataLayerColorSettings = this.colorSettingsFormGroup.value; + const colorSettings: DataLayerColorSettings = {...this.colorSettings ,...this.colorSettingsFormGroup.value}; this.colorSettingsApplied.emit(colorSettings); } @@ -122,8 +122,15 @@ export class DataLayerColorSettingsPanelComponent extends PageComponent implemen const type: DataLayerColorType = this.colorSettingsFormGroup.get('type').value; if (type === DataLayerColorType.range) { this.colorSettingsFormGroup.get('rangeKey').enable({emitEvent: false}); + this.colorSettingsFormGroup.get('range').enable({emitEvent: false}); } else { this.colorSettingsFormGroup.get('rangeKey').disable({emitEvent: false}); + this.colorSettingsFormGroup.get('range').disable({emitEvent: false}); + } + if (type === DataLayerColorType.function) { + this.colorSettingsFormGroup.get('colorFunction').enable({emitEvent: false}); + } else { + this.colorSettingsFormGroup.get('colorFunction').disable({emitEvent: false}); } } } From 3c50ab1d5e263286ad9ad4a7a726fc41c97edb4c Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Fri, 4 Apr 2025 11:16:36 +0300 Subject: [PATCH 04/11] UI: Refactoring --- .../common/color-settings-panel.component.ts | 44 +++++++++++-------- ...ta-layer-color-settings-panel.component.ts | 8 ++-- 2 files changed, 29 insertions(+), 23 deletions(-) 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 13fe9b42b9..63d73bf578 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 @@ -102,30 +102,36 @@ export class ColorSettingsPanelComponent extends PageComponent implements OnInit { type: [this.colorSettings?.type || ColorType.constant, []], color: [this.colorSettings?.color, []], - gradient: [{value: this.colorSettings?.gradient || defaultGradient(this.minValue, this.maxValue), disabled: this.colorSettings?.type !== ColorType.gradient}, []], - rangeList: [{value: this.colorSettings?.rangeList || defaultRange(), disabled: this.colorSettings?.type !== ColorType.range}, []], - colorFunction: [{value: this.colorSettings?.colorFunction, disabled: this.colorSettings?.type !== ColorType.function}, []] + gradient: [this.colorSettings?.gradient || defaultGradient(this.minValue, this.maxValue), []], + rangeList: [this.colorSettings?.rangeList || defaultRange(), []], + colorFunction: [this.colorSettings?.colorFunction, []] } ); this.colorSettingsFormGroup.get('type').valueChanges.pipe( takeUntilDestroyed(this.destroyRef) - ).subscribe((type: ColorType) => { - this.colorSettingsFormGroup.get('gradient').disable({emitEvent: false}); - this.colorSettingsFormGroup.get('rangeList').disable({emitEvent: false}); - this.colorSettingsFormGroup.get('colorFunction').disable({emitEvent: false}); - switch (type) { - case ColorType.gradient: - this.colorSettingsFormGroup.get('gradient').enable({emitEvent: false}); - break; - case ColorType.range: - this.colorSettingsFormGroup.get('rangeList').enable({emitEvent: false}); - break; - case ColorType.function: - this.colorSettingsFormGroup.get('colorFunction').enable({emitEvent: false}); - break; - } + ).subscribe(() => { + this.updateValidators(); setTimeout(() => {this.popover?.updatePosition();}, 0); }); + this.updateValidators(); + } + + updateValidators() { + const type: ColorType = this.colorSettingsFormGroup.get('type').value; + this.colorSettingsFormGroup.get('gradient').disable({emitEvent: false}); + this.colorSettingsFormGroup.get('rangeList').disable({emitEvent: false}); + this.colorSettingsFormGroup.get('colorFunction').disable({emitEvent: false}); + switch (type) { + case ColorType.gradient: + this.colorSettingsFormGroup.get('gradient').enable({emitEvent: false}); + break; + case ColorType.range: + this.colorSettingsFormGroup.get('rangeList').enable({emitEvent: false}); + break; + case ColorType.function: + this.colorSettingsFormGroup.get('colorFunction').enable({emitEvent: false}); + break; + } } copyColorSettings(comp: ColorSettingsComponent) { @@ -145,7 +151,7 @@ export class ColorSettingsPanelComponent extends PageComponent implements OnInit } applyColorSettings() { - const colorSettings: ColorSettings = {...this.colorSettings, ...this.colorSettingsFormGroup.value}; + const colorSettings: ColorSettings = this.colorSettingsFormGroup.getRawValue(); this.colorSettingsApplied.emit(colorSettings); } diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/data-layer-color-settings-panel.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/data-layer-color-settings-panel.component.ts index dfb049af19..f083b00723 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/data-layer-color-settings-panel.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/data-layer-color-settings-panel.component.ts @@ -82,9 +82,9 @@ export class DataLayerColorSettingsPanelComponent extends PageComponent implemen { type: [this.colorSettings?.type || DataLayerColorType.constant, []], color: [this.colorSettings?.color, []], - rangeKey: [{value: this.colorSettings?.rangeKey, disabled: this.colorSettings.type !== DataLayerColorType.range}, [Validators.required]], - range: [{value: this.colorSettings?.range, disabled: this.colorSettings.type !== DataLayerColorType.range}, []], - colorFunction: [{value: this.colorSettings?.colorFunction, disabled: this.colorSettings.type !== DataLayerColorType.function}, []] + rangeKey: [this.colorSettings?.rangeKey, [Validators.required]], + range: [this.colorSettings?.range, []], + colorFunction: [this.colorSettings?.colorFunction, []] } ); this.colorSettingsFormGroup.get('type').valueChanges.pipe( @@ -101,7 +101,7 @@ export class DataLayerColorSettingsPanelComponent extends PageComponent implemen } applyColorSettings() { - const colorSettings: DataLayerColorSettings = {...this.colorSettings ,...this.colorSettingsFormGroup.value}; + const colorSettings: DataLayerColorSettings = this.colorSettingsFormGroup.getRawValue(); this.colorSettingsApplied.emit(colorSettings); } From d293887c58fb59594375a468c5ddea7fc730301c Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Fri, 4 Apr 2025 12:24:23 +0300 Subject: [PATCH 05/11] UI: Fixed enter press trigger click handler in integration dialig --- .../entity/debug/entity-debug-settings-button.component.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-button.component.html b/ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-button.component.html index 4243044fc8..f79abfe904 100644 --- a/ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-button.component.html +++ b/ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-button.component.html @@ -16,6 +16,7 @@ --> diff --git a/ui-ngx/src/app/modules/home/components/event/event-table-config.ts b/ui-ngx/src/app/modules/home/components/event/event-table-config.ts index 5d770fed3b..a00d07122e 100644 --- a/ui-ngx/src/app/modules/home/components/event/event-table-config.ts +++ b/ui-ngx/src/app/modules/home/components/event/event-table-config.ts @@ -462,7 +462,7 @@ export class EventTableConfig extends EntityTableConfig { break; case DebugEventType.DEBUG_CALCULATED_FIELD: this.cellActionDescriptors.push({ - name: this.translate.instant('common.test-with-this-message', {test: this.translate.instant(this.testButtonLabel)}), + name: this.translate.instant('calculated-fields.test-with-this-message'), icon: 'bug_report', isEnabled: () => true, onAction: (_, entity) => this.debugEventSelected.next(entity.body) 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 ec047f91ae..be8b95e6c3 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -1059,6 +1059,7 @@ "delete-text": "Be careful, after the confirmation the calculated field and all related data will become unrecoverable.", "delete-multiple-title": "Are you sure you want to delete { count, plural, =1 {1 calculated field} other {# calculated fields} }?", "delete-multiple-text": "Be careful, after the confirmation all selected calculated fields will be removed and all related data will become unrecoverable.", + "test-with-this-message": "Test with this message", "hint": { "arguments-simple-with-rolling": "Simple type calculated field should not contain keys with time series rolling type.", "arguments-empty": "Arguments should not be empty.", @@ -1121,8 +1122,6 @@ "documentation": "Documentation", "time-left": "{{time}} left", "output": "Output", - "test-function": "Test function", - "test-with-this-message": "{{test}} with this message", "suffix": { "s": "s", "ms": "ms" From 81a0505ef6519108bf0f2929738fccc2e4308052 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Mon, 7 Apr 2025 15:52:13 +0300 Subject: [PATCH 08/11] fixed name for User --- .../server/common/data/edqs/fields/UserFields.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/UserFields.java b/common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/UserFields.java index 9863506ed4..6f4c7643c0 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/UserFields.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/UserFields.java @@ -35,6 +35,11 @@ public class UserFields extends AbstractEntityFields { private String phone; private String additionalInfo; + @Override + public String getName() { + return super.getEmail(); + } + public UserFields(UUID id, long createdTime, UUID tenantId, UUID customerId, Long version, String firstName, String lastName, String email, String phone, JsonNode additionalInfo) { From 2a3562ef2905ca942404192150a54eab6caf15b4 Mon Sep 17 00:00:00 2001 From: Vladyslav Prykhodko Date: Mon, 7 Apr 2025 20:33:48 +0300 Subject: [PATCH 09/11] UI: Updated default value maxDebugModeDurationMinutes in tenant profile --- ui-ngx/src/app/shared/models/tenant.model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/models/tenant.model.ts b/ui-ngx/src/app/shared/models/tenant.model.ts index 23896141db..8866b54574 100644 --- a/ui-ngx/src/app/shared/models/tenant.model.ts +++ b/ui-ngx/src/app/shared/models/tenant.model.ts @@ -137,7 +137,7 @@ export function createTenantProfileConfiguration(type: TenantProfileType): Tenan maxSms: 0, smsEnabled: true, maxCreatedAlarms: 0, - maxDebugModeDurationMinutes: 0, + maxDebugModeDurationMinutes: 15, tenantServerRestLimitsConfiguration: '', customerServerRestLimitsConfiguration: '', maxWsSessionsPerTenant: 0, From 703cec8066c9585bef5a13e823df13b160296757 Mon Sep 17 00:00:00 2001 From: Vladyslav Prykhodko Date: Mon, 7 Apr 2025 20:59:46 +0300 Subject: [PATCH 10/11] UI: Fixed import file dialog when long file name --- .../import-dialog.component.html | 50 +++++++++---------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/ui-ngx/src/app/shared/import-export/import-dialog.component.html b/ui-ngx/src/app/shared/import-export/import-dialog.component.html index ff775fc555..5d354abae8 100644 --- a/ui-ngx/src/app/shared/import-export/import-dialog.component.html +++ b/ui-ngx/src/app/shared/import-export/import-dialog.component.html @@ -28,32 +28,30 @@
-
-
- - {{ importFileLabel | translate }} - {{ importContentLabel | translate }} - - - - - -
-
+
+ + {{ importFileLabel | translate }} + {{ importContentLabel | translate }} + + + + + +