From 07fd49c080944acdea5888b75d1cccb94eb72d41 Mon Sep 17 00:00:00 2001 From: Maksym Tsymbarov Date: Fri, 16 Jan 2026 17:35:32 +0200 Subject: [PATCH] Moved to key name prop in Query params --- .../rule-node/common/kv-list-config.component.ts | 12 +++--------- .../external/rest-api-call-config.component.html | 3 +-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/rule-node/common/kv-list-config.component.ts b/ui-ngx/src/app/modules/home/components/rule-node/common/kv-list-config.component.ts index 5284b88bce..fe913815cd 100644 --- a/ui-ngx/src/app/modules/home/components/rule-node/common/kv-list-config.component.ts +++ b/ui-ngx/src/app/modules/home/components/rule-node/common/kv-list-config.component.ts @@ -14,7 +14,7 @@ /// limitations under the License. /// -import { Component, forwardRef, Input, OnInit } from '@angular/core'; +import { Component, forwardRef, OnInit } from '@angular/core'; import { AbstractControl, ControlValueAccessor, @@ -44,14 +44,12 @@ import { KvMapConfigOldComponent } from '@home/components/rule-node/common/kv-ma }) export class KvListConfigComponent extends KvMapConfigOldComponent implements ControlValueAccessor, OnInit, Validator{ - @Input() keyProperty: string = 'key'; - override writeValue(kvList: any): void { const keyValsControls: Array = []; if (Array.isArray(kvList) && kvList.length > 0) { for (const property of kvList) { keyValsControls.push(this.fb.group({ - key: [property[this.keyProperty], [Validators.required]], + key: [property.key, [Validators.required]], value: [property.value, [Validators.required]] })) } @@ -79,11 +77,7 @@ export class KvListConfigComponent extends KvMapConfigOldComponent implements Co if (this.required && !kvList.length || !this.kvListFormGroup.valid) { this.propagateChange(null); } else { - const result = kvList.map(entry => ({ - [this.keyProperty]: entry.key, - value: entry.value - })); - this.propagateChange(result); + this.propagateChange(kvList); } } } diff --git a/ui-ngx/src/app/modules/home/components/rule-node/external/rest-api-call-config.component.html b/ui-ngx/src/app/modules/home/components/rule-node/external/rest-api-call-config.component.html index 7a30723f9e..2f6840639c 100644 --- a/ui-ngx/src/app/modules/home/components/rule-node/external/rest-api-call-config.component.html +++ b/ui-ngx/src/app/modules/home/components/rule-node/external/rest-api-call-config.component.html @@ -38,8 +38,7 @@ keyRequiredText="rule-node-config.query-params-name-required" valText="rule-node-config.query-params-value" valRequiredText="rule-node-config.query-params-value-required" - emptyText="rule-node-config.query-params-empty" - keyProperty="name"> + emptyText="rule-node-config.query-params-empty">