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 b55f01a7ae..071559f234 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
@@ -414,6 +414,8 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit
} else {
return EntityType.CUSTOMER;
}
+ } else if (entityType === AliasEntityType.CURRENT_RULE_NODE) {
+ return EntityType.RULE_NODE;
}
return entityType;
}
diff --git a/ui-ngx/src/app/shared/components/entity/entity-select.component.html b/ui-ngx/src/app/shared/components/entity/entity-select.component.html
index 783febec7e..b4a3a33029 100644
--- a/ui-ngx/src/app/shared/components/entity/entity-select.component.html
+++ b/ui-ngx/src/app/shared/components/entity/entity-select.component.html
@@ -15,7 +15,7 @@
limitations under the License.
-->
-
+
diff --git a/ui-ngx/src/app/shared/components/entity/entity-select.component.ts b/ui-ngx/src/app/shared/components/entity/entity-select.component.ts
index 5c63f81cb4..eff7f5306f 100644
--- a/ui-ngx/src/app/shared/components/entity/entity-select.component.ts
+++ b/ui-ngx/src/app/shared/components/entity/entity-select.component.ts
@@ -15,7 +15,7 @@
///
import { AfterViewInit, Component, forwardRef, Input, OnInit } from '@angular/core';
-import { ControlValueAccessor, UntypedFormBuilder, UntypedFormGroup, NG_VALUE_ACCESSOR } from '@angular/forms';
+import { ControlValueAccessor, NG_VALUE_ACCESSOR, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { TranslateService } from '@ngx-translate/core';
@@ -63,6 +63,10 @@ export class EntitySelectComponent implements ControlValueAccessor, OnInit, Afte
AliasEntityType = AliasEntityType;
+ entityTypeNullUid: Set = new Set([
+ AliasEntityType.CURRENT_TENANT, AliasEntityType.CURRENT_USER, AliasEntityType.CURRENT_USER_OWNER, AliasEntityType.CURRENT_RULE_NODE
+ ]);
+
private readonly defaultEntityType: EntityType | AliasEntityType = null;
private propagateChange = (v: any) => { };
@@ -143,9 +147,7 @@ export class EntitySelectComponent implements ControlValueAccessor, OnInit, Afte
id: this.modelValue.entityType !== entityType ? null : entityId
};
- if (this.modelValue.entityType === AliasEntityType.CURRENT_TENANT
- || this.modelValue.entityType === AliasEntityType.CURRENT_USER
- || this.modelValue.entityType === AliasEntityType.CURRENT_USER_OWNER) {
+ if (this.entityTypeNullUid.has(this.modelValue.entityType)) {
this.modelValue.id = NULL_UUID;
} else if (this.modelValue.entityType === AliasEntityType.CURRENT_CUSTOMER && !this.modelValue.id) {
this.modelValue.id = NULL_UUID;
diff --git a/ui-ngx/src/app/shared/components/entity/entity-type-select.component.ts b/ui-ngx/src/app/shared/components/entity/entity-type-select.component.ts
index 04754e4a20..3b0dca6e81 100644
--- a/ui-ngx/src/app/shared/components/entity/entity-type-select.component.ts
+++ b/ui-ngx/src/app/shared/components/entity/entity-type-select.component.ts
@@ -93,6 +93,9 @@ export class EntityTypeSelectComponent implements ControlValueAccessor, OnInit,
this.entityTypes = this.filterAllowedEntityTypes
? this.entityService.prepareAllowedEntityTypesList(this.allowedEntityTypes, this.useAliasEntityTypes)
: this.allowedEntityTypes;
+ if (this.allowedEntityTypes?.length && this.allowedEntityTypes.includes(AliasEntityType.CURRENT_RULE_NODE)) {
+ this.entityTypes.push(AliasEntityType.CURRENT_RULE_NODE);
+ }
this.entityTypeFormGroup.get('entityType').valueChanges.subscribe(
(value) => {
let modelValue;
diff --git a/ui-ngx/src/app/shared/components/js-func.component.html b/ui-ngx/src/app/shared/components/js-func.component.html
index 66bced8adf..082a92b2c1 100644
--- a/ui-ngx/src/app/shared/components/js-func.component.html
+++ b/ui-ngx/src/app/shared/components/js-func.component.html
@@ -24,6 +24,7 @@
{{ functionLabel }}
+
diff --git a/ui-ngx/src/app/shared/components/script-lang.component.html b/ui-ngx/src/app/shared/components/script-lang.component.html
index 8887f9d7c3..2afa16e743 100644
--- a/ui-ngx/src/app/shared/components/script-lang.component.html
+++ b/ui-ngx/src/app/shared/components/script-lang.component.html
@@ -17,9 +17,11 @@
-->
+ formControlName="scriptLang"
+ aria-label="Script language">
{{ 'rulenode.script-lang-tbel' | translate }}
- {{ 'rulenode.script-lang-java-script' | translate }}
+
+ {{ 'rulenode.script-lang-java-script' | translate }}
+
diff --git a/ui-ngx/src/app/shared/components/script-lang.component.scss b/ui-ngx/src/app/shared/components/script-lang.component.scss
index b36f22c95e..8e47eac4a2 100644
--- a/ui-ngx/src/app/shared/components/script-lang.component.scss
+++ b/ui-ngx/src/app/shared/components/script-lang.component.scss
@@ -14,6 +14,7 @@
* limitations under the License.
*/
.mat-button-toggle-group.tb-script-lang-toggle-group {
+ width: 320px;
&.mat-button-toggle-group-appearance-standard {
border: none;
border-radius: 18px;
diff --git a/ui-ngx/src/app/shared/components/script-lang.component.ts b/ui-ngx/src/app/shared/components/script-lang.component.ts
index dd9d995bcc..b3410f1a21 100644
--- a/ui-ngx/src/app/shared/components/script-lang.component.ts
+++ b/ui-ngx/src/app/shared/components/script-lang.component.ts
@@ -15,7 +15,7 @@
///
import { Component, forwardRef, Input, OnInit, ViewEncapsulation } from '@angular/core';
-import { ControlValueAccessor, UntypedFormBuilder, UntypedFormGroup, NG_VALUE_ACCESSOR } from '@angular/forms';
+import { ControlValueAccessor, NG_VALUE_ACCESSOR, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { PageComponent } from '@shared/components/page.component';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
diff --git a/ui-ngx/src/app/shared/models/entity-type.models.ts b/ui-ngx/src/app/shared/models/entity-type.models.ts
index 51fefefdf2..f2467b9736 100644
--- a/ui-ngx/src/app/shared/models/entity-type.models.ts
+++ b/ui-ngx/src/app/shared/models/entity-type.models.ts
@@ -54,7 +54,8 @@ export enum AliasEntityType {
CURRENT_CUSTOMER = 'CURRENT_CUSTOMER',
CURRENT_TENANT = 'CURRENT_TENANT',
CURRENT_USER = 'CURRENT_USER',
- CURRENT_USER_OWNER = 'CURRENT_USER_OWNER'
+ CURRENT_USER_OWNER = 'CURRENT_USER_OWNER',
+ CURRENT_RULE_NODE = 'CURRENT_RULE_NODE'
}
export interface EntityTypeTranslation {
@@ -326,6 +327,13 @@ export const entityTypeTranslations = new Map