audit-log.filter-types
diff --git a/ui-ngx/src/app/modules/home/components/audit-log/audit-log-filter.component.scss b/ui-ngx/src/app/modules/home/components/audit-log/audit-log-filter.component.scss
index 77bd5aea60..ca52472aa1 100644
--- a/ui-ngx/src/app/modules/home/components/audit-log/audit-log-filter.component.scss
+++ b/ui-ngx/src/app/modules/home/components/audit-log/audit-log-filter.component.scss
@@ -33,3 +33,12 @@
}
}
}
+
+::ng-deep {
+ .tb-audit-log-config-component {
+ max-width: 100%;
+ width: 600px;
+ min-width: 100%;
+ flex: 1;
+ }
+}
diff --git a/ui-ngx/src/app/modules/home/components/audit-log/audit-log-filter.component.ts b/ui-ngx/src/app/modules/home/components/audit-log/audit-log-filter.component.ts
index e78b38965d..f810eb5df7 100644
--- a/ui-ngx/src/app/modules/home/components/audit-log/audit-log-filter.component.ts
+++ b/ui-ngx/src/app/modules/home/components/audit-log/audit-log-filter.component.ts
@@ -16,16 +16,27 @@
import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
import { TemplatePortal } from '@angular/cdk/portal';
-import { ChangeDetectorRef, Component, DestroyRef, ElementRef, forwardRef, Input, OnInit, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
+import {
+ ChangeDetectorRef,
+ Component,
+ DestroyRef,
+ ElementRef,
+ forwardRef,
+ Input,
+ OnInit,
+ TemplateRef,
+ ViewChild,
+ ViewContainerRef
+} from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
-import { ControlValueAccessor, NG_VALUE_ACCESSOR, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
+import { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR } from '@angular/forms';
import { isDefined, isDefinedAndNotNull } from '@app/core/utils';
import { StringItemsOption } from '@app/shared/components/string-items-list.component';
import {
ActionType,
actionTypeTranslations,
- auditLogFilterEquals,
AuditLogFilter,
+ auditLogFilterEquals,
POSITION_MAP,
} from '@app/shared/public-api';
import { TranslateService } from '@ngx-translate/core';
@@ -56,9 +67,9 @@ export class AuditLogFilterComponent implements OnInit, ControlValueAccessor {
actionTypeTranslations = actionTypeTranslations;
- buttonDisplayValue = this.translate.instant('audit-log.filter');
+ buttonDisplayValue = this.translate.instant('audit-log.audit-log-filter-title');
- auditLogFilterForm: UntypedFormGroup;
+ auditLogFilterForm: FormGroup;
auditLogOverlayRef: OverlayRef;
@@ -68,7 +79,7 @@ export class AuditLogFilterComponent implements OnInit, ControlValueAccessor {
private propagateChange = (_: any) => {};
- constructor(private fb: UntypedFormBuilder,
+ constructor(private fb: FormBuilder,
private translate: TranslateService,
private overlay: Overlay,
private nativeElement: ElementRef,
@@ -93,7 +104,7 @@ export class AuditLogFilterComponent implements OnInit, ControlValueAccessor {
this.propagateChange = fn;
}
- registerOnTouched(fn: any): void {
+ registerOnTouched(_fn: any): void {
}
setDisabledState(isDisabled: boolean): void {
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 56a3cc2a45..e5c57aae2e 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
@@ -136,11 +136,13 @@ export class CalculatedFieldsTableConfig extends EntityTableConfig
('name', 'common.name', this.pageMode ? '33%' : '60%',
entity => this.utilsService.customTranslation(entity.name, entity.name)));
if (this.pageMode) {
- this.columns.push(new EntityLinkTableColumn('entityName', 'calculated-fields.target-entity', '33%',
+ this.columns.push(new EntityTableColumn('entityType', 'entity.entity-type', '10%',
+ entity => this.translate.instant(entityTypeTranslations.get(entity.entityId.entityType).type)));
+ this.columns.push(new EntityLinkTableColumn('entityName', 'entity.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.columns.push(new EntityTableColumn('type', 'common.type', this.pageMode ? '23%' : '40%', entity => this.translate.instant(CalculatedFieldTypeTranslations.get(entity.type).name), () => ({whiteSpace: 'nowrap' })));
this.cellActionDescriptors.push(
{
diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/dialog/calculated-field-dialog.component.html b/ui-ngx/src/app/modules/home/components/calculated-fields/components/dialog/calculated-field-dialog.component.html
index 44c2e702e5..3d669b02c6 100644
--- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/dialog/calculated-field-dialog.component.html
+++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/dialog/calculated-field-dialog.component.html
@@ -62,7 +62,7 @@
class="flex-1"
showLabel
required
- label="{{ 'alarm-rule.target-entity-type' | translate }}"
+ label="{{ 'entity.entity-type' | translate }}"
[filterAllowedEntityTypes]="false"
[allowedEntityTypes]="calculatedFieldsEntityTypeList"
formControlName="entityType">
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 b3cc3b387a..5f4efea5b8 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
@@ -21,18 +21,18 @@