aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
diff options
context:
space:
mode:
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.ts37
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);
+ }
}