// instantiate the final node_template object to save
this.nodeTemplates.type = type;
+ delete this.nodeTemplates.properties;
node_templates[finalFunctionData['instance-name']] = this.nodeTemplates;
delete finalFunctionData['instance-name'];
// tslint:disable-next-line: no-string-literal
delete finalFunctionData['type'];
+ if (finalFunctionData.outputs === {} || Object.keys(finalFunctionData.outputs).length <= 0) {
+ delete finalFunctionData.outputs;
+ }
+
this.nodeTemplates.interfaces = {
[this.interfaceChildName]: {
operations: {
}
}
};
-
console.log(finalFunctionData);
console.log(node_templates);
+ // save function to store
// tslint:disable-next-line: no-unused-expression
this.designerStore.addNodeTemplate(instanceName, type, node_templates[instanceName]);
+ // create a new package
this.saveEvent.emit('save');
}
// Template logic
confirmDelete() {
// Delete from templates
this.sharedService.deleteFromList(this.fileName);
- this.packageCreationStore.state.templates.files.delete(this.fileToDelete);
+ console.log('Templates/' + this.fileName + '-template.' + this.templateInfo.ext);
+ this.packageCreationStore.state.templates.files.delete('Templates/' + this.fileName + '-template.' + this.templateInfo.ext);
// Delete from Mapping
this.packageCreationStore.state.mapping.files.delete(this.fileToDelete);
- if (
- this.packageCreationStore.state.templates.files.size > 0 ||
- this.packageCreationStore.state.mapping.files.size > 0
- ) {
- this.openListView();
- }
+ this.openListView();
+
}
uploadFile() {