aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/components/menu/workflows
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components/menu/workflows')
-rw-r--r--sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.html6
-rw-r--r--sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.ts15
2 files changed, 14 insertions, 7 deletions
diff --git a/sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.html b/sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.html
index 0a3b51bf..5568ba60 100644
--- a/sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.html
@@ -24,9 +24,9 @@ tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="tru
<div class="modal-body">
<ul class="list-group">
<li class="list-group-item d-flex justify-content-between align-items-center"
- *ngFor="let workflow of workflows">
- <div style="width:380px"><input class="form-control" [(ngModel)]="workflow.name"></div>
- <div class="badge badge-danger badge-pill" (click)="deleteWorkflow(workflow)">
+ *ngFor="let key of workflows.keys()">
+ <div style="width:380px"><input class="form-control" [(ngModel)]="workflows.get(key).planName"></div>
+ <div class="badge badge-danger badge-pill" (click)="deleteWorkflow(key)">
<i class="fa fa-minus"></i>
</div>
</li>
diff --git a/sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.ts b/sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.ts
index dff73008..bf884983 100644
--- a/sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.ts
@@ -14,7 +14,7 @@ import { AfterViewInit, Component, ViewChild } from '@angular/core';
import { ModalDirective } from 'ngx-bootstrap/modal';
import { WorkflowService } from "../../../services/workflow.service";
-import { Workflow } from "../../../model/workflow/workflow";
+import { PlanModel } from "../../../model/workflow/plan-model";
/**
* workflows component
@@ -27,18 +27,25 @@ import { Workflow } from "../../../model/workflow/workflow";
export class WorkflowsComponent {
@ViewChild('workflowsModal') public workflowsModal: ModalDirective;
- public workflows: Workflow[];
+ public workflows :Map<number, any>;
constructor(private workflowService: WorkflowService) {
}
public show() {
this.workflows = this.workflowService.getWorkflows();
+ // this.workflowService.getWorkflows().forEach((value, key, map) => {
+ // this.workflows.push({
+ // "planName": value.planName,
+ // "planId": key
+ // });
+ // });;
+
this.workflowsModal.show();
}
- public deleteWorkflow(workflow: Workflow) {
- this.workflowService.deleteWorkflow(workflow.name);
+ public deleteWorkflow(planId: number) {
+ this.workflowService.deleteWorkflow(planId);
}
public addWorkflow() {