aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/app.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/app.component.ts')
-rw-r--r--sdc-workflow-designer-ui/src/app/app.component.ts20
1 files changed, 15 insertions, 5 deletions
diff --git a/sdc-workflow-designer-ui/src/app/app.component.ts b/sdc-workflow-designer-ui/src/app/app.component.ts
index b02ce675..59b457f9 100644
--- a/sdc-workflow-designer-ui/src/app/app.component.ts
+++ b/sdc-workflow-designer-ui/src/app/app.component.ts
@@ -10,21 +10,31 @@
* ZTE - initial API and implementation and/or initial documentation
*/
-import { Component, AfterViewInit } from '@angular/core';
+import { Component, AfterViewInit, OnInit } from '@angular/core';
import { JsPlumbService } from "./services/jsplumb.service";
import { WorkflowService } from "./services/workflow.service";
import { WorkflowNode } from "./model/workflow-node";
+import { Workflow } from "./model/workflow";
+import { DataAccessService } from "./services/data-access/data-access.service";
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
-export class AppComponent implements AfterViewInit {
- constructor(private jsplumbService: JsPlumbService, private workflowService: WorkflowService) {}
+export class AppComponent implements AfterViewInit, OnInit {
+ constructor(private jsplumbService: JsPlumbService,
+ private dataAccessService: DataAccessService,
+ private workflowService: WorkflowService) {}
- public getNodes(): WorkflowNode[] {
- return this.workflowService.getNodes();
+ ngOnInit(): void {
+ this.dataAccessService.catalogService.loadWorkflow('workflow1').subscribe(workflow => {
+ this.workflowService.workflow = workflow;
+ });
+ }
+
+ public getWorkflow(): Workflow {
+ return this.workflowService.workflow;
}
ngAfterViewInit(): void {