From d01201acf354bc36ea04ce9564cc690fedce0621 Mon Sep 17 00:00:00 2001 From: devaskim Date: Tue, 15 Nov 2022 21:56:59 +0500 Subject: [PATCH 01/37] Add filter duplication option. --- .../filter/filters-dialog.component.html | 9 +++++ .../filter/filters-dialog.component.ts | 34 ++++++++++++++++++- .../assets/locale/locale.constant-en_US.json | 1 + 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/filter/filters-dialog.component.html b/ui-ngx/src/app/modules/home/components/filter/filters-dialog.component.html index 25f6e57e2d..55079955a8 100644 --- a/ui-ngx/src/app/modules/home/components/filter/filters-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/filter/filters-dialog.component.html @@ -64,6 +64,15 @@ matTooltipPosition="above"> edit + -
+
device-profile.snmp.please-add-communication-config
diff --git a/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-communication-config.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-communication-config.component.ts index 6fe20f5e2f..d99d41724c 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-communication-config.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-communication-config.component.ts @@ -27,7 +27,7 @@ import { Validators } from '@angular/forms'; import { SnmpCommunicationConfig, SnmpSpecType, SnmpSpecTypeTranslationMap } from '@shared/models/device.models'; -import { Subject, Subscription } from 'rxjs'; +import { Subject } from 'rxjs'; import { isUndefinedOrNull } from '@core/utils'; import { takeUntil } from 'rxjs/operators'; @@ -58,7 +58,6 @@ export class SnmpDeviceProfileCommunicationConfigComponent implements OnInit, On disabled: boolean; private usedSpecType: SnmpSpecType[] = []; - private valueChange$: Subscription = null; private destroy$ = new Subject(); private propagateChange = (v: any) => { }; @@ -68,17 +67,17 @@ export class SnmpDeviceProfileCommunicationConfigComponent implements OnInit, On this.deviceProfileCommunicationConfig = this.fb.group({ communicationConfig: this.fb.array([]) }); + this.deviceProfileCommunicationConfig.valueChanges.pipe( + takeUntil(this.destroy$) + ).subscribe(() => this.updateModel()); } ngOnDestroy() { - if (this.valueChange$) { - this.valueChange$.unsubscribe(); - } this.destroy$.next(); this.destroy$.complete(); } - communicationConfigFormArray(): FormArray { + get communicationConfigFormArray(): FormArray { return this.deviceProfileCommunicationConfig.get('communicationConfig') as FormArray; } @@ -99,27 +98,27 @@ export class SnmpDeviceProfileCommunicationConfigComponent implements OnInit, On } writeValue(communicationConfig: SnmpCommunicationConfig[]) { - if (this.valueChange$) { - this.valueChange$.unsubscribe(); - } - const communicationConfigControl: Array = []; - if (communicationConfig) { - communicationConfig.forEach((config) => { - communicationConfigControl.push(this.createdFormGroup(config)); - }); - } - this.deviceProfileCommunicationConfig.setControl('communicationConfig', this.fb.array(communicationConfigControl)); - if (!communicationConfig || !communicationConfig.length) { - this.addCommunicationConfig(); - } - if (this.disabled) { - this.deviceProfileCommunicationConfig.disable({emitEvent: false}); + if (communicationConfig?.length === this.communicationConfigFormArray.length) { + this.communicationConfigFormArray.patchValue(communicationConfig, {emitEvent: false}); } else { - this.deviceProfileCommunicationConfig.enable({emitEvent: false}); + const communicationConfigControl: Array = []; + if (communicationConfig) { + communicationConfig.forEach((config) => { + communicationConfigControl.push(this.createdFormGroup(config)); + }); + } + this.deviceProfileCommunicationConfig.setControl( + 'communicationConfig', this.fb.array(communicationConfigControl), {emitEvent: false} + ); + if (!communicationConfig || !communicationConfig.length) { + this.addCommunicationConfig(); + } + if (this.disabled) { + this.deviceProfileCommunicationConfig.disable({emitEvent: false}); + } else { + this.deviceProfileCommunicationConfig.enable({emitEvent: false}); + } } - this.valueChange$ = this.deviceProfileCommunicationConfig.valueChanges.subscribe(() => { - this.updateModel(); - }); this.updateUsedSpecType(); if (!this.disabled && !this.deviceProfileCommunicationConfig.valid) { this.updateModel(); @@ -133,16 +132,16 @@ export class SnmpDeviceProfileCommunicationConfigComponent implements OnInit, On } public removeCommunicationConfig(index: number) { - this.communicationConfigFormArray().removeAt(index); + this.communicationConfigFormArray.removeAt(index); } get isAddEnabled(): boolean { - return this.communicationConfigFormArray().length !== Object.keys(SnmpSpecType).length; + return this.communicationConfigFormArray.length !== Object.keys(SnmpSpecType).length; } public addCommunicationConfig() { - this.communicationConfigFormArray().push(this.createdFormGroup()); + this.communicationConfigFormArray.push(this.createdFormGroup()); this.deviceProfileCommunicationConfig.updateValueAndValidity(); if (!this.deviceProfileCommunicationConfig.valid) { this.updateModel(); diff --git a/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-mapping.component.html b/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-mapping.component.html index e202370d21..0d576b91de 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-mapping.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-mapping.component.html @@ -25,7 +25,7 @@
-
@@ -67,7 +67,7 @@
-
+
device-profile.snmp.please-add-mapping-config
diff --git a/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-mapping.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-mapping.component.ts index 2b8192908b..8f74a82f55 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-mapping.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-mapping.component.ts @@ -69,6 +69,7 @@ export class SnmpDeviceProfileMappingComponent implements OnInit, OnDestroy, Con this.mappingsConfigForm = this.fb.group({ mappings: this.fb.array([]) }); + this.valueChange$ = this.mappingsConfigForm.valueChanges.subscribe(() => this.updateModel()); } ngOnDestroy() { @@ -100,38 +101,36 @@ export class SnmpDeviceProfileMappingComponent implements OnInit, OnDestroy, Con } writeValue(mappings: SnmpMapping[]) { - if (this.valueChange$) { - this.valueChange$.unsubscribe(); - } - const mappingsControl: Array = []; - if (mappings) { - mappings.forEach((config) => { - mappingsControl.push(this.createdFormGroup(config)); - }); - } - this.mappingsConfigForm.setControl('mappings', this.fb.array(mappingsControl)); - if (!mappings || !mappings.length) { - this.addMappingConfig(); - } - if (this.disabled) { - this.mappingsConfigForm.disable({emitEvent: false}); + if (mappings?.length === this.mappingsConfigFormArray.length) { + this.mappingsConfigFormArray.patchValue(mappings, {emitEvent: false}); } else { - this.mappingsConfigForm.enable({emitEvent: false}); + const mappingsControl: Array = []; + if (mappings) { + mappings.forEach((config) => { + mappingsControl.push(this.createdFormGroup(config)); + }); + } + this.mappingsConfigForm.setControl('mappings', this.fb.array(mappingsControl), {emitEvent: false}); + if (!mappings || !mappings.length) { + this.addMappingConfig(); + } + if (this.disabled) { + this.mappingsConfigForm.disable({emitEvent: false}); + } else { + this.mappingsConfigForm.enable({emitEvent: false}); + } } - this.valueChange$ = this.mappingsConfigForm.valueChanges.subscribe(() => { - this.updateModel(); - }); if (!this.disabled && !this.mappingsConfigForm.valid) { this.updateModel(); } } - mappingsConfigFormArray(): FormArray { + get mappingsConfigFormArray(): FormArray { return this.mappingsConfigForm.get('mappings') as FormArray; } public addMappingConfig() { - this.mappingsConfigFormArray().push(this.createdFormGroup()); + this.mappingsConfigFormArray.push(this.createdFormGroup()); this.mappingsConfigForm.updateValueAndValidity(); if (!this.mappingsConfigForm.valid) { this.updateModel(); @@ -139,7 +138,7 @@ export class SnmpDeviceProfileMappingComponent implements OnInit, OnDestroy, Con } public removeMappingConfig(index: number) { - this.mappingsConfigFormArray().removeAt(index); + this.mappingsConfigFormArray.removeAt(index); } private createdFormGroup(value?: SnmpMapping): FormGroup { diff --git a/ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts b/ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts index aa5325e974..1c5b110059 100644 --- a/ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts @@ -30,10 +30,11 @@ import { import { Store } from '@ngrx/store'; import { AppState } from '@app/core/core.state'; import { coerceBooleanProperty } from '@angular/cdk/coercion'; -import { Subscription } from 'rxjs'; +import { Subject } from 'rxjs'; import { QueueInfo } from '@shared/models/queue.models'; import { UtilsService } from '@core/services/utils.service'; import { guid } from '@core/utils'; +import { takeUntil } from 'rxjs/operators'; @Component({ selector: 'tb-tenant-profile-queues', @@ -70,8 +71,7 @@ export class TenantProfileQueuesComponent implements ControlValueAccessor, Valid @Input() disabled: boolean; - private valueChangeSubscription$: Subscription = null; - + private destroy$ = new Subject(); private propagateChange = (v: any) => { }; constructor(private store: Store, @@ -83,12 +83,6 @@ export class TenantProfileQueuesComponent implements ControlValueAccessor, Valid this.propagateChange = fn; } - ngOnDestroy() { - if (this.valueChangeSubscription$) { - this.valueChangeSubscription$.unsubscribe(); - } - } - registerOnTouched(fn: any): void { } @@ -96,6 +90,15 @@ export class TenantProfileQueuesComponent implements ControlValueAccessor, Valid this.tenantProfileQueuesFormGroup = this.fb.group({ queues: this.fb.array([]) }); + + this.tenantProfileQueuesFormGroup.valueChanges.pipe( + takeUntil(this.destroy$) + ).subscribe(() => this.updateModel()); + } + + ngOnDestroy() { + this.destroy$.next(); + this.destroy$.complete(); } get queuesFormArray(): FormArray { @@ -112,30 +115,28 @@ export class TenantProfileQueuesComponent implements ControlValueAccessor, Valid } writeValue(queues: Array | null): void { - if (this.valueChangeSubscription$) { - this.valueChangeSubscription$.unsubscribe(); - } - const queuesControls: Array = []; - if (queues) { - queues.forEach((queue, index) => { - if (!queue.id) { - if (!this.idMap[index]) { - this.idMap.push(guid()); - } - queue.id = this.idMap[index]; - } - queuesControls.push(this.fb.control(queue, [Validators.required])); - }); - } - this.tenantProfileQueuesFormGroup.setControl('queues', this.fb.array(queuesControls)); - if (this.disabled) { - this.tenantProfileQueuesFormGroup.disable({emitEvent: false}); + if (queues.length === this.queuesFormArray.length) { + this.queuesFormArray.patchValue(queues, {emitEvent: false}); } else { - this.tenantProfileQueuesFormGroup.enable({emitEvent: false}); + const queuesControls: Array = []; + if (queues) { + queues.forEach((queue, index) => { + if (!queue.id) { + if (!this.idMap[index]) { + this.idMap.push(guid()); + } + queue.id = this.idMap[index]; + } + queuesControls.push(this.fb.control(queue, [Validators.required])); + }); + } + this.tenantProfileQueuesFormGroup.setControl('queues', this.fb.array(queuesControls), {emitEvent: false}); + if (this.disabled) { + this.tenantProfileQueuesFormGroup.disable({emitEvent: false}); + } else { + this.tenantProfileQueuesFormGroup.enable({emitEvent: false}); + } } - this.valueChangeSubscription$ = this.tenantProfileQueuesFormGroup.valueChanges.subscribe(() => - this.updateModel() - ); } public trackByQueue(index: number, queueControl: AbstractControl) { diff --git a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.html b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.html index 1f5d6273ec..af1f663c1a 100644 --- a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.html +++ b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.html @@ -17,17 +17,17 @@ -->
-
+
relation.type entity.entity-types  
-
+
+ *ngFor="let relationFilterControl of relationFiltersFormArray.controls; let $index = index">
-
+
relation.any-relation
diff --git a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts index 911aa4fe30..a19d16c689 100644 --- a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts +++ b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts @@ -14,7 +14,7 @@ /// limitations under the License. /// -import { Component, forwardRef, Input, OnInit } from '@angular/core'; +import { Component, forwardRef, Input, OnDestroy, OnInit } from '@angular/core'; import { AbstractControl, ControlValueAccessor, @@ -28,7 +28,8 @@ import { RelationEntityTypeFilter } from '@shared/models/relation.models'; import { PageComponent } from '@shared/components/page.component'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; -import { Subscription } from 'rxjs'; +import { Subject, Subscription } from 'rxjs'; +import { takeUntil } from 'rxjs/operators'; @Component({ selector: 'tb-relation-filters', @@ -42,7 +43,7 @@ import { Subscription } from 'rxjs'; } ] }) -export class RelationFiltersComponent extends PageComponent implements ControlValueAccessor, OnInit { +export class RelationFiltersComponent extends PageComponent implements ControlValueAccessor, OnInit, OnDestroy { @Input() disabled: boolean; @@ -50,22 +51,32 @@ export class RelationFiltersComponent extends PageComponent implements ControlVa relationFiltersFormGroup: FormGroup; + private destroy$ = new Subject(); private propagateChange = null; - private valueChangeSubscription: Subscription = null; - constructor(protected store: Store, private fb: FormBuilder) { super(store); } ngOnInit(): void { - this.relationFiltersFormGroup = this.fb.group({}); - this.relationFiltersFormGroup.addControl('relationFilters', - this.fb.array([])); + this.relationFiltersFormGroup = this.fb.group({ + relationFilters: this.fb.array([]) + }); + + this.relationFiltersFormGroup.valueChanges.pipe( + takeUntil(this.destroy$) + ).subscribe(() => { + this.updateModel(); + }); } - relationFiltersFormArray(): FormArray { + ngOnDestroy() { + this.destroy$.next(); + this.destroy$.complete(); + } + + get relationFiltersFormArray(): FormArray { return this.relationFiltersFormGroup.get('relationFilters') as FormArray; } @@ -81,19 +92,17 @@ export class RelationFiltersComponent extends PageComponent implements ControlVa } writeValue(filters: Array): void { - if (this.valueChangeSubscription) { - this.valueChangeSubscription.unsubscribe(); - } - const relationFiltersControls: Array = []; - if (filters && filters.length) { - filters.forEach((filter) => { - relationFiltersControls.push(this.createRelationFilterFormGroup(filter)); - }); + if (filters?.length === this.relationFiltersFormArray.length) { + this.relationFiltersFormArray.patchValue(filters, {emitEvent: false}); + } else { + const relationFiltersControls: Array = []; + if (filters && filters.length) { + filters.forEach((filter) => { + relationFiltersControls.push(this.createRelationFilterFormGroup(filter)); + }); + } + this.relationFiltersFormGroup.setControl('relationFilters', this.fb.array(relationFiltersControls), {emitEvent: false}); } - this.relationFiltersFormGroup.setControl('relationFilters', this.fb.array(relationFiltersControls)); - this.valueChangeSubscription = this.relationFiltersFormGroup.valueChanges.subscribe(() => { - this.updateModel(); - }); } public removeFilter(index: number) { @@ -101,12 +110,11 @@ export class RelationFiltersComponent extends PageComponent implements ControlVa } public addFilter() { - const relationFiltersFormArray = this.relationFiltersFormGroup.get('relationFilters') as FormArray; const filter: RelationEntityTypeFilter = { relationType: null, entityTypes: [] }; - relationFiltersFormArray.push(this.createRelationFilterFormGroup(filter)); + this.relationFiltersFormArray.push(this.createRelationFilterFormGroup(filter)); } private createRelationFilterFormGroup(filter: RelationEntityTypeFilter): AbstractControl { diff --git a/ui-ngx/src/app/shared/components/kv-map.component.ts b/ui-ngx/src/app/shared/components/kv-map.component.ts index b32c8c2f4a..21d17a840d 100644 --- a/ui-ngx/src/app/shared/components/kv-map.component.ts +++ b/ui-ngx/src/app/shared/components/kv-map.component.ts @@ -30,7 +30,8 @@ import { import { PageComponent } from '@shared/components/page.component'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; -import { Subscription } from 'rxjs'; +import { Subject, Subscription } from 'rxjs'; +import { takeUntil } from 'rxjs/operators'; @Component({ selector: 'tb-key-val-map', @@ -63,19 +64,27 @@ export class KeyValMapComponent extends PageComponent implements ControlValueAcc kvListFormGroup: FormGroup; + private destroy$ = new Subject(); private propagateChange = null; - private valueChangeSubscription: Subscription = null; - constructor(protected store: Store, private fb: FormBuilder) { super(store); } ngOnInit(): void { - this.kvListFormGroup = this.fb.group({}); - this.kvListFormGroup.addControl('keyVals', - this.fb.array([])); + this.kvListFormGroup = this.fb.group({ + keyVals: this.fb.array([]) + }); + + this.kvListFormGroup.valueChanges.pipe( + takeUntil(this.destroy$) + ).subscribe(() => this.updateModel()); + } + + ngOnDestroy() { + this.destroy$.next(); + this.destroy$.complete(); } keyValsFormArray(): FormArray { @@ -99,9 +108,6 @@ export class KeyValMapComponent extends PageComponent implements ControlValueAcc } writeValue(keyValMap: {[key: string]: string}): void { - if (this.valueChangeSubscription) { - this.valueChangeSubscription.unsubscribe(); - } const keyValsControls: Array = []; if (keyValMap) { for (const property of Object.keys(keyValMap)) { @@ -113,10 +119,7 @@ export class KeyValMapComponent extends PageComponent implements ControlValueAcc } } } - this.kvListFormGroup.setControl('keyVals', this.fb.array(keyValsControls)); - this.valueChangeSubscription = this.kvListFormGroup.valueChanges.subscribe(() => { - this.updateModel(); - }); + this.kvListFormGroup.setControl('keyVals', this.fb.array(keyValsControls), {emitEvent: false}); if (this.disabled) { this.kvListFormGroup.disable({emitEvent: false}); } else { From 36e040d0a7735dad31b196e70e06a314e763a7bb Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Mon, 12 Dec 2022 10:31:58 +0200 Subject: [PATCH 03/37] UI: optimaze imports --- .../home/components/relation/relation-filters.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts index a19d16c689..009c2fc5f8 100644 --- a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts +++ b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts @@ -28,7 +28,7 @@ import { RelationEntityTypeFilter } from '@shared/models/relation.models'; import { PageComponent } from '@shared/components/page.component'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; -import { Subject, Subscription } from 'rxjs'; +import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; @Component({ From 46db26b845914aac90d6eec4e0e3fd8d82ad2375 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Wed, 21 Dec 2022 15:56:45 +0200 Subject: [PATCH 04/37] UI: Remove overiding color --- .../modules/home/components/widget/lib/table-widget.models.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts index b18806bce3..ca4feda8ac 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts @@ -417,9 +417,6 @@ export function constructTableCssString(widgetConfig: WidgetConfig): string { '.mat-table .mat-header-cell {\n' + 'color: ' + mdDarkSecondary + ';\n' + '}\n' + - '.mat-table .mat-header-cell .mat-sort-header-arrow {\n' + - 'color: ' + mdDarkDisabled + ';\n' + - '}\n' + '.mat-table .mat-cell, .mat-table .mat-header-cell {\n' + 'border-bottom-color: ' + mdDarkDivider + ';\n' + '}\n' + From 189ac480c9a31c6b8ef390552fe9e88c01d9cf28 Mon Sep 17 00:00:00 2001 From: devaskim Date: Wed, 11 Jan 2023 23:02:27 +0500 Subject: [PATCH 05/37] Exclude specified subtypes from autocomplete widget. --- .../entity/entity-autocomplete.component.ts | 7 ++----- .../entity-subtype-autocomplete.component.html | 2 +- .../entity-subtype-autocomplete.component.ts | 14 +++++++++++++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts index 03bc4147f9..4af8a27d40 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts +++ b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts @@ -342,12 +342,9 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit map((data) => { if (data) { if (this.excludeEntityIds && this.excludeEntityIds.length) { + const excludeEntityIdsSet = new Set(this.excludeEntityIds); const entities: Array> = []; - data.forEach((entity) => { - if (this.excludeEntityIds.indexOf(entity.id.id) === -1) { - entities.push(entity); - } - }); + data.forEach(entity => !excludeEntityIdsSet.has(entity.id.id) && entities.push(entity)); return entities; } else { return data; diff --git a/ui-ngx/src/app/shared/components/entity/entity-subtype-autocomplete.component.html b/ui-ngx/src/app/shared/components/entity/entity-subtype-autocomplete.component.html index 7af35c1300..6e0f5d30e4 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-subtype-autocomplete.component.html +++ b/ui-ngx/src/app/shared/components/entity/entity-subtype-autocomplete.component.html @@ -15,7 +15,7 @@ limitations under the License. --> - + {{ entitySubtypeText | translate }} ; + + @Input() + appearance: MatFormFieldAppearance = 'legacy'; + @ViewChild('subTypeInput', {static: true}) subTypeInput: ElementRef; selectEntitySubtypeText: string; @@ -238,9 +245,14 @@ export class EntitySubTypeAutocompleteComponent implements ControlValueAccessor, break; } if (subTypesObservable) { + const excludeSubTypesSet = new Set(this.excludeSubTypes); this.subTypes = subTypesObservable.pipe( catchError(() => of([] as Array)), - map(subTypes => subTypes.map(subType => subType.type)), + map(subTypes => { + const filteredSubTypes: Array = []; + subTypes.forEach(subType => !excludeSubTypesSet.has(subType.type) && filteredSubTypes.push(subType.type)); + return filteredSubTypes; + }), publishReplay(1), refCount() ); From c7448c60e2bfb58303d64384afaf22ec2d51bae8 Mon Sep 17 00:00:00 2001 From: devaskim Date: Tue, 31 Jan 2023 13:29:24 +0500 Subject: [PATCH 06/37] Add quarter and half year intervals to time window. --- .../src/app/shared/models/time/time.models.ts | 68 +++++++++++++++++++ .../assets/locale/locale.constant-en_US.json | 6 ++ 2 files changed, 74 insertions(+) diff --git a/ui-ngx/src/app/shared/models/time/time.models.ts b/ui-ngx/src/app/shared/models/time/time.models.ts index d657d5cda4..1a3c183c6f 100644 --- a/ui-ngx/src/app/shared/models/time/time.models.ts +++ b/ui-ngx/src/app/shared/models/time/time.models.ts @@ -140,6 +140,8 @@ export enum QuickTimeInterval { PREVIOUS_WEEK = 'PREVIOUS_WEEK', PREVIOUS_WEEK_ISO = 'PREVIOUS_WEEK_ISO', PREVIOUS_MONTH = 'PREVIOUS_MONTH', + PREVIOUS_QUARTER = 'PREVIOUS_QUARTER', + PREVIOUS_HALF_YEAR = 'PREVIOUS_HALF_YEAR', PREVIOUS_YEAR = 'PREVIOUS_YEAR', CURRENT_HOUR = 'CURRENT_HOUR', CURRENT_DAY = 'CURRENT_DAY', @@ -150,6 +152,10 @@ export enum QuickTimeInterval { CURRENT_WEEK_ISO_SO_FAR = 'CURRENT_WEEK_ISO_SO_FAR', CURRENT_MONTH = 'CURRENT_MONTH', CURRENT_MONTH_SO_FAR = 'CURRENT_MONTH_SO_FAR', + CURRENT_QUARTER = 'CURRENT_QUARTER', + CURRENT_QUARTER_SO_FAR = 'CURRENT_QUARTER_SO_FAR', + CURRENT_HALF_YEAR = 'CURRENT_HALF_YEAR', + CURRENT_HALF_YEAR_SO_FAR = 'CURRENT_HALF_YEAR_SO_FAR', CURRENT_YEAR = 'CURRENT_YEAR', CURRENT_YEAR_SO_FAR = 'CURRENT_YEAR_SO_FAR' } @@ -161,6 +167,8 @@ export const QuickTimeIntervalTranslationMap = new Map Date: Wed, 8 Feb 2023 11:06:01 +0500 Subject: [PATCH 07/37] Leave only lower bould for widget's height in mobile mode. --- .../modules/home/components/widget/widget-config.component.html | 2 +- .../modules/home/components/widget/widget-config.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html b/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html index e693108711..fbcd595651 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html @@ -508,7 +508,7 @@ widget-config.height - +
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 804417cf34..d96c909497 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 @@ -255,7 +255,7 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont }); this.layoutSettings = this.fb.group({ mobileOrder: [null, [Validators.pattern(/^-?[0-9]+$/)]], - mobileHeight: [null, [Validators.min(1), Validators.max(10), Validators.pattern(/^\d*$/)]], + mobileHeight: [null, [Validators.min(1), Validators.pattern(/^\d*$/)]], mobileHide: [false], desktopHide: [false] }); From f2088ad53bcb93dc1f888d0f0b24994d9ef1264c Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Wed, 8 Feb 2023 11:02:29 +0200 Subject: [PATCH 08/37] UI: Refactoring --- .../components/filter/filter-predicate-list.component.ts | 8 +++----- .../home/components/filter/key-filter-list.component.ts | 2 +- .../profile/alarm/create-alarm-rules.component.ts | 2 +- .../profile/alarm/device-profile-alarms.component.ts | 5 ++--- .../lwm2m/lwm2m-bootstrap-config-servers.component.ts | 2 +- .../profile/queue/tenant-profile-queues.component.ts | 2 +- .../components/relation/relation-filters.component.ts | 2 +- ui-ngx/src/app/shared/components/kv-map.component.ts | 2 +- 8 files changed, 11 insertions(+), 14 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/filter/filter-predicate-list.component.ts b/ui-ngx/src/app/modules/home/components/filter/filter-predicate-list.component.ts index dbc95aa141..78e7252a72 100644 --- a/ui-ngx/src/app/modules/home/components/filter/filter-predicate-list.component.ts +++ b/ui-ngx/src/app/modules/home/components/filter/filter-predicate-list.component.ts @@ -27,7 +27,7 @@ import { Validator, Validators } from '@angular/forms'; -import { Observable, of, Subject, Subscription } from 'rxjs'; +import { Observable, of, Subject } from 'rxjs'; import { ComplexFilterPredicateInfo, ComplexOperation, @@ -81,11 +81,9 @@ export class FilterPredicateListComponent implements ControlValueAccessor, Valid complexOperationTranslations = complexOperationTranslationMap; - private destroy$ = new Subject(); + private destroy$ = new Subject(); private propagateChange = null; - private valueChangeSubscription: Subscription = null; - constructor(private fb: UntypedFormBuilder, @Inject(COMPLEX_FILTER_PREDICATE_DIALOG_COMPONENT_TOKEN) private complexFilterPredicateDialogComponent: ComponentType, private dialog: MatDialog) { @@ -151,7 +149,7 @@ export class FilterPredicateListComponent implements ControlValueAccessor, Valid } public removePredicate(index: number) { - (this.filterListFormGroup.get('predicates') as UntypedFormArray).removeAt(index); + this.predicatesFormArray.removeAt(index); } public addPredicate(complex: boolean) { diff --git a/ui-ngx/src/app/modules/home/components/filter/key-filter-list.component.ts b/ui-ngx/src/app/modules/home/components/filter/key-filter-list.component.ts index 029eba0990..d427c275ce 100644 --- a/ui-ngx/src/app/modules/home/components/filter/key-filter-list.component.ts +++ b/ui-ngx/src/app/modules/home/components/filter/key-filter-list.component.ts @@ -76,7 +76,7 @@ export class KeyFilterListComponent implements ControlValueAccessor, Validator, keyFiltersControl: UntypedFormControl; - private destroy$ = new Subject(); + private destroy$ = new Subject(); private propagateChange = null; constructor(private fb: UntypedFormBuilder, diff --git a/ui-ngx/src/app/modules/home/components/profile/alarm/create-alarm-rules.component.ts b/ui-ngx/src/app/modules/home/components/profile/alarm/create-alarm-rules.component.ts index 0cbdb722d7..1948ca51d2 100644 --- a/ui-ngx/src/app/modules/home/components/profile/alarm/create-alarm-rules.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/alarm/create-alarm-rules.component.ts @@ -68,7 +68,7 @@ export class CreateAlarmRulesComponent implements ControlValueAccessor, OnInit, private usedSeverities: AlarmSeverity[] = []; - private destroy$ = new Subject(); + private destroy$ = new Subject(); private propagateChange = (v: any) => { }; constructor(private dialog: MatDialog, diff --git a/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarms.component.ts b/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarms.component.ts index dd496fbedd..a828040e9c 100644 --- a/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarms.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarms.component.ts @@ -72,12 +72,11 @@ export class DeviceProfileAlarmsComponent implements ControlValueAccessor, OnIni @Input() deviceProfileId: EntityId; - private destroy$ = new Subject(); + private destroy$ = new Subject(); private propagateChange = (v: any) => { }; constructor(private store: Store, - private fb: UntypedFormBuilder, - private dialog: MatDialog) { + private fb: UntypedFormBuilder) { } registerOnChange(fn: any): void { diff --git a/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-bootstrap-config-servers.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-bootstrap-config-servers.component.ts index 3220a670af..3b70918a1e 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-bootstrap-config-servers.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-bootstrap-config-servers.component.ts @@ -72,7 +72,7 @@ export class Lwm2mBootstrapConfigServersComponent implements OnInit, ControlValu } } - private destroy$ = new Subject(); + private destroy$ = new Subject(); private propagateChange = (v: any) => { }; constructor(public translate: TranslateService, diff --git a/ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts b/ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts index 7e98a4b3fd..c3ff3ccc4c 100644 --- a/ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts @@ -71,7 +71,7 @@ export class TenantProfileQueuesComponent implements ControlValueAccessor, Valid @Input() disabled: boolean; - private destroy$ = new Subject(); + private destroy$ = new Subject(); private propagateChange = (v: any) => { }; constructor(private store: Store, diff --git a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts index 255a878977..aa027c4846 100644 --- a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts +++ b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts @@ -51,7 +51,7 @@ export class RelationFiltersComponent extends PageComponent implements ControlVa relationFiltersFormGroup: UntypedFormGroup; - private destroy$ = new Subject(); + private destroy$ = new Subject(); private propagateChange = null; constructor(protected store: Store, diff --git a/ui-ngx/src/app/shared/components/kv-map.component.ts b/ui-ngx/src/app/shared/components/kv-map.component.ts index c86aa84ef0..6772214390 100644 --- a/ui-ngx/src/app/shared/components/kv-map.component.ts +++ b/ui-ngx/src/app/shared/components/kv-map.component.ts @@ -64,7 +64,7 @@ export class KeyValMapComponent extends PageComponent implements ControlValueAcc kvListFormGroup: UntypedFormGroup; - private destroy$ = new Subject(); + private destroy$ = new Subject(); private propagateChange = null; constructor(protected store: Store, From 8a02f3643cc5ae10e1a1ed52fd9ccc668a026a67 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Wed, 8 Feb 2023 15:50:57 +0200 Subject: [PATCH 09/37] UI: Refactoring value change to destroy --- .../snmp-device-profile-mapping.component.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-mapping.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-mapping.component.ts index 2f7ba0ff74..428eb6b86e 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-mapping.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-mapping.component.ts @@ -18,19 +18,20 @@ import { Component, forwardRef, Input, OnDestroy, OnInit } from '@angular/core'; import { AbstractControl, ControlValueAccessor, + NG_VALIDATORS, + NG_VALUE_ACCESSOR, UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, - NG_VALIDATORS, - NG_VALUE_ACCESSOR, ValidationErrors, Validator, Validators } from '@angular/forms'; import { SnmpMapping } from '@shared/models/device.models'; -import { Subscription } from 'rxjs'; +import { Subject } from 'rxjs'; import { DataType, DataTypeTranslationMap } from '@shared/models/constants'; import { isUndefinedOrNull } from '@core/utils'; +import { takeUntil } from 'rxjs/operators'; @Component({ selector: 'tb-snmp-device-profile-mapping', @@ -60,7 +61,7 @@ export class SnmpDeviceProfileMappingComponent implements OnInit, OnDestroy, Con private readonly oidPattern: RegExp = /^\.?([0-2])((\.0)|(\.[1-9][0-9]*))*$/; - private valueChange$: Subscription = null; + private destroy$ = new Subject(); private propagateChange = (v: any) => { }; constructor(private fb: UntypedFormBuilder) { } @@ -69,13 +70,14 @@ export class SnmpDeviceProfileMappingComponent implements OnInit, OnDestroy, Con this.mappingsConfigForm = this.fb.group({ mappings: this.fb.array([]) }); - this.valueChange$ = this.mappingsConfigForm.valueChanges.subscribe(() => this.updateModel()); + this.mappingsConfigForm.valueChanges.pipe( + takeUntil(this.destroy$) + ).subscribe(() => this.updateModel()); } ngOnDestroy() { - if (this.valueChange$) { - this.valueChange$.unsubscribe(); - } + this.destroy$.next(); + this.destroy$.complete(); } registerOnChange(fn: any) { From 2e138774ed7d13e9484bb950973911165a067626 Mon Sep 17 00:00:00 2001 From: devaskim Date: Fri, 10 Feb 2023 12:43:54 +0500 Subject: [PATCH 10/37] Add Base64 functions to Utils service. --- ui-ngx/src/app/core/services/utils.service.ts | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/core/services/utils.service.ts b/ui-ngx/src/app/core/services/utils.service.ts index 4de0bbf4c3..ee075f1db3 100644 --- a/ui-ngx/src/app/core/services/utils.service.ts +++ b/ui-ngx/src/app/core/services/utils.service.ts @@ -29,7 +29,11 @@ import { isDefined, isDefinedAndNotNull, isString, - isUndefined + isUndefined, + objToBase64, + objToBase64URI, + base64toString, + base64toObj } from '@core/utils'; import { WindowMessage } from '@shared/models/window-message.model'; import { TranslateService } from '@ngx-translate/core'; @@ -511,4 +515,21 @@ export class UtilsService { refCount() ); } + + public objToBase64(obj: any): string { + return objToBase64(obj); + } + + public base64toString(b64Encoded: string): string { + return base64toString(b64Encoded); + } + + public objToBase64URI(obj: any): string { + return objToBase64URI(obj); + } + + public base64toObj(b64Encoded: string): any { + return base64toObj(b64Encoded); + } + } From 42ade3ee3a1092e29add24b91ca2512322c51f60 Mon Sep 17 00:00:00 2001 From: Artem Babak Date: Wed, 22 Feb 2023 12:06:24 +0200 Subject: [PATCH 11/37] Digital Gauge fix in update() - change strict to loose inequality --- .../src/app/modules/home/components/widget/lib/digital-gauge.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts b/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts index 7e3bb168ae..274c78b3ce 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts @@ -406,7 +406,7 @@ export class TbCanvasDigitalGauge { filter.transform(timestamp, this.localSettings.timestampFormat); } const value = tvPair[1]; - if (value !== this.gauge.value) { + if (value != this.gauge.value) { if (!this.gauge.options.animation) { this.gauge._value = value; } From bc1d9011c640c301837a3c14f3b6fde06f8d7460 Mon Sep 17 00:00:00 2001 From: Artem Babak Date: Thu, 23 Feb 2023 11:22:46 +0200 Subject: [PATCH 12/37] Widget Horizontal Bar: add parseFloat of value in update() --- .../app/modules/home/components/widget/lib/digital-gauge.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts b/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts index 274c78b3ce..fcb90b06a4 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts @@ -405,8 +405,8 @@ export class TbCanvasDigitalGauge { (this.gauge.options as CanvasDigitalGaugeOptions).labelTimestamp = filter.transform(timestamp, this.localSettings.timestampFormat); } - const value = tvPair[1]; - if (value != this.gauge.value) { + const value = parseFloat(tvPair[1]); + if (value !== this.gauge.value) { if (!this.gauge.options.animation) { this.gauge._value = value; } From 30f822fdc957d788f5c8bfa489c7a9953a93927d Mon Sep 17 00:00:00 2001 From: Kalutka Zhenya Date: Fri, 3 Mar 2023 16:27:20 +0200 Subject: [PATCH 13/37] Added hint to the "Password / access token" input (Repository settings) --- .../home/components/vc/repository-settings.component.html | 1 + ui-ngx/src/assets/locale/locale.constant-en_US.json | 1 + 2 files changed, 2 insertions(+) diff --git a/ui-ngx/src/app/modules/home/components/vc/repository-settings.component.html b/ui-ngx/src/app/modules/home/components/vc/repository-settings.component.html index 728d190497..e49a5c65a3 100644 --- a/ui-ngx/src/app/modules/home/components/vc/repository-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/vc/repository-settings.component.html @@ -74,6 +74,7 @@ +
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 949ebd4d23..23c895b9dc 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -333,6 +333,7 @@ "authentication-settings": "Authentication settings", "auth-method": "Authentication method", "auth-method-username-password": "Password / access token", + "auth-method-username-password-hint": "GitHub users must use access tokens with write permissions to the repository.", "auth-method-private-key": "Private key", "password-access-token": "Password / access token", "change-password-access-token": "Change password / access token", From 2e807f319da5bb42055bf71013aba12298c17d5b Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Tue, 7 Mar 2023 16:03:14 +0200 Subject: [PATCH 14/37] UI: Fixed form style --- .../vc/repository-settings.component.html | 8 ++--- .../vc/repository-settings.component.scss | 3 -- ...ities-table-widget-settings.component.html | 2 +- .../cards/label-widget-label.component.html | 2 +- ...ghnut-chart-widget-settings.component.html | 2 +- .../flot-pie-widget-settings.component.html | 2 +- .../common/widget-font.component.html | 6 ++-- ...nob-control-widget-settings.component.html | 2 +- ...stent-table-widget-settings.component.html | 2 +- .../control/rpc-button-style.component.html | 2 +- ...lide-toggle-widget-settings.component.html | 2 +- ...gue-compass-widget-settings.component.html | 6 ++-- ...logue-gauge-widget-settings.component.html | 22 +++++++------- ...gital-gauge-widget-settings.component.html | 6 ++-- .../gauge/gauge-highlight.component.html | 2 +- .../settings/gpio/gpio-item.component.html | 4 +-- ...n-attribute-widget-settings.component.html | 2 +- ...e-attribute-widget-settings.component.html | 2 +- ...r-attribute-widget-settings.component.html | 2 +- ...n-attribute-widget-settings.component.html | 2 +- ...n-attribute-widget-settings.component.html | 4 +-- ...-attributes-widget-settings.component.html | 2 +- ...g-attribute-widget-settings.component.html | 2 +- .../map/common-map-settings.component.html | 6 ++-- .../marker-clustering-settings.component.html | 2 +- .../map/markers-settings.component.html | 4 +-- .../map/route-map-settings.component.html | 2 +- .../widget/widget-config.component.html | 29 +++++++++---------- .../dashboard/dashboard-form.component.html | 4 +-- .../app/shared/components/html.component.html | 2 +- .../components/image-input.component.scss | 1 + .../shared/components/js-func.component.html | 2 +- .../components/markdown-editor.component.html | 2 +- .../components/markdown-editor.component.scss | 2 +- ui-ngx/src/styles.scss | 3 +- 35 files changed, 73 insertions(+), 75 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/vc/repository-settings.component.html b/ui-ngx/src/app/modules/home/components/vc/repository-settings.component.html index 8a6c551359..08038ede7f 100644 --- a/ui-ngx/src/app/modules/home/components/vc/repository-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/vc/repository-settings.component.html @@ -41,10 +41,10 @@ admin.default-branch - - {{ 'admin.repository-read-only' | translate }} - -
+
+ + {{ 'admin.repository-read-only' | translate }} + {{ 'admin.show-merge-commits' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/vc/repository-settings.component.scss b/ui-ngx/src/app/modules/home/components/vc/repository-settings.component.scss index a45a4cbfc1..80df7d9d79 100644 --- a/ui-ngx/src/app/modules/home/components/vc/repository-settings.component.scss +++ b/ui-ngx/src/app/modules/home/components/vc/repository-settings.component.scss @@ -17,9 +17,6 @@ .mat-mdc-card.repository-settings { margin: 8px; } - .mat-mdc-checkbox { - padding-bottom: 16px; - } .fields-group { padding: 0 16px 8px; margin-bottom: 10px; diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/entities-table-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/entities-table-widget-settings.component.html index 3091ac7bc6..c0680dfeb9 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/entities-table-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/entities-table-widget-settings.component.html @@ -51,7 +51,7 @@ -
+
{{ 'widgets.table.display-entity-name' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-widget-label.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-widget-label.component.html index ff6b2f6bdc..743ecbf8bb 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-widget-label.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-widget-label.component.html @@ -47,7 +47,7 @@
widgets.label-widget.label-position -
+
widgets.label-widget.x-pos diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/doughnut-chart-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/doughnut-chart-widget-settings.component.html index c1f5a26cf1..6f56ee9ecd 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/doughnut-chart-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/doughnut-chart-widget-settings.component.html @@ -24,7 +24,7 @@
widgets.chart.border-settings -
+
widgets.chart.border-width diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/flot-pie-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/flot-pie-widget-settings.component.html index e860995acf..307a494954 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/flot-pie-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/flot-pie-widget-settings.component.html @@ -41,7 +41,7 @@
widgets.chart.stroke-settings -
+
widgets.chart.width-pixels diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/widget-font.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/widget-font.component.html index 6ec910fa08..1fa1aacd92 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/widget-font.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/widget-font.component.html @@ -16,7 +16,7 @@ -->
-
+
widgets.widget-font.font-family @@ -26,7 +26,7 @@
-
+
widgets.widget-font.font-style @@ -68,7 +68,7 @@
-
+
widgets.rpc.initial-value -
+
widgets.rpc.min-value diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/persistent-table-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/persistent-table-widget-settings.component.html index 5db8315329..34105fa0e9 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/persistent-table-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/persistent-table-widget-settings.component.html @@ -33,7 +33,7 @@
-
+
{{ 'widgets.persistent-table.display-request-details' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/rpc-button-style.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/rpc-button-style.component.html index 3e330e78ac..74e782c901 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/rpc-button-style.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/rpc-button-style.component.html @@ -24,7 +24,7 @@ {{ 'widgets.rpc.button-primary' | translate }} -
+
widgets.rpc.slide-toggle-label -
+
widgets.rpc.label-position diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/analogue-compass-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/analogue-compass-widget-settings.component.html index 0de8aabd0a..bbb7874523 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/analogue-compass-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/analogue-compass-widget-settings.component.html @@ -42,7 +42,7 @@ icon="format_color_fill" label="{{ 'widgets.gauge.major-ticks-color' | translate }}" openOnInput colorClearButton> -
+
widgets.gauge.minor-ticks-count @@ -71,7 +71,7 @@ {{ 'widgets.gauge.show-plate-border' | translate }} -
+
widgets.gauge.needle-circle-size -
+
widgets.gauge.ticks-settings -
+
widgets.gauge.min-value @@ -41,7 +41,7 @@
-
+
widgets.gauge.major-ticks-count @@ -52,7 +52,7 @@ label="{{ 'widgets.gauge.major-ticks-color' | translate }}" openOnInput colorClearButton>
-
+
widgets.gauge.minor-ticks-count @@ -127,7 +127,7 @@ widgets.gauge.value-font
-
+
-
+
widgets.gauge.needle-settings -
+
-
+
widgets.gauge.radial-gauge-settings -
+
widgets.gauge.start-ticks-angle @@ -314,7 +314,7 @@
widgets.gauge.linear-gauge-settings -
+
widgets.gauge.bar-stroke-width @@ -325,7 +325,7 @@ label="{{ 'widgets.gauge.bar-stroke-color' | translate }}" openOnInput colorClearButton>
-
+
-
+
widgets.gauge.common-settings -
+
widgets.gauge.min-value @@ -182,7 +182,7 @@
widgets.gauge.unit-title-and-timestamp-settings -
+
{{ 'widgets.gauge.show-unit-title' | translate }} @@ -191,7 +191,7 @@
-
+
{{ 'widgets.gauge.show-timestamp' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/gauge-highlight.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/gauge-highlight.component.html index d03f7dc8a1..f92edfcde5 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/gauge-highlight.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/gauge-highlight.component.html @@ -40,7 +40,7 @@
-
+
widgets.gauge.highlight-from diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/gpio/gpio-item.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/gpio/gpio-item.component.html index 472b52555c..9264b82b3e 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/gpio/gpio-item.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/gpio/gpio-item.component.html @@ -45,7 +45,7 @@
-
+
widgets.gpio.pin @@ -55,7 +55,7 @@
-
+
widgets.gpio.row diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-boolean-attribute-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-boolean-attribute-widget-settings.component.html index f23924c9be..a91f3af9a5 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-boolean-attribute-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-boolean-attribute-widget-settings.component.html @@ -28,7 +28,7 @@
widgets.input-widgets.checkbox-settings -
+
widgets.input-widgets.true-label diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-double-attribute-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-double-attribute-widget-settings.component.html index 19b695c4b1..512ccc9f8f 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-double-attribute-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-double-attribute-widget-settings.component.html @@ -21,7 +21,7 @@
widgets.input-widgets.double-field-settings -
+
widgets.input-widgets.min-value diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-integer-attribute-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-integer-attribute-widget-settings.component.html index 1ec19405bb..d5ab9c976d 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-integer-attribute-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-integer-attribute-widget-settings.component.html @@ -21,7 +21,7 @@
widgets.input-widgets.integer-field-settings -
+
widgets.input-widgets.min-value diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-json-attribute-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-json-attribute-widget-settings.component.html index a80ab4e6e9..732b98dc05 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-json-attribute-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-json-attribute-widget-settings.component.html @@ -37,7 +37,7 @@
widgets.input-widgets.attribute-settings -
+
widgets.input-widgets.widget-mode diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-location-attribute-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-location-attribute-widget-settings.component.html index 0344b51d32..f02f840645 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-location-attribute-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-location-attribute-widget-settings.component.html @@ -25,7 +25,7 @@ {{ 'widgets.input-widgets.show-result-message' | translate }} -
+
widgets.input-widgets.latitude-key-name @@ -47,7 +47,7 @@ {{ 'widgets.input-widgets.show-label' | translate }} -
+
widgets.input-widgets.latitude-label diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-multiple-attributes-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-multiple-attributes-widget-settings.component.html index f6239b3e61..9c250e5968 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-multiple-attributes-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-multiple-attributes-widget-settings.component.html @@ -45,7 +45,7 @@ {{ 'widgets.input-widgets.update-all-values' | translate }} -
+
widgets.input-widgets.save-button-label diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-string-attribute-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-string-attribute-widget-settings.component.html index 2b0f1b4599..53ea6b67c9 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-string-attribute-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/input/update-string-attribute-widget-settings.component.html @@ -21,7 +21,7 @@
widgets.input-widgets.text-field-settings -
+
widgets.input-widgets.min-length diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/common-map-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/common-map-settings.component.html index 8f9269690e..41648b5168 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/common-map-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/common-map-settings.component.html @@ -18,7 +18,7 @@
widgets.maps.common-map-settings -
+
-
+
widgets.maps.default-map-zoom-level @@ -65,7 +65,7 @@
-
+
{{ 'widgets.maps.disable-scroll-zooming' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/marker-clustering-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/marker-clustering-settings.component.html index 49dfc84c5a..403721f65c 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/marker-clustering-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/marker-clustering-settings.component.html @@ -34,7 +34,7 @@ {{ 'widgets.maps.zoom-on-cluster-click' | translate }} -
+
widgets.maps.max-cluster-zoom diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/markers-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/markers-settings.component.html index c1445a867d..2b5de971b5 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/markers-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/markers-settings.component.html @@ -18,7 +18,7 @@
widgets.maps.markers-settings -
+
widgets.maps.marker-offset-x @@ -113,7 +113,7 @@ functionTitle="{{ 'widgets.maps.tooltip-function' | translate }}" helpId="widget/lib/map/tooltip_fn"> -
+
widgets.maps.tooltip-offset-x diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/route-map-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/route-map-settings.component.html index 9e7756d092..a22ce3e37e 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/route-map-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/route-map-settings.component.html @@ -18,7 +18,7 @@
widgets.maps.route-map-settings -
+
widgets.maps.stroke-weight diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html b/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html index 0b4c433bef..aea23a4e4c 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html @@ -19,8 +19,8 @@
-
+ fxLayout.xs="column" fxLayoutGap.gt-xs="8px" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center"> +
{{ 'widget-config.use-dashboard-timewindow' | translate }} @@ -29,7 +29,7 @@
+ fxFlex.gt-xs> widget-config.timewindow
+ fxLayoutGap.gt-xs="8px"> alarm.alarm-status-list
-
+
alarm.alarm-type-list @@ -355,7 +354,7 @@ {{ 'widget-config.display-title' | translate }} -
+
widget-config.title @@ -365,12 +364,12 @@
-
+
widget-config.title-icon {{ 'widget-config.display-icon' | translate }} -
+
@@ -404,8 +403,8 @@
widget-config.widget-style -
-
+
+
-
+
widget-config.padding @@ -477,8 +476,8 @@
widget-config.mobile-mode-settings - - + + {{ 'widget-config.mobile-hide' | translate }} @@ -491,7 +490,7 @@ -
+
widget-config.order diff --git a/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.html b/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.html index 61367ab02f..3514b0d919 100644 --- a/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.html +++ b/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.html @@ -124,13 +124,13 @@
-
dashboard.mobile-app-settings
+
dashboard.mobile-app-settings
- + {{ 'dashboard.mobile-hide' | translate }} diff --git a/ui-ngx/src/app/shared/components/html.component.html b/ui-ngx/src/app/shared/components/html.component.html index e83c18ba96..07a2a7397c 100644 --- a/ui-ngx/src/app/shared/components/html.component.html +++ b/ui-ngx/src/app/shared/components/html.component.html @@ -18,7 +18,7 @@
-
+
- - - -
-
- - -
- {{ 'device-profile.device-profile-details' | translate }} -
- - device-profile.name - - - {{ 'device-profile.name-required' | translate }} - - - {{ 'device-profile.name-max-length' | translate }} - - - - - - {{'device-profile.mobile-dashboard-hint' | translate}} - - - - - {{'device-profile.default-edge-rule-chain-hint' | translate}} - - - device-profile.type - - - {{deviceProfileTypeTranslations.get(type) | translate}} - - - - {{ 'device-profile.type-required' | translate }} - - - - - - device-profile.description - - -
-
-
- -
- {{ 'device-profile.transport-configuration' | translate }} + +

device-profile.add

+ +
+ +
+ + +
+
+ + + + {{ 'device-profile.device-profile-details' | translate }} +
- device-profile.transport-type - - - {{deviceTransportTypeTranslations.get(type) | translate}} + device-profile.name + + + {{ 'device-profile.name-required' | translate }} + + + {{ 'device-profile.name-max-length' | translate }} + + + + + + {{'device-profile.mobile-dashboard-hint' | translate}} + + + + + {{'device-profile.default-edge-rule-chain-hint' | translate}} + + + device-profile.type + + + {{deviceProfileTypeTranslations.get(type) | translate}} - - {{deviceTransportTypeHints.get(transportConfigFormGroup.get('transportType').value) | translate}} - - - {{ 'device-profile.transport-type-required' | translate }} + + {{ 'device-profile.type-required' | translate }} - - - - - -
- {{'device-profile.alarm-rules-with-count' | translate: - {count: alarmRulesFormGroup.get('alarms').value ? - alarmRulesFormGroup.get('alarms').value.length : 0} }} - - -
-
- -
- {{ 'device-profile.device-provisioning' | translate }} - - -
-
- -
-
+ + + + device-profile.description + + +
+ + + +
+ {{ 'device-profile.transport-configuration' | translate }} + + device-profile.transport-type + + + {{deviceTransportTypeTranslations.get(type) | translate}} + + + + {{deviceTransportTypeHints.get(transportConfigFormGroup.get('transportType').value) | translate}} + + + {{ 'device-profile.transport-type-required' | translate }} + + + + +
+
+ +
+ {{'device-profile.alarm-rules-with-count' | translate: + {count: alarmRulesFormGroup.get('alarms').value ? + alarmRulesFormGroup.get('alarms').value.length : 0} }} + + +
+
+ +
+ {{ 'device-profile.device-provisioning' | translate }} + + +
+
+ +
+
+
@@ -143,8 +143,8 @@ [disabled]="(isLoading$ | async)" (click)="nextStep()">{{ 'action.next-with-label' | translate:{label: (getFormLabel(this.selectedIndex+1) | translate)} }}
- -
+ +
diff --git a/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.scss b/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.scss index eaef363192..cec9801e33 100644 --- a/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.scss @@ -15,6 +15,15 @@ */ @import "../../../../../scss/constants"; +:host { + height: 100%; + display: grid; + + .dialog-actions-row { + padding: 8px; + } +} + :host-context(.tb-fullscreen-dialog .mat-mdc-dialog-container) { @media #{$mat-lt-sm} { .mat-mdc-dialog-content { diff --git a/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.html b/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.html index 4fae225ea9..c1485cf450 100644 --- a/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.html @@ -15,172 +15,172 @@ limitations under the License. --> -
- -

device.add-device-text

- -
- -
- - -
-
- - - check - - -
- {{ 'device.wizard.device-details' | translate}} -
- - device.name - - - {{ 'device.name-required' | translate }} - - - {{ 'device.name-max-length' | translate }} - - - - device.label - - - {{ 'device.label-max-length' | translate }} - - -
- - - device.wizard.existing-device-profile - - - device.wizard.new-device-profile - - -
- - - - device-profile.new-device-profile-name - - - {{ 'device-profile.new-device-profile-name-required' | translate }} - - -
-
- - -
-
- - -
+ +

device.add-device-text

+ +
+ +
+ + +
+
+ + + check + + + + {{ 'device.wizard.device-details' | translate}} +
+ + device.name + + + {{ 'device.name-required' | translate }} + + + {{ 'device.name-max-length' | translate }} + + + + device.label + + + {{ 'device.label-max-length' | translate }} + + +
+ + + device.wizard.existing-device-profile + + + device.wizard.new-device-profile + + +
+ + + + device-profile.new-device-profile-name + + + {{ 'device-profile.new-device-profile-name-required' | translate }} + +
-
- - {{ 'device.is-gateway' | translate }} - - - {{ 'device.overwrite-activity-time' | translate }} - +
+ +
- - device.description - - -
- -
- -
- {{ 'device-profile.transport-configuration' | translate }} - device-profile.transport-type - - - {{deviceTransportTypeTranslations.get(type) | translate}} - - - - {{deviceTransportTypeHints.get(transportConfigFormGroup.get('transportType').value) | translate}} - - - {{ 'device-profile.transport-type-required' | translate }} - - - - -
-
- -
- {{'device-profile.alarm-rules-with-count' | translate: - {count: alarmRulesFormGroup.get('alarms').value ? - alarmRulesFormGroup.get('alarms').value.length : 0} }} - - -
-
- -
- {{ 'device-profile.device-provisioning' | translate }} - - -
-
- - {{ 'device.credentials' | translate }} -
- {{ 'device.wizard.add-credentials' | translate }} - - -
-
- - {{ 'customer.customer' | translate }} -
- - -
-
-
-
-
+
+ + +
+
+
+ + {{ 'device.is-gateway' | translate }} + + + {{ 'device.overwrite-activity-time' | translate }} + +
+ + device.description + + +
+ +
+ +
+ {{ 'device-profile.transport-configuration' | translate }} + device-profile.transport-type + + + {{deviceTransportTypeTranslations.get(type) | translate}} + + + + {{deviceTransportTypeHints.get(transportConfigFormGroup.get('transportType').value) | translate}} + + + {{ 'device-profile.transport-type-required' | translate }} + + + + +
+
+ +
+ {{'device-profile.alarm-rules-with-count' | translate: + {count: alarmRulesFormGroup.get('alarms').value ? + alarmRulesFormGroup.get('alarms').value.length : 0} }} + + +
+
+ +
+ {{ 'device-profile.device-provisioning' | translate }} + + +
+
+ + {{ 'device.credentials' | translate }} +
+ {{ 'device.wizard.add-credentials' | translate }} + + +
+
+ + {{ 'customer.customer' | translate }} +
+ + +
+
+
+
+
+
@@ -191,8 +191,8 @@ [disabled]="(isLoading$ | async)" (click)="nextStep()">{{ 'action.next-with-label' | translate:{label: (getFormLabel(this.selectedIndex+1) | translate)} }}
- -
+ +
diff --git a/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.scss b/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.scss index 292d6b3867..6d8f1f76ca 100644 --- a/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.scss @@ -15,6 +15,15 @@ */ @import "../../../../../scss/constants"; +:host { + height: 100%; + display: grid; + + .dialog-actions-row { + padding: 8px; + } +} + :host-context(.tb-fullscreen-dialog .mat-mdc-dialog-container) { @media #{$mat-lt-sm} { .mat-mdc-dialog-content { From 1172d1ce77830093b8e6089d3e8782965cec1128 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Thu, 16 Mar 2023 13:05:46 +0200 Subject: [PATCH 19/37] UI: Fixed expantion panel with hint --- .../home/components/widget/data-key-config.component.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/data-key-config.component.scss b/ui-ngx/src/app/modules/home/components/widget/data-key-config.component.scss index f0e7f857a3..e5f6c02ef7 100644 --- a/ui-ngx/src/app/modules/home/components/widget/data-key-config.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/data-key-config.component.scss @@ -101,7 +101,7 @@ &.comparison { .mat-expansion-panel-header { - height: 100%; + height: fit-content; } } From 5e212366c282bcabfc29106eae94c7b761a9f425 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Thu, 16 Mar 2023 14:30:02 +0200 Subject: [PATCH 20/37] UI: Fixed height of expation panel for widget settings --- .../modules/home/components/widget/widget-config.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html b/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html index aea23a4e4c..af3f9003aa 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html @@ -476,7 +476,7 @@
widget-config.mobile-mode-settings - + {{ 'widget-config.mobile-hide' | translate }} From 9e2d2e980c563c0c924e158ef7e12bd1865de621 Mon Sep 17 00:00:00 2001 From: kalytka Date: Thu, 23 Mar 2023 17:21:57 +0200 Subject: [PATCH 21/37] Added "delete" icon to the default icon list --- ui-ngx/src/app/core/services/utils.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/core/services/utils.service.ts b/ui-ngx/src/app/core/services/utils.service.ts index ea4c85eb64..6a9ea98979 100644 --- a/ui-ngx/src/app/core/services/utils.service.ts +++ b/ui-ngx/src/app/core/services/utils.service.ts @@ -87,7 +87,7 @@ const commonMaterialIcons: Array = ['more_horiz', 'more_vert', 'open_in_ 'arrow_forward', 'arrow_upwards', 'close', 'refresh', 'menu', 'show_chart', 'multiline_chart', 'pie_chart', 'insert_chart', 'people', 'person', 'domain', 'devices_other', 'now_widgets', 'dashboards', 'map', 'pin_drop', 'my_location', 'extension', 'search', 'settings', 'notifications', 'notifications_active', 'info', 'info_outline', 'warning', 'list', 'file_download', 'import_export', - 'share', 'add', 'edit', 'done']; + 'share', 'add', 'edit', 'done', 'delete']; // @dynamic @Injectable({ From db3e0d6828e589b7a8c1aed2d2fdb19d43fb1f70 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Mon, 27 Mar 2023 11:59:04 +0300 Subject: [PATCH 22/37] UI: Fixed widget bundle add button --- .../app/modules/home/pages/widget/widget-library.component.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/ui-ngx/src/app/modules/home/pages/widget/widget-library.component.scss b/ui-ngx/src/app/modules/home/pages/widget/widget-library.component.scss index c0f3e21329..8fcd595570 100644 --- a/ui-ngx/src/app/modules/home/pages/widget/widget-library.component.scss +++ b/ui-ngx/src/app/modules/home/pages/widget/widget-library.component.scss @@ -15,6 +15,7 @@ */ :host { button.tb-add-new-widget { + height: auto; padding-right: 12px; font-size: 24px; border-style: dashed; From 1a0b7560308780f9ebe25c52937f484e60a599cb Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Mon, 27 Mar 2023 13:23:19 +0300 Subject: [PATCH 23/37] UI: Fixed stepper --- .../add-device-profile-dialog.component.html | 8 +++++-- .../add-device-profile-dialog.component.scss | 24 ++++++------------- .../add-device-profile-dialog.component.ts | 16 +++++++++++-- .../device-wizard-dialog.component.scss | 24 ++++++------------- ui-ngx/src/styles.scss | 6 ----- 5 files changed, 34 insertions(+), 44 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.html b/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.html index 77cdae2340..779bc94f8f 100644 --- a/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.html @@ -29,9 +29,13 @@
- + -
+ {{ 'device-profile.device-profile-details' | translate }}
diff --git a/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.scss b/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.scss index cec9801e33..ca54ae2053 100644 --- a/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.scss @@ -41,31 +41,21 @@ .mat-stepper-horizontal { display: flex; - flex-direction: column; height: 100%; overflow: hidden; - @media #{$mat-lt-sm} { - .mat-step-label { - white-space: normal; - overflow: visible; - .mat-step-text-label { - overflow: visible; - } - } + + .mat-horizontal-stepper-wrapper { + flex: 1 1 100%; } + .mat-horizontal-content-container { - height: 530px; + height: 680px; max-height: 100%; width: 100%;; overflow-y: auto; + scrollbar-gutter: stable; @media #{$mat-gt-sm} { - min-width: 800px; - } - } - .mat-horizontal-stepper-content[aria-expanded=true] { - height: 100%; - form { - height: 100%; + min-width: 500px; } } } diff --git a/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.ts b/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.ts index c9b50727ea..3426593aed 100644 --- a/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.ts @@ -44,13 +44,17 @@ import { } from '@shared/models/device.models'; import { DeviceProfileService } from '@core/http/device-profile.service'; import { EntityType } from '@shared/models/entity-type.models'; -import { MatStepper } from '@angular/material/stepper'; +import { MatStepper, StepperOrientation } from '@angular/material/stepper'; import { RuleChainId } from '@shared/models/id/rule-chain-id'; import { StepperSelectionEvent } from '@angular/cdk/stepper'; import { deepTrim } from '@core/utils'; import { ServiceType } from '@shared/models/queue.models'; import { DashboardId } from '@shared/models/id/dashboard-id'; import { RuleChainType } from '@shared/models/rule-chain.models'; +import { Observable } from 'rxjs'; +import { BreakpointObserver } from '@angular/cdk/layout'; +import { MediaBreakpoints } from '@shared/models/constants'; +import { map } from 'rxjs/operators'; export interface AddDeviceProfileDialogData { deviceProfileName: string; @@ -67,7 +71,8 @@ export class AddDeviceProfileDialogComponent extends DialogComponent implements AfterViewInit { @ViewChild('addDeviceProfileStepper', {static: true}) addDeviceProfileStepper: MatStepper; - + stepperOrientation: Observable; + stepperLabelPosition: Observable<'bottom' | 'end'>; selectedIndex = 0; showNext = true; @@ -102,10 +107,17 @@ export class AddDeviceProfileDialogComponent extends public dialogRef: MatDialogRef, private componentFactoryResolver: ComponentFactoryResolver, private injector: Injector, + private breakpointObserver: BreakpointObserver, @SkipSelf() private errorStateMatcher: ErrorStateMatcher, private deviceProfileService: DeviceProfileService, private fb: UntypedFormBuilder) { super(store, router, dialogRef); + this.stepperOrientation = this.breakpointObserver.observe(MediaBreakpoints['gt-sm']) + .pipe(map(({matches}) => matches ? 'horizontal' : 'vertical')); + + this.stepperLabelPosition = this.breakpointObserver.observe(MediaBreakpoints['gt-md']) + .pipe(map(({matches}) => matches ? 'end' : 'bottom')); + this.deviceProfileDetailsFormGroup = this.fb.group( { name: [data.deviceProfileName, [Validators.required, Validators.maxLength(255)]], diff --git a/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.scss b/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.scss index 6d8f1f76ca..0fe18467fd 100644 --- a/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.scss @@ -45,31 +45,21 @@ .mat-stepper-horizontal { display: flex; - flex-direction: column; height: 100%; overflow: hidden; - @media #{$mat-lt-sm} { - .mat-step-label { - white-space: normal; - overflow: visible; - .mat-step-text-label { - overflow: visible; - } - } + + .mat-horizontal-stepper-wrapper { + flex: 1 1 100%; } + .mat-horizontal-content-container { - height: 530px; + height: 680px; max-height: 100%; width: 100%;; overflow-y: auto; + scrollbar-gutter: stable; @media #{$mat-gt-sm} { - min-width: 800px; - } - } - .mat-horizontal-stepper-content[aria-expanded=true] { - height: 100%; - form { - height: 100%; + min-width: 500px; } } } diff --git a/ui-ngx/src/styles.scss b/ui-ngx/src/styles.scss index 71d33b2e54..bdf2c5463c 100644 --- a/ui-ngx/src/styles.scss +++ b/ui-ngx/src/styles.scss @@ -1133,10 +1133,4 @@ mat-label { .mat-expansion-panel { color: inherit; } - - .mat-stepper-horizontal { - .mat-horizontal-stepper-wrapper { - overflow: auto; - } - } } From 78ffd10dd3d4ce285395fce3b22e8754266ecb17 Mon Sep 17 00:00:00 2001 From: kalytka Date: Mon, 27 Mar 2023 13:52:40 +0300 Subject: [PATCH 24/37] Changed labelText and reqiredText logic --- .../entity/entity-autocomplete.component.html | 4 ++-- .../entity/entity-autocomplete.component.ts | 21 ++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.html b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.html index 2b69495a3c..6d8a424352 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.html +++ b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.html @@ -16,7 +16,7 @@ --> - {{ entityText | translate }} + {{ label | translate }} - {{ entityRequiredText | translate }} + {{ requiredErrorText | translate }} diff --git a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts index 18a79fdb51..5ddc69426b 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts +++ b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts @@ -71,7 +71,6 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit this.dirty = true; } } - @Input() set entitySubtype(entitySubtype: string) { if (this.entitySubtypeValue !== entitySubtype) { @@ -249,12 +248,6 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit break; } } - if (this.labelText && this.labelText.length) { - this.entityText = this.labelText; - } - if (this.requiredText && this.requiredText.length) { - this.entityRequiredText = this.requiredText; - } const currentEntity = this.getCurrentEntity(); if (currentEntity) { const currentEntityType = currentEntity.id.entityType; @@ -384,4 +377,18 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit } return entityType; } + + get label(): string { + if (this.labelText && this.labelText.length) { + return this.labelText; + } + return this.entityText; + } + + get requiredErrorText(): string { + if (this.requiredText && this.requiredText.length) { + return this.requiredText; + } + return this.entityRequiredText; + } } From e984ef4fae574e322d86b0b73ffa7e74ce7a9fb4 Mon Sep 17 00:00:00 2001 From: kalytka Date: Mon, 27 Mar 2023 14:02:48 +0300 Subject: [PATCH 25/37] Refactoring --- .../entity/entity-autocomplete.component.ts | 63 ++++++++++--------- 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts index 5ddc69426b..0fe50d99ba 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts +++ b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts @@ -61,6 +61,24 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit entitySubtypeValue: string; + entityText: string; + + noEntitiesMatchingText: string; + + entityRequiredText: string; + + filteredEntities: Observable>>; + + searchText = ''; + + private requiredValue: boolean; + + private dirty = false; + + private refresh$ = new Subject>>(); + + private propagateChange = (v: any) => { }; + @Input() set entityType(entityType: EntityType) { if (this.entityTypeValue !== entityType) { @@ -71,6 +89,7 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit this.dirty = true; } } + @Input() set entitySubtype(entitySubtype: string) { if (this.entitySubtypeValue !== entitySubtype) { @@ -99,14 +118,13 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit @Input() appearance: MatFormFieldAppearance = 'fill'; - private requiredValue: boolean; - get required(): boolean { - return this.requiredValue; - } @Input() set required(value: boolean) { this.requiredValue = coerceBooleanProperty(value); } + get required(): boolean { + return this.requiredValue; + } @Input() disabled: boolean; @@ -116,19 +134,20 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit @ViewChild('entityInput', {static: true}) entityInput: ElementRef; - entityText: string; - noEntitiesMatchingText: string; - entityRequiredText: string; - - filteredEntities: Observable>>; - - searchText = ''; + get requiredErrorText(): string { + if (this.requiredText && this.requiredText.length) { + return this.requiredText; + } + return this.entityRequiredText; + } - private dirty = false; + get label(): string { + if (this.labelText && this.labelText.length) { + return this.labelText; + } + return this.entityText; + } - private refresh$ = new Subject>>(); - - private propagateChange = (v: any) => { }; constructor(private store: Store, public translate: TranslateService, @@ -377,18 +396,4 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit } return entityType; } - - get label(): string { - if (this.labelText && this.labelText.length) { - return this.labelText; - } - return this.entityText; - } - - get requiredErrorText(): string { - if (this.requiredText && this.requiredText.length) { - return this.requiredText; - } - return this.entityRequiredText; - } } From cb0a16633406d7ed1f2ac7564eef81c56b576f34 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Mon, 27 Mar 2023 14:17:16 +0300 Subject: [PATCH 26/37] UI: Fix --- .../modules/home/components/widget/lib/table-widget.models.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts index 0cb60a8ea1..20cf5860b5 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts @@ -417,7 +417,7 @@ export function constructTableCssString(widgetConfig: WidgetConfig): string { '.mat-mdc-table .mat-mdc-header-cell {\n' + 'color: ' + mdDarkSecondary + ';\n' + '}\n' + - '.mat-table .mat-cell, .mat-table .mat-header-cell {\n' + + '.mat-mdc-table .mat-mdc-cell, .mat-mdc-table .mat-mdc-header-cell {\n' + 'border-bottom-color: ' + mdDarkDivider + ';\n' + '}\n' + '.mat-mdc-table .mat-mdc-cell .mat-mdc-checkbox ' + From 3f5f0fb64192a34d51b85c6b83bd454c1c69026d Mon Sep 17 00:00:00 2001 From: kalytka Date: Mon, 27 Mar 2023 14:45:14 +0300 Subject: [PATCH 27/37] Refactoring --- .../entity/entity-autocomplete.component.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts index 0fe50d99ba..c5bf8b5700 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts +++ b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts @@ -36,10 +36,10 @@ import { AliasEntityType, EntityType } from '@shared/models/entity-type.models'; import { BaseData } from '@shared/models/base-data'; import { EntityId } from '@shared/models/id/entity-id'; import { EntityService } from '@core/http/entity.service'; -import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { getCurrentAuthUser } from '@core/auth/auth.selectors'; import { Authority } from '@shared/models/authority.enum'; import { isEqual } from '@core/utils'; +import {coerceBoolean} from '@shared/decorators/coerce-boolean'; @Component({ selector: 'tb-entity-autocomplete', @@ -71,8 +71,6 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit searchText = ''; - private requiredValue: boolean; - private dirty = false; private refresh$ = new Subject>>(); @@ -119,14 +117,11 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit appearance: MatFormFieldAppearance = 'fill'; @Input() - set required(value: boolean) { - this.requiredValue = coerceBooleanProperty(value); - } - get required(): boolean { - return this.requiredValue; - } + @coerceBoolean() + required: boolean; @Input() + @coerceBoolean() disabled: boolean; @Output() From b92e451926b036849b64cc6be1fa08773b0f1dd8 Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Mon, 27 Mar 2023 14:49:22 +0300 Subject: [PATCH 28/37] Update entity-autocomplete.component.ts --- .../shared/components/entity/entity-autocomplete.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts index c5bf8b5700..74e0152ed7 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts +++ b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts @@ -39,7 +39,7 @@ import { EntityService } from '@core/http/entity.service'; import { getCurrentAuthUser } from '@core/auth/auth.selectors'; import { Authority } from '@shared/models/authority.enum'; import { isEqual } from '@core/utils'; -import {coerceBoolean} from '@shared/decorators/coerce-boolean'; +import { coerceBoolean } from '@shared/decorators/coerce-boolean'; @Component({ selector: 'tb-entity-autocomplete', From 13278c15ae4fe62cad777f84820ba878e38979d4 Mon Sep 17 00:00:00 2001 From: deaflynx Date: Mon, 27 Mar 2023 15:19:21 +0300 Subject: [PATCH 29/37] Tenant profile -> rateLimits changed: "Transport tenans messages" to "REST requests for tenant", edit rate limits title --- .../profile/tenant/rate-limits/rate-limits.models.ts | 4 ++-- ui-ngx/src/assets/locale/locale.constant-en_US.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.models.ts b/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.models.ts index 70fb7af11f..09ae3f5139 100644 --- a/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.models.ts +++ b/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.models.ts @@ -45,7 +45,7 @@ export const rateLimitsLabelTranslationMap = new Map( [RateLimitsType.DEVICE_MESSAGES, 'tenant-profile.rate-limits.transport-device-msg'], [RateLimitsType.DEVICE_TELEMETRY_MESSAGES, 'tenant-profile.rate-limits.transport-device-telemetry-msg'], [RateLimitsType.DEVICE_TELEMETRY_DATA_POINTS, 'tenant-profile.rate-limits.transport-device-telemetry-data-points'], - [RateLimitsType.TENANT_SERVER_REST_LIMITS_CONFIGURATION, 'tenant-profile.transport-tenant-msg-rate-limit'], + [RateLimitsType.TENANT_SERVER_REST_LIMITS_CONFIGURATION, 'tenant-profile.rest-requests-for-tenant'], [RateLimitsType.CUSTOMER_SERVER_REST_LIMITS_CONFIGURATION, 'tenant-profile.customer-rest-limits'], [RateLimitsType.WS_UPDATE_PER_SESSION_RATE_LIMIT, 'tenant-profile.ws-limit-updates-per-session'], [RateLimitsType.CASSANDRA_QUERY_TENANT_RATE_LIMITS_CONFIGURATION, 'tenant-profile.cassandra-tenant-limits-configuration'], @@ -63,7 +63,7 @@ export const rateLimitsDialogTitleTranslationMap = new Map Date: Mon, 27 Mar 2023 15:29:31 +0300 Subject: [PATCH 30/37] UI: Refactoring --- ui-ngx/src/app/shared/components/kv-map.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/shared/components/kv-map.component.ts b/ui-ngx/src/app/shared/components/kv-map.component.ts index 6540ae0af0..abbb52e60c 100644 --- a/ui-ngx/src/app/shared/components/kv-map.component.ts +++ b/ui-ngx/src/app/shared/components/kv-map.component.ts @@ -14,7 +14,7 @@ /// limitations under the License. /// -import { Component, forwardRef, Input, OnInit } from '@angular/core'; +import { Component, forwardRef, Input, OnDestroy, OnInit } from '@angular/core'; import { AbstractControl, ControlValueAccessor, @@ -51,7 +51,7 @@ import { takeUntil } from 'rxjs/operators'; } ] }) -export class KeyValMapComponent extends PageComponent implements ControlValueAccessor, OnInit, Validator { +export class KeyValMapComponent extends PageComponent implements ControlValueAccessor, OnInit, OnDestroy, Validator { @Input() disabled: boolean; From 43735f17aea3d8378c2022713121ec3a11f05e7b Mon Sep 17 00:00:00 2001 From: rusikv Date: Mon, 27 Mar 2023 16:29:31 +0300 Subject: [PATCH 31/37] Added string items list for sparkplug transport configuration --- ...ile-transport-configuration.component.html | 27 ++++++---------- ...ofile-transport-configuration.component.ts | 32 ------------------- 2 files changed, 9 insertions(+), 50 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.html b/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.html index 1ef7892ecb..ecc9d1923d 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.html @@ -21,24 +21,15 @@
- - device-profile.mqtt-device-topic-filters-spark-plug-attribute-metric-names - - - {{name}} - close - - - - - + + +
diff --git a/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts index cf931a7fed..24b3f60fb4 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts @@ -41,8 +41,6 @@ import { import { isDefinedAndNotNull } from '@core/utils'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { COMMA, ENTER, SEMICOLON } from '@angular/cdk/keycodes'; -import { MatChipInputEvent } from '@angular/material/chips'; @Component({ selector: 'tb-mqtt-device-profile-transport-configuration', @@ -79,8 +77,6 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control private propagateChange = (v: any) => { }; - separatorKeysCodes = [ENTER, COMMA, SEMICOLON]; - constructor(private store: Store, private fb: UntypedFormBuilder) { } @@ -175,34 +171,6 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control } } - removeAttributeMetricName(name: string): void { - const names: string[] = this.mqttDeviceProfileTransportConfigurationFormGroup.get('sparkplugAttributesMetricNames').value; - const index = names.indexOf(name); - if (index >= 0) { - names.splice(index, 1); - this.mqttDeviceProfileTransportConfigurationFormGroup.get('sparkplugAttributesMetricNames').setValue(names); - } - } - - addAttributeMetricName(event: MatChipInputEvent): void { - const input = event.input; - let value = event.value; - if ((value || '').trim()) { - value = value.trim(); - let names: string[] = this.mqttDeviceProfileTransportConfigurationFormGroup.get('sparkplugAttributesMetricNames').value; - if (!names || names.indexOf(value) === -1) { - if (!names) { - names = []; - } - names.push(value); - this.mqttDeviceProfileTransportConfigurationFormGroup.get('sparkplugAttributesMetricNames').setValue(names, {emitEvent: true}); - } - } - if (input) { - input.value = ''; - } - } - private updateModel() { let configuration: DeviceProfileTransportConfiguration = null; if (this.mqttDeviceProfileTransportConfigurationFormGroup.valid) { From c94d5041a6b5c80e5f02a292332cbebf2928d0b6 Mon Sep 17 00:00:00 2001 From: rusikv Date: Mon, 27 Mar 2023 17:08:23 +0300 Subject: [PATCH 32/37] Moved sparkplug hint to string items list attribute, added subscriptSizing --- ...-profile-transport-configuration.component.html | 14 +++++++------- .../components/string-items-list.component.html | 2 +- .../components/string-items-list.component.ts | 5 ++++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.html b/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.html index ecc9d1923d..ac91bf3de3 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.html @@ -22,14 +22,14 @@
+ editable + label="{{ 'device-profile.mqtt-device-topic-filters-spark-plug-attribute-metric-names' | translate }}" + placeholder="{{'device-profile.mqtt-device-topic-filters-spark-plug-attribute-metric-names' | translate}}" + hint="{{ 'device-profile.mqtt-device-topic-filters-spark-plug-attribute-metric-names-hint' | translate }}" + floatLabel="always" + subscriptSizing="dynamic" + formControlName="sparkplugAttributesMetricNames"> -
diff --git a/ui-ngx/src/app/shared/components/string-items-list.component.html b/ui-ngx/src/app/shared/components/string-items-list.component.html index a3820211b6..f1f9f0d118 100644 --- a/ui-ngx/src/app/shared/components/string-items-list.component.html +++ b/ui-ngx/src/app/shared/components/string-items-list.component.html @@ -16,7 +16,7 @@ -->
- + {{ label }} { }; constructor(private fb: FormBuilder) { From 09bae92b866ccb9b4d76b282f3dbd62ed052f209 Mon Sep 17 00:00:00 2001 From: Chantsova Ekaterina Date: Mon, 27 Mar 2023 18:32:29 +0300 Subject: [PATCH 33/37] UI: Add originator label in alarm widget actions --- ui-ngx/src/app/core/api/widget-subscription.ts | 5 +---- .../widget/lib/alarms-table-widget.component.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ui-ngx/src/app/core/api/widget-subscription.ts b/ui-ngx/src/app/core/api/widget-subscription.ts index 9d07c751a5..440e61148e 100644 --- a/ui-ngx/src/app/core/api/widget-subscription.ts +++ b/ui-ngx/src/app/core/api/widget-subscription.ts @@ -582,12 +582,9 @@ export class WidgetSubscription implements IWidgetSubscription { const data = this.alarms.data[0]; entityId = data.originator; entityName = data.originatorName; + entityLabel = data.originatorLabel; if (data.latest && data.latest[EntityKeyType.ENTITY_FIELD]) { const entityFields = data.latest[EntityKeyType.ENTITY_FIELD]; - const labelValue = entityFields.label; - if (labelValue) { - entityLabel = labelValue.value; - } const additionalInfoValue = entityFields.additionalInfo; if (additionalInfoValue) { const additionalInfo = additionalInfoValue.value; 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 5b233ba2d1..18290225b6 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 @@ -804,11 +804,13 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, if (descriptors.length) { let entityId; let entityName; + let entityLabel; if (alarm && alarm.originator) { entityId = alarm.originator; entityName = alarm.originatorName; + entityLabel = alarm.originatorLabel; } - this.ctx.actionsApi.handleWidgetAction($event, descriptors[0], entityId, entityName, {alarm}); + this.ctx.actionsApi.handleWidgetAction($event, descriptors[0], entityId, entityName, {alarm}, entityLabel); } } @@ -827,11 +829,13 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, } let entityId; let entityName; + let entityLabel; if (alarm && alarm.originator) { entityId = alarm.originator; entityName = alarm.originatorName; + entityLabel = alarm.originatorLabel; } - this.ctx.actionsApi.handleWidgetAction($event, actionDescriptor, entityId, entityName, {alarm}); + this.ctx.actionsApi.handleWidgetAction($event, actionDescriptor, entityId, entityName, {alarm}, entityLabel); } } From 51643fe6736202e8e76a2a5e342a6717096b94f2 Mon Sep 17 00:00:00 2001 From: kalytka Date: Tue, 28 Mar 2023 13:38:29 +0300 Subject: [PATCH 34/37] Refactoring dashborad-select component --- .../components/dashboard-select.component.ts | 116 +++++++----------- 1 file changed, 44 insertions(+), 72 deletions(-) diff --git a/ui-ngx/src/app/shared/components/dashboard-select.component.ts b/ui-ngx/src/app/shared/components/dashboard-select.component.ts index c14e3924d2..40db63932a 100644 --- a/ui-ngx/src/app/shared/components/dashboard-select.component.ts +++ b/ui-ngx/src/app/shared/components/dashboard-select.component.ts @@ -16,6 +16,7 @@ import { Component, + ElementRef, forwardRef, Inject, Injector, @@ -45,8 +46,7 @@ import { WINDOW } from '@core/services/window.service'; import { ComponentPortal } from '@angular/cdk/portal'; import { DASHBOARD_SELECT_PANEL_DATA, - DashboardSelectPanelComponent, - DashboardSelectPanelData + DashboardSelectPanelComponent } from './dashboard-select-panel.component'; import { NULL_UUID } from '@shared/models/id/has-uuid'; @@ -97,6 +97,7 @@ export class DashboardSelectComponent implements ControlValueAccessor, OnInit { private overlay: Overlay, private breakpointObserver: BreakpointObserver, private viewContainerRef: ViewContainerRef, + private nativeElement: ElementRef, @Inject(DOCUMENT) private document: Document, @Inject(WINDOW) private window: Window) { } @@ -131,77 +132,48 @@ export class DashboardSelectComponent implements ControlValueAccessor, OnInit { } openDashboardSelectPanel() { - if (this.disabled) { - return; - } - const panelHeight = this.breakpointObserver.isMatched('min-height: 350px') ? 250 : 150; - const panelWidth = 300; - const position = this.overlay.position(); - const config = new OverlayConfig({ - panelClass: 'tb-dashboard-select-panel', - backdropClass: 'cdk-overlay-transparent-backdrop', - hasBackdrop: true, - }); - const el = this.dashboardSelectPanelOrigin.elementRef.nativeElement; - const offset = el.getBoundingClientRect(); - const scrollTop = this.window.pageYOffset || this.document.documentElement.scrollTop || this.document.body.scrollTop || 0; - const scrollLeft = this.window.pageXOffset || this.document.documentElement.scrollLeft || this.document.body.scrollLeft || 0; - const bottomY = offset.bottom - scrollTop; - const leftX = offset.left - scrollLeft; - let originX; - let originY; - let overlayX; - let overlayY; - const wHeight = this.document.documentElement.clientHeight; - const wWidth = this.document.documentElement.clientWidth; - if (bottomY + panelHeight > wHeight) { - originY = 'top'; - overlayY = 'bottom'; - } else { - originY = 'bottom'; - overlayY = 'top'; - } - if (leftX + panelWidth > wWidth) { - originX = 'end'; - overlayX = 'end'; - } else { - originX = 'start'; - overlayX = 'start'; - } - const connectedPosition: ConnectedPosition = { - originX, - originY, - overlayX, - overlayY - }; - config.positionStrategy = position.flexibleConnectedTo(this.dashboardSelectPanelOrigin.elementRef) - .withPositions([connectedPosition]); - const overlayRef = this.overlay.create(config); - overlayRef.backdropClick().subscribe(() => { - overlayRef.dispose(); - }); - - const injector = this._createDashboardSelectPanelInjector( - overlayRef, - { - dashboards$: this.dashboards$, - dashboardId: this.dashboardId, - onDashboardSelected: (dashboardId) => { - overlayRef.dispose(); - this.dashboardId = dashboardId; - this.updateView(); + if (!this.disabled) { + const config = new OverlayConfig({ + panelClass: 'tb-dashboard-select-panel', + backdropClass: 'cdk-overlay-transparent-backdrop', + hasBackdrop: true + }); + + const connectedPosition: ConnectedPosition = { + originX: 'start', + originY: 'bottom', + overlayX: 'start', + overlayY: 'top' + }; + + config.positionStrategy = this.overlay.position().flexibleConnectedTo(this.nativeElement) + .withPositions([connectedPosition]); + const overlayRef = this.overlay.create(config); + overlayRef.backdropClick().subscribe(() => { + overlayRef.dispose(); + }); + + const providers: StaticProvider[] = [ + { + provide: DASHBOARD_SELECT_PANEL_DATA, + useValue: { + dashboards$: this.dashboards$, + dashboardId: this.dashboardId, + onDashboardSelected: (dashboardId) => { + overlayRef.dispose(); + this.dashboardId = dashboardId; + this.updateView(); + } + } + }, + { + provide: OverlayRef, + useValue: overlayRef } - } - ); - overlayRef.attach(new ComponentPortal(DashboardSelectPanelComponent, this.viewContainerRef, injector)); - } - - private _createDashboardSelectPanelInjector(overlayRef: OverlayRef, data: DashboardSelectPanelData): Injector { - const providers: StaticProvider[] = [ - {provide: DASHBOARD_SELECT_PANEL_DATA, useValue: data}, - {provide: OverlayRef, useValue: overlayRef} - ]; - return Injector.create({parent: this.viewContainerRef.injector, providers}); + ]; + const injector = Injector.create({parent: this.viewContainerRef.injector, providers}); + overlayRef.attach(new ComponentPortal(DashboardSelectPanelComponent, this.viewContainerRef, injector)); + } } private updateView() { From 78950208618fc0e93711860984956692d6dad4b4 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Tue, 28 Mar 2023 17:45:08 +0300 Subject: [PATCH 35/37] UI: Deleting unused translates --- ui-ngx/src/assets/locale/locale.constant-ca_ES.json | 1 - ui-ngx/src/assets/locale/locale.constant-cs_CZ.json | 1 - ui-ngx/src/assets/locale/locale.constant-da_DK.json | 1 - ui-ngx/src/assets/locale/locale.constant-es_ES.json | 1 - ui-ngx/src/assets/locale/locale.constant-ko_KR.json | 1 - ui-ngx/src/assets/locale/locale.constant-sl_SI.json | 1 - ui-ngx/src/assets/locale/locale.constant-tr_TR.json | 1 - ui-ngx/src/assets/locale/locale.constant-zh_CN.json | 2 -- ui-ngx/src/assets/locale/locale.constant-zh_TW.json | 2 -- 9 files changed, 11 deletions(-) diff --git a/ui-ngx/src/assets/locale/locale.constant-ca_ES.json b/ui-ngx/src/assets/locale/locale.constant-ca_ES.json index d8996c1316..58d2cd5387 100644 --- a/ui-ngx/src/assets/locale/locale.constant-ca_ES.json +++ b/ui-ngx/src/assets/locale/locale.constant-ca_ES.json @@ -4241,7 +4241,6 @@ "maximum-ota-packages-sum-data-size": "Suma màxima de la mida dels fitxers del paquet ota en bytes (0 - il·limitat)", "maximum-ota-package-sum-data-size-required": "Cal suma màxima de la mida dels fitxers del paquet ota.", "maximum-ota-package-sum-data-size-range": "Suma màxima de la mida dels fitxers del paquet ota no pot ser negatiu", - "transport-tenant-msg-rate-limit": "Taxa de missatges de transport per propietari.", "transport-tenant-telemetry-msg-rate-limit": "Taxa de missatges de telemetria per propietari.", "transport-tenant-telemetry-data-points-rate-limit": "Taxa de punts de dades per propietari.", "transport-device-msg-rate-limit": "Taxa de missatges de dispositiu.", diff --git a/ui-ngx/src/assets/locale/locale.constant-cs_CZ.json b/ui-ngx/src/assets/locale/locale.constant-cs_CZ.json index 3588c5ca80..e993b9a49e 100644 --- a/ui-ngx/src/assets/locale/locale.constant-cs_CZ.json +++ b/ui-ngx/src/assets/locale/locale.constant-cs_CZ.json @@ -2612,7 +2612,6 @@ "maximum-ota-packages-sum-data-size": "Maximální součet velikosti souborů ota balíčků v bajtech (0 - neomezeno)", "maximum-ota-package-sum-data-size-required": "Maximální součet velikosti souborů ota balíčků je povinný.", "maximum-ota-package-sum-data-size-range": "Maximální součet velikosti souborů ota balíčků nemůže být záporný", - "transport-tenant-msg-rate-limit": "Limit přenosu zpráv tenanta.", "transport-tenant-telemetry-msg-rate-limit": "Limit přenosu zpráv telemetrie tenanta.", "transport-tenant-telemetry-data-points-rate-limit": "Limit přenosu datových bodů telemetrie tenanta.", "transport-device-msg-rate-limit": "Limit přenosu zpráv zařízení.", diff --git a/ui-ngx/src/assets/locale/locale.constant-da_DK.json b/ui-ngx/src/assets/locale/locale.constant-da_DK.json index 85b6ce8031..7662b60a2c 100644 --- a/ui-ngx/src/assets/locale/locale.constant-da_DK.json +++ b/ui-ngx/src/assets/locale/locale.constant-da_DK.json @@ -3130,7 +3130,6 @@ "maximum-scheduler-events": "Maks. antal planlægningsbegivenheder (0 – ubegrænset)", "maximum-scheduler-events-required": "Maks. antal planlægningsbegivenheder er påkrævet.", "maximum-scheduler-events-range": "Maks. antal planlægningsbegivenheder kan ikke være negativt", - "transport-tenant-msg-rate-limit": "Hastighedsgrænse for transport af lejermeddelelser.", "transport-tenant-telemetry-msg-rate-limit": "Hastighedsgrænse for transport af lejertelemetrimeddelelser.", "transport-tenant-telemetry-data-points-rate-limit": "Hastighedsgrænse for transport af lejertelemetridatapunkter.", "transport-device-msg-rate-limit": "Hastighedsgrænse for transport af enhedsmeddelelser.", diff --git a/ui-ngx/src/assets/locale/locale.constant-es_ES.json b/ui-ngx/src/assets/locale/locale.constant-es_ES.json index 637b3e2755..8a4a6dd0d9 100644 --- a/ui-ngx/src/assets/locale/locale.constant-es_ES.json +++ b/ui-ngx/src/assets/locale/locale.constant-es_ES.json @@ -3092,7 +3092,6 @@ "maximum-ota-packages-sum-data-size": "Tamaño máximo de paquetes OTA en bytes (0 - sin límite)", "maximum-ota-package-sum-data-size-required": "Tamaño máximo de paquetes OTA requerido.", "maximum-ota-package-sum-data-size-range": "Tamaño máximo de paquetes OTA no puede ser negativo", - "transport-tenant-msg-rate-limit": "Tasa de mensajes de transporte por propietario.", "transport-tenant-telemetry-msg-rate-limit": "Tasa de mensajes de telemetría por propietario.", "transport-tenant-telemetry-data-points-rate-limit": "Tasa de datapoints por propietario.", "transport-device-msg-rate-limit": "Tasa de mensajes de dispositivo.", diff --git a/ui-ngx/src/assets/locale/locale.constant-ko_KR.json b/ui-ngx/src/assets/locale/locale.constant-ko_KR.json index 3c2b20c82e..3f701a47aa 100644 --- a/ui-ngx/src/assets/locale/locale.constant-ko_KR.json +++ b/ui-ngx/src/assets/locale/locale.constant-ko_KR.json @@ -2047,7 +2047,6 @@ "maximum-rule-chains": "Maximum number of rule chains (0 - unlimited)", "maximum-rule-chains-required": "Maximum number of rule chains is required.", "maximum-rule-chains-range": "Maximum number of rule chains can't be negative", - "transport-tenant-msg-rate-limit": "Transport tenant messages rate limit.", "transport-tenant-telemetry-msg-rate-limit": "Transport tenant telemetry messages rate limit.", "transport-tenant-telemetry-data-points-rate-limit": "Transport tenant telemetry data points rate limit.", "transport-device-msg-rate-limit": "Transport device messages rate limit.", diff --git a/ui-ngx/src/assets/locale/locale.constant-sl_SI.json b/ui-ngx/src/assets/locale/locale.constant-sl_SI.json index 0937374fc8..b6f553a8ae 100644 --- a/ui-ngx/src/assets/locale/locale.constant-sl_SI.json +++ b/ui-ngx/src/assets/locale/locale.constant-sl_SI.json @@ -2047,7 +2047,6 @@ "maximum-rule-chains": "Maximum number of rule chains (0 - unlimited)", "maximum-rule-chains-required": "Maximum number of rule chains is required.", "maximum-rule-chains-range": "Maximum number of rule chains can't be negative", - "transport-tenant-msg-rate-limit": "Transport tenant messages rate limit.", "transport-tenant-telemetry-msg-rate-limit": "Transport tenant telemetry messages rate limit.", "transport-tenant-telemetry-data-points-rate-limit": "Transport tenant telemetry data points rate limit.", "transport-device-msg-rate-limit": "Transport device messages rate limit.", diff --git a/ui-ngx/src/assets/locale/locale.constant-tr_TR.json b/ui-ngx/src/assets/locale/locale.constant-tr_TR.json index 4bc58a8783..76db5cbe3f 100644 --- a/ui-ngx/src/assets/locale/locale.constant-tr_TR.json +++ b/ui-ngx/src/assets/locale/locale.constant-tr_TR.json @@ -2631,7 +2631,6 @@ "maximum-ota-packages-sum-data-size": "Ota paketi dosyalarının bayt cinsinden maksimum toplamı (0 - sınırsız)", "maximum-ota-package-sum-data-size-required": "Ota paketi dosyalarının maksimum toplamı gerekli.", "maximum-ota-package-sum-data-size-range": "Ota paketi dosyalarının maksimum toplamı negatif olamaz", - "transport-tenant-msg-rate-limit": "Taşıma tenant mesajları hız sınırı.", "transport-tenant-telemetry-msg-rate-limit": "Taşıma tenant telemetri iletileri hız sınırı.", "transport-tenant-telemetry-data-points-rate-limit": "Taşıma tenant telemetri veri noktaları hız sınırı.", "transport-device-msg-rate-limit": "Taşıma cihazı mesajları hız sınırı.", diff --git a/ui-ngx/src/assets/locale/locale.constant-zh_CN.json b/ui-ngx/src/assets/locale/locale.constant-zh_CN.json index e0272a0d55..edec8bf758 100644 --- a/ui-ngx/src/assets/locale/locale.constant-zh_CN.json +++ b/ui-ngx/src/assets/locale/locale.constant-zh_CN.json @@ -3213,7 +3213,6 @@ "maximum-ota-packages-sum-data-size": "OTA包文件总大小", "maximum-ota-package-sum-data-size-required": "OTA包文件总大小必填。", "maximum-ota-package-sum-data-size-range": "OTA包文件总大小不能为负数", - "transport-tenant-msg-rate-limit": "租户消息", "transport-tenant-telemetry-msg-rate-limit": "租户遥测消息", "transport-tenant-telemetry-data-points-rate-limit": "租户遥测数据点", "transport-device-msg-rate-limit": "设备消息", @@ -3287,7 +3286,6 @@ "edit-transport-device-msg-title": "编辑传输设备消息速率限制", "edit-transport-device-telemetry-msg-title": "编辑传输设备遥测消息速率限制", "edit-transport-device-telemetry-data-points-title": "编辑传输设备遥测数据点速率限制", - "edit-transport-tenant-msg-rate-limit-title": "编辑传输租户消息速率限制", "edit-customer-rest-limits-title": "编辑客户REST请求速率限制", "edit-ws-limit-updates-per-session-title": "编辑会话WS更新速率限制", "edit-cassandra-tenant-limits-configuration-title": "编辑租户Cassandra查询速率限制", diff --git a/ui-ngx/src/assets/locale/locale.constant-zh_TW.json b/ui-ngx/src/assets/locale/locale.constant-zh_TW.json index e911b9f319..4e876fd271 100644 --- a/ui-ngx/src/assets/locale/locale.constant-zh_TW.json +++ b/ui-ngx/src/assets/locale/locale.constant-zh_TW.json @@ -3063,7 +3063,6 @@ "maximum-ota-packages-sum-data-size": "OTA套件檔尺寸總計", "maximum-ota-package-sum-data-size-required": "需要OTA套件檔總和大小。", "maximum-ota-package-sum-data-size-range": "OTA套件檔尺寸總計不可為否", - "transport-tenant-msg-rate-limit": "傳輸租戶訊息", "transport-tenant-telemetry-msg-rate-limit": "傳輸租戶遙測訊息", "transport-tenant-telemetry-data-points-rate-limit": "傳輸租戶遙測資料端", "transport-device-msg-rate-limit": "傳輸設備訊息", @@ -3137,7 +3136,6 @@ "edit-transport-device-msg-title": "編輯傳輸設備訊息速率限制", "edit-transport-device-telemetry-msg-title": "編輯傳輸設備遙測訊息速率限制", "edit-transport-device-telemetry-data-points-title": "編輯傳輸設備遙測資料端速率限制", - "edit-transport-tenant-msg-rate-limit-title": "編輯傳輸租戶訊息速率限制", "edit-customer-rest-limits-title": "編輯剩餘顧客速率限制", "edit-ws-limit-updates-per-session-title": "編輯每個對談的 WS更新速率限制", "edit-cassandra-tenant-limits-configuration-title": "編輯租戶速率限制的 Cassandra 查詢", From 948187430ac1be14557fce144481f7c0df1f5a97 Mon Sep 17 00:00:00 2001 From: YevhenBondarenko Date: Tue, 28 Mar 2023 20:41:31 +0200 Subject: [PATCH 36/37] minor ui fixes --- .../entity/entity-subtype-autocomplete.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/shared/components/entity/entity-subtype-autocomplete.component.ts b/ui-ngx/src/app/shared/components/entity/entity-subtype-autocomplete.component.ts index 285bad2e63..3c28d9ceaa 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-subtype-autocomplete.component.ts +++ b/ui-ngx/src/app/shared/components/entity/entity-subtype-autocomplete.component.ts @@ -37,7 +37,7 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { AssetService } from '@core/http/asset.service'; import { EntityViewService } from '@core/http/entity-view.service'; import { EdgeService } from '@core/http/edge.service'; -import { MatFormFieldAppearance } from '@angular/material/form-field/form-field'; +import { MatFormFieldAppearance } from '@angular/material/form-field'; @Component({ selector: 'tb-entity-subtype-autocomplete', @@ -76,7 +76,7 @@ export class EntitySubTypeAutocompleteComponent implements ControlValueAccessor, excludeSubTypes: Array; @Input() - appearance: MatFormFieldAppearance = 'legacy'; + appearance: MatFormFieldAppearance = 'fill'; @ViewChild('subTypeInput', {static: true}) subTypeInput: ElementRef; From fd9729479b05c42b9a9d334c0122a0dd7dd5337c Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Wed, 29 Mar 2023 13:08:10 +0300 Subject: [PATCH 37/37] UI: Fix help button style --- ui-ngx/src/app/shared/components/help.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/components/help.component.html b/ui-ngx/src/app/shared/components/help.component.html index c5603ad2cd..5ebac09c00 100644 --- a/ui-ngx/src/app/shared/components/help.component.html +++ b/ui-ngx/src/app/shared/components/help.component.html @@ -15,7 +15,7 @@ limitations under the License. --> -