diff options
author | imamSidero <imam.hussain@est.tech> | 2023-05-18 17:56:32 +0100 |
---|---|---|
committer | imamSidero <imam.hussain@est.tech> | 2023-05-22 19:32:28 +0100 |
commit | e3f5545168163fdbf0d83314ee9dd51983e4bcc8 (patch) | |
tree | 07e4f458e8a7a8b9ea35af7b16147068d03e9299 /catalog-ui/src/app/models/tosca-get-function.ts | |
parent | 89b4860dbd57fb1a11fc30397a08e316e793572d (diff) |
Provide index token to tosca function for nested lists
Index token capability is provided in tosca function for all nested levels of list and custom types
Issue-ID: SDC-4505
Signed-off-by: Imam hussain <imam.hussain@est.tech>
Change-Id: If21c0078e0d17c44b5a31b00d6fac3e18ff6831d
Diffstat (limited to 'catalog-ui/src/app/models/tosca-get-function.ts')
-rw-r--r-- | catalog-ui/src/app/models/tosca-get-function.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/catalog-ui/src/app/models/tosca-get-function.ts b/catalog-ui/src/app/models/tosca-get-function.ts index 3bb207700b..67d9b0a836 100644 --- a/catalog-ui/src/app/models/tosca-get-function.ts +++ b/catalog-ui/src/app/models/tosca-get-function.ts @@ -35,7 +35,7 @@ export class ToscaGetFunction implements ToscaFunction, ToscaFunctionParameter { functionType: ToscaGetFunctionType; propertyPathFromSource: Array<string>; value: any; - toscaIndex: string; + toscaIndexList: Array<string>; constructor(toscaGetFunction?: ToscaGetFunction) { if (!toscaGetFunction) { @@ -49,7 +49,7 @@ export class ToscaGetFunction implements ToscaFunction, ToscaFunctionParameter { this.sourceUniqueId = toscaGetFunction.sourceUniqueId; this.sourceName = toscaGetFunction.sourceName; this.functionType = toscaGetFunction.functionType; - this.toscaIndex = toscaGetFunction.toscaIndex; + this.toscaIndexList = toscaGetFunction.toscaIndexList; if (toscaGetFunction.propertyPathFromSource) { this.propertyPathFromSource = [...toscaGetFunction.propertyPathFromSource]; } @@ -71,20 +71,20 @@ export class ToscaGetFunction implements ToscaFunction, ToscaFunctionParameter { private buildGetInputFunctionValue(): Object { if (this.propertyPathFromSource.length === 1) { - return {[this.functionType.toLowerCase()]: [this.propertyPathFromSource[0], this.toscaIndex]}; + return {[this.functionType.toLowerCase()]: [this.propertyPathFromSource[0], this.toscaIndexList]}; } - return {[this.functionType.toLowerCase()]: [this.propertyPathFromSource, this.toscaIndex]}; + return {[this.functionType.toLowerCase()]: [this.propertyPathFromSource, this.toscaIndexList]}; } private buildFunctionValueWithPropertySource(): Object { if (this.propertySource == PropertySource.SELF) { return { - [this.functionType.toLowerCase()]: [PropertySource.SELF, ...this.propertyPathFromSource, this.toscaIndex] + [this.functionType.toLowerCase()]: [PropertySource.SELF, ...this.propertyPathFromSource, this.toscaIndexList] }; } if (this.propertySource == PropertySource.INSTANCE) { return { - [this.functionType.toLowerCase()]: [this.sourceName, ...this.propertyPathFromSource,this.toscaIndex] + [this.functionType.toLowerCase()]: [this.sourceName, ...this.propertyPathFromSource,this.toscaIndexList] }; } } |