aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2/pages')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts10
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts5
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts7
3 files changed, 17 insertions, 5 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 e66de41f09..7fef3532a3 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
@@ -592,8 +592,11 @@ export class PropertiesAssignmentComponent {
const parts = propertiesNameArray.split("#");
let currentKey = [];
if (this.isListOrMap(checkedInstanceProperty.type)) {
+ if (checkedInstanceProperty.schemaType == PROPERTY_TYPES.MAP) {
+ currentKey.push((<DerivedFEProperty>checkedInstanceProperty.input).parentMapKey);
+ }
currentKey.push((<DerivedFEProperty>checkedInstanceProperty.input).mapKey);
- if (this.isComplexSchemaType(checkedInstanceProperty.schemaType)) {
+ if (checkedInstanceProperty.schemaType != PROPERTY_TYPES.MAP && this.isComplexSchemaType(checkedInstanceProperty.schemaType)) {
currentKey.push(parts.reverse()[0]);
}
}
@@ -636,8 +639,11 @@ export class PropertiesAssignmentComponent {
const parts = propertiesName.split("#");
let currentKey = [];
if (this.isListOrMap(checkedProperty.type)) {
+ if (checkedProperty.schemaType == PROPERTY_TYPES.MAP) {
+ currentKey.push((<DerivedFEProperty>checkedProperty.input).parentMapKey);
+ }
currentKey.push((<DerivedFEProperty>checkedProperty.input).mapKey);
- if (this.isComplexSchemaType(checkedProperty.schemaType)) {
+ if (checkedProperty.schemaType != PROPERTY_TYPES.MAP && this.isComplexSchemaType(checkedProperty.schemaType)) {
currentKey.push(parts.reverse()[0]);
}
}
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
index f697eed027..9ea0c8f214 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
@@ -116,8 +116,11 @@ export class ToscaFunctionComponent implements OnInit, OnChanges {
if (propertiesPath.length > 1){
let keyToFind = [];
if (this.property.type == PROPERTY_TYPES.MAP || this.property.type == PROPERTY_TYPES.LIST) {
+ if (this.property.type == PROPERTY_TYPES.LIST && this.property.schemaType == PROPERTY_TYPES.MAP) {
+ keyToFind.push((<DerivedFEProperty>this.property.input).parentMapKey);
+ }
keyToFind.push((<DerivedFEProperty>this.property.input).mapKey);
- if (PROPERTY_DATA.SIMPLE_TYPES.indexOf(this.property.schemaType) === -1) {
+ if (this.property.schemaType != PROPERTY_TYPES.MAP && PROPERTY_DATA.SIMPLE_TYPES.indexOf(this.property.schemaType) === -1) {
keyToFind.push(propertiesPath.reverse()[0]);
}
}
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts
index 9fdc8c19aa..b0146cc1cf 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts
@@ -267,7 +267,8 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges {
if ((this.typeHasSchema(this.property.type) && this.property instanceof PropertyDeclareAPIModel &&
(<PropertyDeclareAPIModel> this.property).input instanceof DerivedFEProperty) || this.compositionMap) {
if(this.isComplexType(this.property.schemaType) && !this.compositionMap){
- return (<PropertyDeclareAPIModel> this.property).input.type;
+ let propertySchemaType = (<PropertyDeclareAPIModel> this.property).input.type;
+ return propertySchemaType == PROPERTY_TYPES.MAP ? PROPERTY_TYPES.STRING : propertySchemaType;
}else{
return this.property.schema.property.type;
}
@@ -379,7 +380,9 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges {
if (this.typeHasSchema(this.property.type)) {
if ((this.property instanceof PropertyDeclareAPIModel && (<PropertyDeclareAPIModel> this.property).input instanceof DerivedFEProperty) || this.compositionMap) {
if(this.isComplexType(this.property.schemaType) && !this.compositionMap){
- return property.type === (<PropertyDeclareAPIModel> this.property).input.type;
+ let propertySchemaType = (<PropertyDeclareAPIModel> this.property).input.type;
+ propertySchemaType = propertySchemaType == PROPERTY_TYPES.MAP ? PROPERTY_TYPES.STRING : propertySchemaType;
+ return property.type === propertySchemaType;
}else{
return property.type === this.property.schema.property.type;
}