From b06dd754bc97be9b98da5f40065664cd5cd6847c Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Wed, 17 Dec 2025 14:08:12 +0200 Subject: [PATCH] UI: Updated filter and calculated fields page icon --- ui-ngx/src/app/core/services/menu.models.ts | 2 +- .../calculated-fields-table-config.ts | 32 +++---------------- ...ulated-fields-filter-config.component.html | 11 ------- ...lculated-fields-filter-config.component.ts | 7 ---- .../assets/locale/locale.constant-en_US.json | 3 +- 5 files changed, 6 insertions(+), 49 deletions(-) diff --git a/ui-ngx/src/app/core/services/menu.models.ts b/ui-ngx/src/app/core/services/menu.models.ts index e573cade2c..f42943cd93 100644 --- a/ui-ngx/src/app/core/services/menu.models.ts +++ b/ui-ngx/src/app/core/services/menu.models.ts @@ -634,7 +634,7 @@ export const menuSectionMap = new Map([ name: 'entity.type-calculated-fields', type: 'link', path: '/calculatedFields', - icon: 'mdi:plus-minus-variant', + icon: 'mdi:function-variant', } ], [ diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-fields-table-config.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-fields-table-config.ts index 2ac2f05bf4..c8732eddf3 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-fields-table-config.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-fields-table-config.ts @@ -99,6 +99,7 @@ export class CalculatedFieldsTableConfig extends EntityTableConfig { this.editCalculatedField($event, entity); + this.rowPointer = true; return true; }; } @@ -131,30 +132,15 @@ export class CalculatedFieldsTableConfig extends EntityTableConfig('expression', 'calculated-fields.expression', '250px'); - expressionColumn.sortable = false; - expressionColumn.cellContentFunction = entity => { - const expressionLabel = this.getExpressionLabel(entity); - return expressionLabel?.length < 45 ? expressionLabel : `${expressionLabel.substring(0, 44)}…`; - } - expressionColumn.cellTooltipFunction = entity => { - const expressionLabel = this.getExpressionLabel(entity); - return expressionLabel?.length < 45 ? null : expressionLabel - }; - this.columns.push(new DateEntityTableColumn('createdTime', 'common.created-time', this.datePipe, '150px')); - this.columns.push(new EntityTableColumn('name', 'common.name', this.pageMode ? '30%' :'33%', + this.columns.push(new EntityTableColumn('name', 'common.name', this.pageMode ? '33%' : '60%', entity => this.utilsService.customTranslation(entity.name, entity.name))); - this.columns.push(new EntityTableColumn('type', 'common.type', '170px', entity => this.translate.instant(CalculatedFieldTypeTranslations.get(entity.type).name), () => ({whiteSpace: 'nowrap' }))); - this.columns.push(expressionColumn); - if (this.pageMode) { - this.columns.push(new EntityTableColumn('entityType', 'alarm-rule.target-entity-type', '15%', - entity => this.translate.instant(entityTypeTranslations.get(entity.entityId.entityType).type))); - this.columns.push(new EntityLinkTableColumn('entityName', 'alarm-rule.target-entity', '30%', + this.columns.push(new EntityLinkTableColumn('entityName', 'calculated-fields.target-entity', '33%', entity => this.utilsService.customTranslation(entity['entityName'], entity['entityName']), entity => getEntityDetailsPageURL(entity.entityId?.id, entity.entityId?.entityType as EntityType), false)); } + this.columns.push(new EntityTableColumn('type', 'common.type', this.pageMode ? '33%' : '40%', entity => this.translate.instant(CalculatedFieldTypeTranslations.get(entity.type).name), () => ({whiteSpace: 'nowrap' }))); this.cellActionDescriptors.push( { @@ -192,16 +178,6 @@ export class CalculatedFieldsTableConfig extends EntityTableConfig> { return this.pageMode ? this.calculatedFieldsService.getCalculatedFieldsFilter(pageLink, this.calculatedFieldFilterConfig): diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/table-header/calculated-fields-filter-config.component.html b/ui-ngx/src/app/modules/home/components/calculated-fields/table-header/calculated-fields-filter-config.component.html index 6e67b9581b..b3cc3b387a 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/table-header/calculated-fields-filter-config.component.html +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/table-header/calculated-fields-filter-config.component.html @@ -56,17 +56,6 @@
-
-
calculated-fields.calculated-field-names
- - -
calculated-fields.calculated-field-types