summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sdc-workflow-designer-ui/src/app/components/menu/menu.component.css4
-rw-r--r--sdc-workflow-designer-ui/src/app/components/menu/menu.component.html4
-rw-r--r--sdc-workflow-designer-ui/src/app/components/menu/menu.component.ts6
3 files changed, 9 insertions, 5 deletions
diff --git a/sdc-workflow-designer-ui/src/app/components/menu/menu.component.css b/sdc-workflow-designer-ui/src/app/components/menu/menu.component.css
index 2fa48afa..6ba4133b 100644
--- a/sdc-workflow-designer-ui/src/app/components/menu/menu.component.css
+++ b/sdc-workflow-designer-ui/src/app/components/menu/menu.component.css
@@ -14,6 +14,10 @@
float: right;
}
+.btn-left{
+ float: left;
+}
+
button i{
padding-right: 3px;
}
diff --git a/sdc-workflow-designer-ui/src/app/components/menu/menu.component.html b/sdc-workflow-designer-ui/src/app/components/menu/menu.component.html
index e54dd4e6..8cf9dc57 100644
--- a/sdc-workflow-designer-ui/src/app/components/menu/menu.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/menu/menu.component.html
@@ -12,8 +12,10 @@
*/
-->
+<div class="btn-left">
+ <p-splitButton [label]="currentWorkflow" icon="fa-arrows" (onClick)="showWorkflows()" [model]="getWorkflows()"></p-splitButton>
+</div>
<div class="btn-right">
- <p-splitButton label="Workflows" icon="fa-check" (onClick)="showWorkflows()" [model]="getWorkflows()"></p-splitButton>
<button type="button" class="btn white" (click)="save()">
<i class="fa fa-save"></i>Save
</button>
diff --git a/sdc-workflow-designer-ui/src/app/components/menu/menu.component.ts b/sdc-workflow-designer-ui/src/app/components/menu/menu.component.ts
index 4183391e..4cd88480 100644
--- a/sdc-workflow-designer-ui/src/app/components/menu/menu.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/menu/menu.component.ts
@@ -25,6 +25,7 @@ import { Workflow } from "../../model/workflow/workflow";
export class MenuComponent {
@ViewChild(MicroserviceComponent) public microserviceComponent: MicroserviceComponent;
@ViewChild(WorkflowsComponent) public workflowsComponent: WorkflowsComponent;
+ public currentWorkflow = 'Workflows';
constructor(private broadcastService: BroadcastService, private workflowService: WorkflowService) {
}
@@ -58,23 +59,20 @@ export class MenuComponent {
}
public workflowSelected(workflow: Workflow) {
+ this.currentWorkflow = workflow.name;
this.broadcastService.broadcast(this.broadcastService.workflow, workflow);
}
public download() {
const filename = this.workflowService.workflow.name + '.json';
const content = JSON.stringify(this.workflowService.workflow);
- // 创建隐藏的可下载链接
var eleLink = document.createElement('a');
eleLink.download = filename;
eleLink.style.display = 'none';
- // 字符内容转变成blob地址
var blob = new Blob([content]);
eleLink.href = URL.createObjectURL(blob);
- // 触发点击
document.body.appendChild(eleLink);
eleLink.click();
- // 然后移除
document.body.removeChild(eleLink);
}
}