summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts12
1 files changed, 6 insertions, 6 deletions
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 284c559c55..1b0a1a34ee 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
@@ -100,7 +100,6 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges {
this.initToscaGetFunction().subscribe(() => {
this.isInitialized = true;
});
-
}
ngOnChanges(_changes: SimpleChanges): void {
@@ -410,7 +409,8 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges {
if (this.property.type === PROPERTY_TYPES.ANY) {
return true;
}
- let validPropertyType = property.type === PROPERTY_TYPES.LIST ? property.schemaType : property.type;
+ let validPropertyType = property.type;
+ let validPropertyTypeSchema = property.schemaType;
if (this.typeHasSchema(this.property.type)) {
if ((this.property instanceof PropertyDeclareAPIModel && (<PropertyDeclareAPIModel> this.property).input instanceof DerivedFEProperty) || this.compositionMap) {
let childObject : DerivedFEProperty = (<DerivedFEProperty>(<PropertyDeclareAPIModel> this.property).input);
@@ -421,13 +421,13 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges {
}
return validPropertyType === childObject.type;
}else{
- return validPropertyType === this.property.schema.property.type;
+ return validPropertyType === this.property.schemaType;
}
}
if (!property.schema || !property.schema.property) {
return false;
}
- return validPropertyType === this.property.type && this.property.schema.property.type === property.schema.property.type;
+ return validPropertyType === this.property.type && this.property.schemaType === validPropertyTypeSchema;
}
if (this.property.schema.property.isDataType && this.property instanceof PropertyDeclareAPIModel && (<PropertyDeclareAPIModel>this.property).propertiesName){
let typeToMatch = (<PropertyDeclareAPIModel> this.property).input.type;
@@ -438,7 +438,7 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges {
return validPropertyType === typeToMatch;
}
- return validPropertyType === this.property.type;
+ return validPropertyType === this.property.type || (validPropertyType === PROPERTY_TYPES.LIST && validPropertyTypeSchema === this.property.type);
}
private getType(propertyPath:string[], type: string): string {
@@ -499,7 +499,7 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges {
this.toscaIndexFlag = false;
this.toscaIndex.reset();
const selectedProperty: PropertyDropdownValue = this.selectedProperty.value;
- if (selectedProperty.isList) {
+ if (selectedProperty.isList && this.property.type != PROPERTY_TYPES.LIST) {
this.toscaIndexFlag = true;
}
}