diff options
author | andre.schmid <andre.schmid@est.tech> | 2022-05-30 16:21:52 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2022-06-07 13:10:34 +0000 |
commit | 90d6e2ddd348afd42b08d66c6e2308c63535e8de (patch) | |
tree | a0f70399efa7b928aa0ddae4a77fe414ef46c80b /catalog-ui/src/app/models/tosca-get-function.ts | |
parent | 6637ee3404312201401ba1edb6efadb011977aa7 (diff) |
Allow to edit or clear a TOSCA function value
In the properties assignment view, when a property that has a TOSCA
function value is selected, a button "Clear Value" will show allowing
to clear the property value.
This behaviour was changed to show the TOSCA function button, which,
when clicked, will open the TOSCA function modal with the function
values loaded, allowing to edit or clear the existing value.
Change-Id: Ic365f81921052aa2c5737d2a1ac956a3fb745db6
Issue-ID: SDC-4028
Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'catalog-ui/src/app/models/tosca-get-function.ts')
-rw-r--r-- | catalog-ui/src/app/models/tosca-get-function.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/catalog-ui/src/app/models/tosca-get-function.ts b/catalog-ui/src/app/models/tosca-get-function.ts index 0fe0831215..6d5642eaf1 100644 --- a/catalog-ui/src/app/models/tosca-get-function.ts +++ b/catalog-ui/src/app/models/tosca-get-function.ts @@ -30,4 +30,19 @@ export class ToscaGetFunction { sourceName: string; functionType: ToscaGetFunctionType; propertyPathFromSource: Array<string>; + + constructor(toscaGetFunction: ToscaGetFunction) { + if (!toscaGetFunction) { + return; + } + this.propertyUniqueId = toscaGetFunction.propertyUniqueId; + this.propertyName = toscaGetFunction.propertyName; + this.propertySource = toscaGetFunction.propertySource; + this.sourceUniqueId = toscaGetFunction.sourceUniqueId; + this.sourceName = toscaGetFunction.sourceName; + this.functionType = toscaGetFunction.functionType; + if (toscaGetFunction.propertyPathFromSource) { + this.propertyPathFromSource = [...toscaGetFunction.propertyPathFromSource]; + } + } }
\ No newline at end of file |