diff options
author | 2023-06-23 17:26:51 +0000 | |
---|---|---|
committer | 2023-06-23 18:39:31 +0100 | |
commit | 86dc4e7f69e6a05277e123391649fa3f4f7b83a5 (patch) | |
tree | 6f3944bbcc2539f377f78262240a4947080ac87d /catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function | |
parent | fc3869ca4c430cc29e46bb42125f5672230b83f0 (diff) |
Revert "Provide tosca function capability to complex type fields in composition view"
This reverts commit fc3869ca4c430cc29e46bb42125f5672230b83f0.
Reason for revert: Looks to be causing an issue with setting node filter using custom tosca function (save button disbaled)
Change-Id: I684aae7a23d30ed5a20aa4630cd658997b4628a5
Issue-ID: SDC-4528
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function')
-rw-r--r-- | catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts | 7 |
1 files changed, 2 insertions, 5 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 1fe467736d..a1ed8aa137 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 @@ -486,7 +486,7 @@ 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) { let childObject : DerivedFEProperty = (<DerivedFEProperty>(<PropertyDeclareAPIModel> this.property).input); - let childSchemaType = (this.property != null && this.property.schemaType != null) ? this.property.schemaType : childObject.type; + let childSchemaType = this.property.schemaType != null ? this.property.schemaType : childObject.type; if(this.isComplexType(childSchemaType) && !this.compositionMap){ if (childObject.type == PROPERTY_TYPES.MAP && childObject.isChildOfListOrMap) { return validPropertyType === PROPERTY_TYPES.STRING; @@ -501,15 +501,12 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges { } return validPropertyType === this.property.type && this.property.schema.property.type === property.schema.property.type; } - if ((this.property.schema.property.isDataType || this.isComplexType(this.property.type)) && this.property instanceof PropertyDeclareAPIModel && (<PropertyDeclareAPIModel>this.property).propertiesName){ + if (this.property.schema.property.isDataType && this.property instanceof PropertyDeclareAPIModel && (<PropertyDeclareAPIModel>this.property).propertiesName){ let typeToMatch = (<PropertyDeclareAPIModel> this.property).input.type; let childObject : DerivedFEProperty = (<DerivedFEProperty>(<PropertyDeclareAPIModel> this.property).input); if (childObject.type == PROPERTY_TYPES.MAP && childObject.isChildOfListOrMap) { typeToMatch = PROPERTY_TYPES.STRING; } - if ((typeToMatch === PROPERTY_TYPES.LIST || typeToMatch === PROPERTY_TYPES.MAP) && (<PropertyDeclareAPIModel> this.property).input.schema.property.type && this.compositionMap && !isNaN(Number(this.compositionMapKey))) { - typeToMatch = (<PropertyDeclareAPIModel> this.property).input.schema.property.type; - } return validPropertyType === typeToMatch; } |