aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
diff options
context:
space:
mode:
authorKrupaNagabhushan <krupa.nagabhushan@est.tech>2023-03-13 18:12:43 +0000
committerMichael Morris <michael.morris@est.tech>2023-03-13 19:26:30 +0000
commit955953b295b31b33e6b8af5a767d9ef18964a65c (patch)
tree94e0e18e8d95b6a563726668230def15f4187a22 /catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
parent7193e96b30ccaa4ed06c80a4861c91d341e0d910 (diff)
Fix Property with '::' in name produces wrong Input
Issue-ID: SDC-4431 Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech> Change-Id: Ieaf9b99493511145c2d6a3d5ec31bdf0e36cd8b2
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
index ada12ad2e2..17bb1a63cc 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
@@ -739,8 +739,16 @@ export class PropertiesAssignmentComponent {
});
}
+ declareInput = (): void => {
+ if (this.checkedPropertiesCount == 1) {
+ this.openAddInputNameAndDeclareInputModal();
+ } else if (this.checkedPropertiesCount > 1) {
+ this.declareInputFromProperties();
+ }
+ }
+
/*** DECLARE PROPERTIES/INPUTS ***/
- declareInputFromProperties = (inputName:string): void => {
+ declareInputFromProperties = (inputName?: string): void => {
console.debug("==>" + this.constructor.name + ": declareProperties");
let selectedComponentInstancesProperties: InstanceBePropertiesMap = new InstanceBePropertiesMap();
@@ -831,7 +839,7 @@ export class PropertiesAssignmentComponent {
let inputName: string;
if (propertyName) {
if (propertyName.includes("::")) {
- propertyName = propertyName.replace("::", "_");
+ propertyName = propertyName.replace(/::/g, "_");
}
if (componentName) {
inputName = componentName + "_" + propertyName;