You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2020/06/06 14:57:38 UTC

[incubator-streampipes] 01/02: [STREAMPIPES-145] Add pipeline handling

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch STREAMPIPES-145
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 1d4dcad20468d178ccd141e73483499f4b4ccb4f
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sat Jun 6 14:23:54 2020 +0200

    [STREAMPIPES-145] Add pipeline handling
---
 .../model/base/InvocableStreamPipesEntity.java     | 11 ++++++
 ui/package.json                                    |  1 -
 ui/src/app/core-model/gen/streampipes-model.ts     | 10 +++--
 .../pipeline-assembly.component.html               |  8 ++--
 .../components/pipeline/pipeline.component.html    |  2 +-
 .../components/pipeline/pipeline.component.ts      | 43 ++++++++++++----------
 ui/src/app/editor-v2/editor.module.ts              |  9 +----
 ui/src/app/editor-v2/model/editor.model.ts         |  4 +-
 ui/src/app/editor-v2/services/jsplumb.service.ts   |  2 +-
 .../services/object-provider.service.ts            | 26 +++++++------
 .../editor-v2/services/pipeline-editor.service.ts  |  8 ++--
 .../services/pipeline-positioning.service.ts       | 21 ++++++-----
 .../services/pipeline-validation.service.ts        |  9 +++--
 ui/src/app/services/services.module.ts             |  2 +-
 14 files changed, 87 insertions(+), 69 deletions(-)

diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/base/InvocableStreamPipesEntity.java b/streampipes-model/src/main/java/org/apache/streampipes/model/base/InvocableStreamPipesEntity.java
index 206e99b..08d4592 100644
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/base/InvocableStreamPipesEntity.java
+++ b/streampipes-model/src/main/java/org/apache/streampipes/model/base/InvocableStreamPipesEntity.java
@@ -82,6 +82,8 @@ public abstract class InvocableStreamPipesEntity extends NamedStreamPipesEntity
   //@RdfProperty(StreamPipes.PE_CONFIGURED)
   private boolean configured;
 
+  private boolean uncompleted;
+
   public InvocableStreamPipesEntity() {
     super();
   }
@@ -92,6 +94,7 @@ public abstract class InvocableStreamPipesEntity extends NamedStreamPipesEntity
     this.correspondingPipeline = other.getCorrespondingPipeline();
     this.inputStreams = new Cloner().streams(other.getInputStreams());
     this.configured = other.isConfigured();
+    this.uncompleted = other.isUncompleted();
     this.correspondingUser = other.getCorrespondingUser();
     if (other.getStreamRequirements() != null) {
       this.streamRequirements = new Cloner().streams(other.getStreamRequirements());
@@ -186,6 +189,14 @@ public abstract class InvocableStreamPipesEntity extends NamedStreamPipesEntity
     this.correspondingUser = correspondingUser;
   }
 
+  public boolean isUncompleted() {
+    return uncompleted;
+  }
+
+  public void setUncompleted(boolean uncompleted) {
+    this.uncompleted = uncompleted;
+  }
+
   //public Logger getLogger(Class clazz, PeConfig peConfig) {
   public Logger getLogger(Class clazz) {
     //	return LoggerFactory.getPeLogger(clazz, getCorrespondingPipeline(), getUri(), peConfig);
diff --git a/ui/package.json b/ui/package.json
index 176c836..195fcba 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -44,7 +44,6 @@
     "angular-clipboard": "1.4.2",
     "angular-cookies": "1.7.7",
     "angular-datatables": "0.6.2",
-    "angular-draggable-droppable": "4.4.6",
     "angular-gridster2": "8.3.0",
     "angular-loading-bar": "0.8.0",
     "angular-markdown-directive": "0.3.1",
diff --git a/ui/src/app/core-model/gen/streampipes-model.ts b/ui/src/app/core-model/gen/streampipes-model.ts
index d13d799..c6d9930 100644
--- a/ui/src/app/core-model/gen/streampipes-model.ts
+++ b/ui/src/app/core-model/gen/streampipes-model.ts
@@ -1,7 +1,7 @@
 /* tslint:disable */
 /* eslint-disable */
 // @ts-nocheck
-// Generated using typescript-generator version 2.23.603 on 2020-06-04 13:25:46.
+// Generated using typescript-generator version 2.23.603 on 2020-06-06 13:05:16.
 
 export class AbstractStreamPipesEntity {
     "@class": "org.apache.streampipes.model.base.NamedStreamPipesEntity" | "org.apache.streampipes.model.graph.DataSourceDescription" | "org.apache.streampipes.model.SpDataStream" | "org.apache.streampipes.model.SpDataSet" | "org.apache.streampipes.model.connect.grounding.ProtocolDescription" | "org.apache.streampipes.model.connect.adapter.AdapterDescription" | "org.apache.streampipes.model.connect.adapter.AdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.GenericAdap [...]
@@ -929,6 +929,7 @@ export class InvocableStreamPipesEntity extends NamedStreamPipesEntity {
     statusInfoSettings: ElementStatusInfoSettings;
     streamRequirements: SpDataStreamUnion[];
     supportedGrounding: EventGrounding;
+    uncompleted: boolean;
 
     static fromData(data: InvocableStreamPipesEntity, target?: InvocableStreamPipesEntity): InvocableStreamPipesEntity {
         if (!data) {
@@ -945,6 +946,7 @@ export class InvocableStreamPipesEntity extends NamedStreamPipesEntity {
         instance.correspondingUser = data.correspondingUser;
         instance.streamRequirements = __getCopyArrayFn(SpDataStream.fromDataUnion)(data.streamRequirements);
         instance.configured = data.configured;
+        instance.uncompleted = data.uncompleted;
         return instance;
     }
 
@@ -1522,9 +1524,9 @@ export class GenericAdapterSetDescription extends AdapterSetDescription implemen
         }
         const instance = target || new GenericAdapterSetDescription();
         super.fromData(data, instance);
-        instance.eventSchema = EventSchema.fromData(data.eventSchema);
         instance.protocolDescription = ProtocolDescription.fromData(data.protocolDescription);
         instance.formatDescription = FormatDescription.fromData(data.formatDescription);
+        instance.eventSchema = EventSchema.fromData(data.eventSchema);
         return instance;
     }
 }
@@ -1883,9 +1885,9 @@ export class PipelineTemplateDescription extends NamedStreamPipesEntity {
         const instance = target || new PipelineTemplateDescription();
         super.fromData(data, instance);
         instance.boundTo = __getCopyArrayFn(BoundPipelineElement.fromData)(data.boundTo);
-        instance.pipelineTemplateDescription = data.pipelineTemplateDescription;
-        instance.pipelineTemplateId = data.pipelineTemplateId;
         instance.pipelineTemplateName = data.pipelineTemplateName;
+        instance.pipelineTemplateId = data.pipelineTemplateId;
+        instance.pipelineTemplateDescription = data.pipelineTemplateDescription;
         return instance;
     }
 }
diff --git a/ui/src/app/editor-v2/components/pipeline-assembly/pipeline-assembly.component.html b/ui/src/app/editor-v2/components/pipeline-assembly/pipeline-assembly.component.html
index ddd04dc..97139e6 100644
--- a/ui/src/app/editor-v2/components/pipeline-assembly/pipeline-assembly.component.html
+++ b/ui/src/app/editor-v2/components/pipeline-assembly/pipeline-assembly.component.html
@@ -63,7 +63,7 @@
 <!--                </md-tooltip>-->
             </button>
             <div class="pipeline-cache-block">
-                <div ng-if="pipelineCached">All pipeline modifications saved.</div>
+                <div *ngIf="pipelineCached">All pipeline modifications saved.</div>
 <!--                <div ng-if="pipelineCacheRunning"><md-progress-circular-->
 <!--                        md-mode="indeterminate" class="pipeline-cache-progress"-->
 <!--                        md-diameter="10"></md-progress-circular>&nbsp;Saving pipeline-->
@@ -71,11 +71,11 @@
             </div>
             <span fxFlex></span>
             <div style="position:relative;">
-                <div *ngIf="!isPipelineAssemblyEmpty()" class="pipeline-validation-summary {{PipelineValidationService.errorMessages.length > 0 ? 'pipeline-validation-summary-error' : ''}}" ng-click="toggleErrorMessagesDisplayed()">
+                <div *ngIf="!isPipelineAssemblyEmpty()" class="pipeline-validation-summary {{PipelineValidationService.errorMessages.length > 0 ? 'pipeline-validation-summary-error' : ''}}" (click)="toggleErrorMessagesDisplayed()">
                     <div fxLayout="row" fxLayoutAlign="center center">
                         <div fxLayout="row" fxLayoutAlign="start center">
-                            <i class="material-icons" ng-if="PipelineValidationService.errorMessages.length > 0">notifications</i>
-                            <i class="material-icons" ng-if="PipelineValidationService.errorMessages.length === 0">done</i>
+                            <i class="material-icons" *ngIf="PipelineValidationService.errorMessages.length > 0">notifications</i>
+                            <i class="material-icons" *ngIf="PipelineValidationService.errorMessages.length === 0">done</i>
                         </div>
                         <div>
                             <span *ngIf="PipelineValidationService.errorMessages.length === 0">Pipeline ok</span>
diff --git a/ui/src/app/editor-v2/components/pipeline/pipeline.component.html b/ui/src/app/editor-v2/components/pipeline/pipeline.component.html
index 9579975..9cb66bb 100644
--- a/ui/src/app/editor-v2/components/pipeline/pipeline.component.html
+++ b/ui/src/app/editor-v2/components/pipeline/pipeline.component.html
@@ -17,7 +17,7 @@
   -->
 
 <div *ngFor="let pipelineElement of rawPipelineModel" style="width:100%;height:100%;z-index:1">
-    <div *ngIf="pipelineElement.settings.disabled == undefined || !pipelineElement.settings.disabled">
+    <div *ngIf="pipelineElement.settings.disabled == undefined || !pipelineElement.settings.disabled" style="width:100%;height:100%;z-index:1">
     <span id="{{pipelineElement.payload.dom}}" style="{{getElementCss(pipelineElement.settings)}}"
           (click)="updateOptionsClick(pipelineElement.payload.dom)" (mouseenter)="updateMouseover(pipelineElement.payload.dom)" (mouseleave)="updateMouseover('')">
         <span style="z-index:5;"
diff --git a/ui/src/app/editor-v2/components/pipeline/pipeline.component.ts b/ui/src/app/editor-v2/components/pipeline/pipeline.component.ts
index a2ab01c..192b8df 100644
--- a/ui/src/app/editor-v2/components/pipeline/pipeline.component.ts
+++ b/ui/src/app/editor-v2/components/pipeline/pipeline.component.ts
@@ -26,11 +26,13 @@ import {JsplumbBridge} from "../../services/jsplumb-bridge.service";
 import {ShepherdService} from "../../../services/tour/shepherd.service";
 import {Component, Input, OnInit} from "@angular/core";
 import {
+  InvocablePipelineElementUnion,
   PipelineElementConfig,
   PipelineElementHolder,
   PipelineElementUnion
 } from "../../model/editor.model";
-import {SpDataStream} from "../../../core-model/gen/streampipes-model";
+import {DataProcessorInvocation, SpDataStream} from "../../../core-model/gen/streampipes-model";
+import {ObjectProvider} from "../../services/object-provider.service";
 
 @Component({
   selector: 'pipeline',
@@ -64,7 +66,6 @@ export class PipelineComponent implements OnInit {
 
   DialogBuilder: any;
   plumbReady: any;
-  objectProvider: any;
   EditorDialogManager: any;
   currentMouseOverElement: any;
   currentPipelineModel: any;
@@ -77,6 +78,7 @@ export class PipelineComponent implements OnInit {
   constructor(private JsplumbService: JsplumbService,
               private PipelineEditorService: PipelineEditorService,
               private JsplumbBridge: JsplumbBridge,
+              private ObjectProvider: ObjectProvider,
               //DialogBuilder,
               //EditorDialogManager,
               // TransitionService,
@@ -242,15 +244,15 @@ export class PipelineComponent implements OnInit {
     this.JsplumbBridge.unbind("connection");
 
     this.JsplumbBridge.bind("connectionMoved", (info, originalEvent) => {
-      var pe = this.objectProvider.findElement(info.newTargetEndpoint.elementId, this.rawPipelineModel);
-      var oldPe = this.objectProvider.findElement(info.originalTargetEndpoint.elementId, this.rawPipelineModel);
-      oldPe.payload.configured = false;
-      pe.payload.configured = false;
+      var pe = this.ObjectProvider.findElement(info.newTargetEndpoint.elementId, this.rawPipelineModel);
+      var oldPe = this.ObjectProvider.findElement(info.originalTargetEndpoint.elementId, this.rawPipelineModel);
+      (oldPe.payload as InvocablePipelineElementUnion).configured = false;
+      (pe.payload as InvocablePipelineElementUnion).configured = false;
     });
 
     this.JsplumbBridge.bind("connectionDetached", (info, originalEvent) => {
-      var pe = this.objectProvider.findElement(info.targetEndpoint.elementId, this.rawPipelineModel);
-      pe.payload.configured = false;
+      var pe = this.ObjectProvider.findElement(info.targetEndpoint.elementId, this.rawPipelineModel);
+      (pe.payload as InvocablePipelineElementUnion).configured = false;
       pe.settings.openCustomize = true;
       info.targetEndpoint.setType("empty");
       this.validatePipeline();
@@ -273,11 +275,11 @@ export class PipelineComponent implements OnInit {
     })
 
     this.JsplumbBridge.bind("connection", (info, originalEvent) => {
-      var pe = this.objectProvider.findElement(info.target.id, this.rawPipelineModel);
+      var pe = this.ObjectProvider.findElement(info.target.id, this.rawPipelineModel);
       if (pe.settings.openCustomize) {
-        this.currentPipelineModel = this.objectProvider.makePipeline(this.rawPipelineModel);
+        this.currentPipelineModel = this.ObjectProvider.makePipeline(this.rawPipelineModel);
         pe.settings.loadingStatus = true;
-        this.objectProvider.updatePipeline(this.currentPipelineModel)
+        this.ObjectProvider.updatePipeline(this.currentPipelineModel)
             .then(msg => {
               let data = msg.data;
               pe.settings.loadingStatus = false;
@@ -287,16 +289,17 @@ export class PipelineComponent implements OnInit {
                 this.modifyPipeline(data.pipelineModifications);
                 var sourceEndpoint = this.JsplumbBridge.selectEndpoints({element: info.targetEndpoint.elementId});
                 if (this.PipelineEditorService.isFullyConnected(pe)) {
-                  if ((pe.payload.staticProperties && pe.payload.staticProperties.length > 0) || this.isCustomOutput(pe)) {
-                    this.EditorDialogManager.showCustomizeDialog($("#" +pe.payload.DOM), sourceEndpoint, pe.payload, false)
+                  let payload = pe.payload as InvocablePipelineElementUnion;
+                  if ((payload.staticProperties && payload.staticProperties.length > 0) || this.isCustomOutput(pe)) {
+                    this.EditorDialogManager.showCustomizeDialog($("#" +pe.payload.dom), sourceEndpoint, pe.payload, false)
                         .then(() => {
-                          this.JsplumbService.activateEndpoint(pe.payload.DOM, !pe.payload.uncompleted);
+                          this.JsplumbService.activateEndpoint(pe.payload.dom, !payload.uncompleted);
                         }, () => {
-                          this.JsplumbService.activateEndpoint(pe.payload.DOM, !pe.payload.uncompleted);
+                          this.JsplumbService.activateEndpoint(pe.payload.dom, !payload.uncompleted);
                         });
                   } else {
                     //this.$rootScope.$broadcast("SepaElementConfigured", pe.payload.DOM);
-                    pe.payload.configured = true;
+                    (pe.payload as InvocablePipelineElementUnion).configured = true;
                   }
                 }
               } else {
@@ -320,10 +323,10 @@ export class PipelineComponent implements OnInit {
     for (var i = 0, modification; modification = pipelineModifications[i]; i++) {
       var id = modification.domId;
       if (id !== "undefined") {
-        var pe = this.objectProvider.findElement(id, this.rawPipelineModel);
-        pe.payload.staticProperties = modification.staticProperties;
-        pe.payload.outputStrategies = modification.outputStrategies;
-        pe.payload.inputStreams = modification.inputStreams;
+        var pe = this.ObjectProvider.findElement(id, this.rawPipelineModel);
+        (pe.payload as InvocablePipelineElementUnion).staticProperties = modification.staticProperties;
+        (pe.payload as DataProcessorInvocation).outputStrategies = modification.outputStrategies;
+        (pe.payload as InvocablePipelineElementUnion).inputStreams = modification.inputStreams;
       }
     }
   }
diff --git a/ui/src/app/editor-v2/editor.module.ts b/ui/src/app/editor-v2/editor.module.ts
index 8d3a5b4..24499c0 100644
--- a/ui/src/app/editor-v2/editor.module.ts
+++ b/ui/src/app/editor-v2/editor.module.ts
@@ -39,11 +39,8 @@ import {JsplumbService} from "./services/jsplumb.service";
 import {JsplumbConfigService} from "./services/jsplumb-config.service";
 import {PipelineEditorService} from "./services/pipeline-editor.service";
 import {PipelineValidationService} from "./services/pipeline-validation.service";
-import {DragAndDropModule} from "angular-draggable-droppable";
 import {PipelineComponent} from "./components/pipeline/pipeline.component";
-import {DragDropModule} from "@angular/cdk/drag-drop";
-import {DragulaModule} from "ng2-dragula";
-
+import {ObjectProvider} from "./services/object-provider.service";
 
 @NgModule({
     imports: [
@@ -56,9 +53,6 @@ import {DragulaModule} from "ng2-dragula";
         CustomMaterialModule,
         FormsModule,
         ConnectModule,
-        DragAndDropModule,
-        DragDropModule,
-        DragulaModule
     ],
     declarations: [
         EditorComponent,
@@ -78,6 +72,7 @@ import {DragulaModule} from "ng2-dragula";
         JsplumbBridge,
         JsplumbService,
         JsplumbConfigService,
+        ObjectProvider,
         PipelineEditorService,
         PipelinePositioningService,
         PipelineValidationService,
diff --git a/ui/src/app/editor-v2/model/editor.model.ts b/ui/src/app/editor-v2/model/editor.model.ts
index fb302f4..025fbdc 100644
--- a/ui/src/app/editor-v2/model/editor.model.ts
+++ b/ui/src/app/editor-v2/model/editor.model.ts
@@ -51,4 +51,6 @@ export enum PipelineElementType {
   DataSink
 }
 
-export type PipelineElementUnion = SpDataSet | SpDataStream | DataProcessorInvocation | DataSinkInvocation;
\ No newline at end of file
+export type PipelineElementUnion = SpDataSet | SpDataStream | DataProcessorInvocation | DataSinkInvocation;
+
+export type InvocablePipelineElementUnion = DataProcessorInvocation | DataSinkInvocation;
\ No newline at end of file
diff --git a/ui/src/app/editor-v2/services/jsplumb.service.ts b/ui/src/app/editor-v2/services/jsplumb.service.ts
index 943e70e..79febe8 100644
--- a/ui/src/app/editor-v2/services/jsplumb.service.ts
+++ b/ui/src/app/editor-v2/services/jsplumb.service.ts
@@ -148,7 +148,7 @@ export class JsplumbService {
             .toCssShortHand(PipelineElementTypeUtils.fromType(pipelineElement))
         pipelineElementConfig.payload = pipelineElement;
         pipelineElementConfig.settings = {connectable: connectable,
-            openCustomize: (pipelineElement as any).configured,
+            openCustomize: !(pipelineElement as any).configured,
             preview: isPreview,
             disabled: false,
             loadingStatus: false,
diff --git a/ui/src/app/services/object-provider.service.ts b/ui/src/app/editor-v2/services/object-provider.service.ts
similarity index 81%
rename from ui/src/app/services/object-provider.service.ts
rename to ui/src/app/editor-v2/services/object-provider.service.ts
index 18d84ad..784c930 100644
--- a/ui/src/app/services/object-provider.service.ts
+++ b/ui/src/app/editor-v2/services/object-provider.service.ts
@@ -17,13 +17,16 @@
  */
 
 import * as angular from 'angular';
+import {Injectable} from "@angular/core";
+import {RestApi} from "../../services/rest-api.service";
+import {JsplumbBridge} from "./jsplumb-bridge.service";
+import {PipelineElementConfig} from "../model/editor.model";
 
 declare const jsPlumb: any;
 
+@Injectable()
 export class ObjectProvider {
 
-    RestApi: any;
-    JsplumbBridge: any;
     ImageChecker: any;
     adjustingPipelineState: any;
     plumbReady: any;
@@ -34,9 +37,8 @@ export class ObjectProvider {
     //this.currentPipeline = new this.Pipeline();
     adjustingPipeline: any;
 
-    constructor(RestApi, JsplumbBridge) {
-        this.RestApi = RestApi;
-        this.JsplumbBridge = JsplumbBridge;
+    constructor(private RestApi: RestApi,
+                private JsplumbBridge: JsplumbBridge) {
     }
 
     prepareElement(json) {
@@ -65,24 +67,24 @@ export class ObjectProvider {
         return pipeline;
     }
 
-    findElement(elementId, currentPipeline) {
-        var result = {};
-        angular.forEach(currentPipeline, pe => {
-            if (pe.payload.DOM === elementId) {
+    findElement(elementId, rawPipelineModel: PipelineElementConfig[]): PipelineElementConfig {
+        let result = {} as PipelineElementConfig;
+        angular.forEach(rawPipelineModel, pe => {
+            if (pe.payload.dom === elementId) {
                 result = pe;
             }
         });
         return result;
     }
 
-    addElementNew(pipeline, currentPipelineElements) {
+    addElementNew(pipeline, currentPipelineElements: PipelineElementConfig[]) {
         currentPipelineElements.forEach(pe => {
             if (pe.settings.disabled == undefined || !pe.settings.disabled) {
                 if (pe.type === 'sepa' || pe.type === 'action') {
                     var payload = pe.payload;
                     payload = this.prepareElement(payload);
                     var connections = this.JsplumbBridge.getConnections({
-                        target: $("#" + payload.DOM)
+                        target: $("#" + payload.dom)
                     });
                     for (var i = 0; i < connections.length; i++) {
                         payload.connectedTo.push(connections[i].sourceId);
@@ -121,4 +123,4 @@ export class ObjectProvider {
 
 }
 
-ObjectProvider.$inject = ['RestApi', 'JsplumbBridge'];
+//ObjectProvider.$inject = ['RestApi', 'JsplumbBridge'];
diff --git a/ui/src/app/editor-v2/services/pipeline-editor.service.ts b/ui/src/app/editor-v2/services/pipeline-editor.service.ts
index 2d2b3a3..c630e14 100644
--- a/ui/src/app/editor-v2/services/pipeline-editor.service.ts
+++ b/ui/src/app/editor-v2/services/pipeline-editor.service.ts
@@ -18,6 +18,7 @@
 
 import {Injectable} from "@angular/core";
 import {JsplumbBridge} from "./jsplumb-bridge.service";
+import {InvocablePipelineElementUnion, PipelineElementConfig} from "../model/editor.model";
 
 @Injectable()
 export class PipelineEditorService {
@@ -42,9 +43,10 @@ export class PipelineEditorService {
         return true;
     }
 
-    isFullyConnected(json) {
-        return json.payload.inputStreams == null ||
-            this.JsplumbBridge.getConnections({target: $("#" +json.payload.DOM)}).length == json.payload.inputStreams.length;
+    isFullyConnected(pipelineElementConfig: PipelineElementConfig) {
+        let payload = pipelineElementConfig.payload as InvocablePipelineElementUnion;
+        return payload.inputStreams == null ||
+            this.JsplumbBridge.getConnections({target: $("#" +payload.dom)}).length == payload.inputStreams.length;
     }
 
     getDropPositionY(helper, currentZoomLevel) {
diff --git a/ui/src/app/editor-v2/services/pipeline-positioning.service.ts b/ui/src/app/editor-v2/services/pipeline-positioning.service.ts
index 6f7b845..206daf0 100644
--- a/ui/src/app/editor-v2/services/pipeline-positioning.service.ts
+++ b/ui/src/app/editor-v2/services/pipeline-positioning.service.ts
@@ -22,6 +22,7 @@ import {JsplumbBridge} from "./jsplumb-bridge.service";
 import {JsplumbConfigService} from "./jsplumb-config.service";
 import {JsplumbService} from "./jsplumb.service";
 import {Inject, Injectable} from "@angular/core";
+import {PipelineElementConfig} from "../model/editor.model";
 
 declare const jsPlumb: any;
 
@@ -34,20 +35,20 @@ export class PipelinePositioningService {
                 private JsplumbBridge: JsplumbBridge) {
     }
 
-    displayPipeline(rawPipelineModel, targetCanvas, isPreview, autoLayout) {
+    displayPipeline(rawPipelineModel: PipelineElementConfig[], targetCanvas, isPreview, autoLayout) {
         var jsplumbConfig = isPreview ? this.JsplumbConfigService.getPreviewConfig() : this.JsplumbConfigService.getEditorConfig();
 
         for (var i = 0; i < rawPipelineModel.length; i++) {
             var currentPe = rawPipelineModel[i];
             if (!currentPe.settings.disabled) {
                 if (currentPe.type === "stream") {
-                    this.JsplumbService.streamDropped(currentPe.payload.DOM, currentPe.payload, true, isPreview);
+                    this.JsplumbService.streamDropped(currentPe.payload.dom, currentPe.payload, true, isPreview);
                 }
                 if (currentPe.type === "sepa") {
-                    this.JsplumbService.sepaDropped(currentPe.payload.DOM, currentPe.payload, true, isPreview);
+                    this.JsplumbService.sepaDropped(currentPe.payload.dom, currentPe.payload, true, isPreview);
                 }
                 if (currentPe.type === "action") {
-                    this.JsplumbService.actionDropped(currentPe.payload.DOM, currentPe.payload, true, isPreview);
+                    this.JsplumbService.actionDropped(currentPe.payload.dom, currentPe.payload, true, isPreview);
                 }
             }
         }
@@ -83,18 +84,18 @@ export class PipelinePositioningService {
         });
     }
 
-    connectPipelineElements(json, detachable, jsplumbConfig) {
+    connectPipelineElements(rawPipelineModel: PipelineElementConfig[], detachable, jsplumbConfig) {
         var source, target;
 
         this.JsplumbBridge.setSuspendDrawing(true);
-        for (var i = 0; i < json.length; i++) {
-            var pe = json[i];
+        for (var i = 0; i < rawPipelineModel.length; i++) {
+            var pe = rawPipelineModel[i];
 
             if (pe.type == "sepa") {
                 if (pe.payload.connectedTo) {
                     for (var j = 0, connection; connection = pe.payload.connectedTo[j]; j++) {
                         source = connection;
-                        target = pe.payload.DOM;
+                        target = pe.payload.dom;
 
                         var options;
                         var id = "#" + source;
@@ -105,14 +106,14 @@ export class PipelinePositioningService {
                         }
 
                         let sourceEndpointId = "out-" + connection;
-                        let targetEndpointId = "in-" + j + "-" + pe.payload.DOM;
+                        let targetEndpointId = "in-" + j + "-" + pe.payload.dom;
                         this.JsplumbBridge.connect(
                             {uuids: [sourceEndpointId, targetEndpointId], detachable: detachable}
                         );
                     }
                 }
             } else if (pe.type == "action") {
-                target = pe.payload.DOM;
+                target = pe.payload.dom;
 
                 if (pe.payload.connectedTo) {
                     for (var j = 0, connection; connection = pe.payload.connectedTo[j]; j++) {
diff --git a/ui/src/app/editor-v2/services/pipeline-validation.service.ts b/ui/src/app/editor-v2/services/pipeline-validation.service.ts
index a97200e..59901c5 100644
--- a/ui/src/app/editor-v2/services/pipeline-validation.service.ts
+++ b/ui/src/app/editor-v2/services/pipeline-validation.service.ts
@@ -20,6 +20,7 @@ import * as angular from 'angular';
 import * as dagre from 'dagre';
 import {JsplumbBridge} from "./jsplumb-bridge.service";
 import {Injectable} from "@angular/core";
+import {PipelineElementConfig} from "../model/editor.model";
 
 @Injectable()
 export class PipelineValidationService {
@@ -109,7 +110,7 @@ export class PipelineValidationService {
         return tarjan.length == 1;
     }
 
-    isInAssembly(rawPipelineModel, type) {
+    isInAssembly(rawPipelineModel: PipelineElementConfig[], type) {
         var isElementInAssembly = false;
         angular.forEach(rawPipelineModel, pe => {
             if (pe.type === type && !pe.settings.disabled) {
@@ -119,7 +120,7 @@ export class PipelineValidationService {
         return isElementInAssembly;
     }
 
-    makeGraph(rawPipelineModel) {
+    makeGraph(rawPipelineModel: PipelineElementConfig[]) {
         var g = new dagre.graphlib.Graph();
         g.setGraph({rankdir: "LR"});
         g.setDefaultEdgeLabel(function () {
@@ -148,10 +149,10 @@ export class PipelineValidationService {
         return g;
     }
 
-    getElementOptions(id, rawPipelineModel) {
+    getElementOptions(id, rawPipelineModel: PipelineElementConfig[]) {
         var pipelineElement;
         rawPipelineModel.forEach(pe => {
-           if (pe.payload.DOM === id) {
+           if (pe.payload.dom === id) {
                pipelineElement = pe;
            }
         });
diff --git a/ui/src/app/services/services.module.ts b/ui/src/app/services/services.module.ts
index 98652a2..ed30f67 100644
--- a/ui/src/app/services/services.module.ts
+++ b/ui/src/app/services/services.module.ts
@@ -37,7 +37,7 @@ import {MeasurementUnits} from './measurement-units.service'
 import {DeploymentService} from './deployment.service'
 import {JsplumbConfigService} from '../editor-v2/services/jsplumb-config.service'
 import {PipelineElementIconService} from './pipeline-icon.service'
-import {ObjectProvider} from './object-provider.service'
+import {ObjectProvider} from '../editor-v2/services/object-provider.service'
 import {downgradeInjectable} from '@angular/upgrade/static';
 import {TransitionService} from "./transition.service";
 import {ShepherdService} from "./tour/shepherd.service";