diff options
author | Eltanany Shaaban <shaaban.eltanany.ext@orange.com> | 2020-11-11 17:24:11 +0200 |
---|---|---|
committer | Eltanany Shaaban <shaaban.eltanany.ext@orange.com> | 2020-11-11 22:09:01 +0200 |
commit | aa45af222280972fb23fef151ba55cf41e4b34ec (patch) | |
tree | 8dc89b62df37ec6f6dbbea89a062f58abbb97062 /cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts | |
parent | a8b4aace07bec7407b851c2bdc8a89bae1b8425b (diff) |
adding value attribute for customized output for action phase1
Issue-ID: CCSDK-2975
Signed-off-by: Eltanany Shaaban <shaaban.eltanany.ext@orange.com>
Change-Id: I158eace00aff10a5baa4a8d597fdefaa5c548d7c
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts index 9f96e2ccf..babfec772 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts @@ -41,12 +41,17 @@ export class ActionAttributesComponent implements OnInit { suggestedAttributes: string[] = []; selectedFunctionName = ''; selectedAttributeName = ''; + isNotComponentResourceResolution = true; + currentArtifacts: string[] = []; + isParametersHidden = true; constructor(private designerStore: DesignerStore, private functionsStore: FunctionsStore) { } ngOnInit() { + console.log('is paramters hidden' + this.isParametersHidden); + console.log('is artifacts hidden' + this.isNotComponentResourceResolution); this.designerStore.state$.subscribe(designerState => { this.designerState = designerState; if (this.designerState && this.designerState.actionName) { @@ -323,9 +328,17 @@ export class ActionAttributesComponent implements OnInit { private getNodeTemplate = (value: string) => this.designerState.template.node_templates[value]; + getAttributesAndOutputs(functionName: string) { this.suggestedAttributes = []; console.log(functionName); + if (functionName.includes('component-resource-resolution')) { + this.isNotComponentResourceResolution = false; + this.isParametersHidden = true; + } else { + this.isNotComponentResourceResolution = true; + this.isParametersHidden = true; + } const nodeTemplate = this.designerState.template.node_templates[functionName]; console.log(this.designerState.template.node_templates); console.log(nodeTemplate); @@ -338,15 +351,33 @@ export class ActionAttributesComponent implements OnInit { if (currentFunction.definition['attributes']) { Object.keys(currentFunction.definition['attributes']).forEach(attribute => { this.suggestedAttributes.push(attribute); + this.suggestedAttributes.push('assignment-map'); }); } console.log(this.suggestedAttributes); + this.selectedFunctionName = functionName; + + }); } addTempOutputAttr(suggestedOutputAndAttribute: string) { + console.log('ssss'); this.selectedAttributeName = suggestedOutputAndAttribute; + this.currentArtifacts = []; + const nodeTemplate = this.designerState.template.node_templates[this.selectedFunctionName]; + if (nodeTemplate['artifacts'] + ) { + Object.keys(nodeTemplate['artifacts']).forEach(key => { + const mappingName = key.split('-')[0]; + if (!this.currentArtifacts.includes(mappingName)) { + this.currentArtifacts.push(mappingName); + } + }); + } + console.log('happend'); + } @@ -361,4 +392,10 @@ export class ActionAttributesComponent implements OnInit { ' },'; } + + addArtifactFile(suggestedArtifact: string) { + console.log(suggestedArtifact); + this.isParametersHidden = !this.selectedAttributeName.includes('assignment-map'); + console.log('assignement map ' + this.isParametersHidden); + } } |