summaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/components
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components')
-rw-r--r--sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.html2
-rw-r--r--sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.ts13
2 files changed, 14 insertions, 1 deletions
diff --git a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.html b/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.html
index 5d028b90..91b935e9 100644
--- a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.html
@@ -19,5 +19,7 @@
<button type="button" class="btn btn-secondary item ui-draggable" [attr.nodeType]="'endEvent'">
<span>endEvent</span>
</button>
+
+ <button type="button" class="btn btn-success" (click)="save()">Save</button>
</div>
</div>
diff --git a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.ts b/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.ts
index 5fdb6ce5..1e1de191 100644
--- a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.ts
@@ -13,6 +13,7 @@
import { AfterViewInit, Component } from '@angular/core';
import { JsPlumbService } from '../../services/jsplumb.service';
+import { WorkflowService } from "../../services/workflow.service";
/**
* toolbar component contains some basic operations(save) and all of the supported workflow nodes.
@@ -25,11 +26,21 @@ import { JsPlumbService } from '../../services/jsplumb.service';
})
export class ToolbarComponent implements AfterViewInit {
- constructor(private jsPlumbService: JsPlumbService) {
+ constructor(private jsPlumbService: JsPlumbService, private workflowService: WorkflowService) {
}
public ngAfterViewInit() {
this.jsPlumbService.buttonDraggable();
}
+ public save() {
+ this.workflowService.save().subscribe(success => {
+ if(success) {
+ console.log(`save workflow success`);
+ } else {
+ console.log(`save workflow failed`);
+ }
+ });
+ }
+
}