summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src
diff options
context:
space:
mode:
authorAhmedeldeeb50 <ahmed.eldeeb.ext@orange.com>2020-11-03 13:01:21 +0200
committerKAPIL SINGAL <ks220y@att.com>2020-11-03 14:03:24 +0000
commitae369880e9d021b8b1b49de91b6c1f065383a765 (patch)
treeeb1730d4ba0200c39c5687dec4803368ccd4c16c /cds-ui/designer-client/src
parent705d8228d980f8a17396a5bce92c4a57b5b6abc6 (diff)
Remove function button
fix view mode in function tab Issue-ID: CCSDK-2900 Signed-off-by: Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com> Change-Id: Ia8c25db097d7a4010b11eb462a1805038fdc8b7d
Diffstat (limited to 'cds-ui/designer-client/src')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html4
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html2
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts24
3 files changed, 17 insertions, 13 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html
index 27d493e87..61cc1b453 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html
@@ -200,11 +200,11 @@
Action Attributes
</button> -->
</div>
- <div class="col text-center">
+ <!-- <div class="col text-center">
<button (click)="sidebarRight2.open()" type="button" class="btn btn-secondary">
Function Attributes
</button>
- </div>
+ </div> -->
</div>
<button (click)="insertCustomActionIntoBoard()" type="button" class="btn new-action">
+ &nbsp;&nbsp;New Action
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html
index 4decbf3d5..e908bdd66 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html
@@ -204,7 +204,7 @@
</div>
</div>
</div>
- <button class="btn btn-info" (click)="displayFunctionData()">Save</button>
+ <button class="btn btn-info" (click)="saveFunctionData()">Save</button>
</div>
<!--function - Select Template - Modal-->
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts
index 5ab4b43fa..7103552d0 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts
@@ -62,7 +62,8 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy {
// this.currentFuncion = this.designerState.template.node_templates[this.functionName];
// reset inouts&outputs
this.toNodeProcess(this.designerState.template.node_templates[this.functionName], this.functionName);
- this.getNodeType(this.functionName);
+ const type = this.designerState.template.node_templates[this.functionName].type;
+ this.getNodeType(type);
}
});
@@ -99,7 +100,7 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy {
this.currentFuncion['instance-name'] = functionName;
// tslint:disable-next-line: no-string-literal
this.currentFuncion['type'] = nodeTemplate['type'];
- if (Object.keys(nodeTemplate.interfaces).length > 0) {
+ if (nodeTemplate.interfaces && Object.keys(nodeTemplate.interfaces).length > 0) {
const nodeName = Object.keys(nodeTemplate.interfaces)[0];
// tslint:disable-next-line: no-string-literal
const inputs = nodeTemplate.interfaces[nodeName]['operations']['process']['inputs'];
@@ -125,13 +126,14 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy {
this.ngUnsubscribe.complete();
}
- displayFunctionData() {
+ saveFunctionData() {
// tslint:disable-next-line: variable-name
const node_templates = {};
+ const finalFunctionData = this.currentFuncion;
// tslint:disable-next-line: no-string-literal
- const type = this.currentFuncion['type'];
- const instanceName = this.currentFuncion['instance-name'];
+ const type = finalFunctionData['type'];
+ const instanceName = finalFunctionData['instance-name'];
// insert selected templates in nodeTemplates.artifacts
this.selectedTemplates.forEach((value, key) => {
console.log(key);
@@ -154,23 +156,23 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy {
// instantiate the final node_template object to save
this.nodeTemplates.type = type;
- node_templates[this.currentFuncion['instance-name']] = this.nodeTemplates;
+ node_templates[finalFunctionData['instance-name']] = this.nodeTemplates;
- delete this.currentFuncion['instance-name'];
+ delete finalFunctionData['instance-name'];
// tslint:disable-next-line: no-string-literal
- delete this.currentFuncion['type'];
+ delete finalFunctionData['type'];
this.nodeTemplates.interfaces = {
[this.interfaceChildName]: {
operations: {
process: {
- ...this.currentFuncion,
+ ...finalFunctionData,
}
}
}
};
- console.log(this.currentFuncion);
+ console.log(finalFunctionData);
console.log(node_templates);
// tslint:disable-next-line: no-unused-expression
this.designerStore.addNodeTemplate(instanceName, type, node_templates[instanceName]);
@@ -231,6 +233,7 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy {
this.functionStore.state$
.subscribe(state => {
console.log(state);
+ console.log(nodeName);
const functions = state.serverFunctions;
// tslint:disable-next-line: prefer-for-of
for (let i = 0; i < functions.length; i++) {
@@ -257,6 +260,7 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy {
}
const nodeName = Object.keys(interfaces)[0];
this.interfaceChildName = nodeName;
+ console.log(nodeName + ' ------ ' + type);
console.log(interfaces[nodeName]['operations']['process'][type]);
const fields = interfaces[nodeName]['operations']['process'][type];
this.artifactPrefix = false;