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/08/18 19:58:11 UTC

[incubator-streampipes] branch STREAMPIPES-193 updated (a850854 -> 18bc42e)

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

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


    from a850854  [STREAMPIPES-193] display version info in toolbar
     new ca2b011  [hotfix] Remove pipeline from cache after storage
     new 57ca59c  [hotfix] Pipeline validation also catches unconfigured pipeline elements
     new 18bc42e  Merge branch 'STREAMPIPES-193' of github.com:apache/incubator-streampipes into STREAMPIPES-193

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../components/pipeline/pipeline.component.ts      |  1 +
 .../save-pipeline/save-pipeline.component.ts       |  2 +-
 .../editor/services/pipeline-validation.service.ts | 22 ++++++++++++++++++----
 3 files changed, 20 insertions(+), 5 deletions(-)


[incubator-streampipes] 02/03: [hotfix] Pipeline validation also catches unconfigured pipeline elements

Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 57ca59ce6d88504fac99181a18d272f7f3546802
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Tue Aug 18 21:57:22 2020 +0200

    [hotfix] Pipeline validation also catches unconfigured pipeline elements
---
 .../components/pipeline/pipeline.component.ts      |  1 +
 .../editor/services/pipeline-validation.service.ts | 22 ++++++++++++++++++----
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/ui/src/app/editor/components/pipeline/pipeline.component.ts b/ui/src/app/editor/components/pipeline/pipeline.component.ts
index e0f76d4..77ee4ba 100644
--- a/ui/src/app/editor/components/pipeline/pipeline.component.ts
+++ b/ui/src/app/editor/components/pipeline/pipeline.component.ts
@@ -384,6 +384,7 @@ export class PipelineComponent implements OnInit {
         this.JsplumbBridge.getSourceEndpoint(pipelineElementInfo.b.payload.dom).setType("token");
         this.triggerPipelineCacheUpdate();
       }
+      this.validatePipeline();
     });
   }
 
diff --git a/ui/src/app/editor/services/pipeline-validation.service.ts b/ui/src/app/editor/services/pipeline-validation.service.ts
index 9095115..53f7bb3 100644
--- a/ui/src/app/editor/services/pipeline-validation.service.ts
+++ b/ui/src/app/editor/services/pipeline-validation.service.ts
@@ -20,6 +20,7 @@ import * as dagre from 'dagre';
 import {JsplumbBridge} from "./jsplumb-bridge.service";
 import {Injectable} from "@angular/core";
 import {PipelineElementConfig} from "../model/editor.model";
+import {DataProcessorInvocation, DataSinkInvocation} from "../../core-model/gen/streampipes-model";
 
 @Injectable()
 export class PipelineValidationService {
@@ -31,7 +32,8 @@ export class PipelineValidationService {
         {title: "Did you add a data stream?", content: "Any pipeline needs at least one data stream."},
         {title: "Did you add a data sink?", content: "Any pipeline needs at least one data sink."},
         {title: "Did you connect all elements?", content: "No orphaned elements are allowed within a pipeline, make sure to connect all elements."},
-        {title: "Separate pipelines", content: "It seems you've created more than one pipeline at once. Create only one pipeline at a time!"}
+        {title: "Separate pipelines", content: "It seems you've created more than one pipeline at once. Create only one pipeline at a time!"},
+        {title: "Did you configure all elements?", content: "There's a pipeline element which is missing some configuration."},
     ];
 
     constructor(private JsplumbBridge: JsplumbBridge) {
@@ -43,9 +45,11 @@ export class PipelineValidationService {
         let actionInAssembly = this.isActionInAssembly(rawPipelineModel);
         let allElementsConnected = true;
         let onlyOnePipelineCreated = true;
+        let allElementsConfigured = true;
 
         if (streamInAssembly && (sepaInAssembly || actionInAssembly)) {
             allElementsConnected = this.allElementsConnected(rawPipelineModel);
+            allElementsConfigured = this.allElementsConfigured(rawPipelineModel);
         }
 
         if (streamInAssembly && actionInAssembly && allElementsConnected) {
@@ -53,12 +57,13 @@ export class PipelineValidationService {
         }
 
         if (!this.isEmptyPipeline(rawPipelineModel)) {
-            this.buildErrorMessages(streamInAssembly, actionInAssembly, allElementsConnected, onlyOnePipelineCreated);
+            this.buildErrorMessages(streamInAssembly, actionInAssembly, allElementsConnected, onlyOnePipelineCreated, allElementsConfigured);
         } else {
             this.errorMessages = [];
         }
 
-        this.pipelineValid = streamInAssembly && actionInAssembly && allElementsConnected && onlyOnePipelineCreated;
+        this.pipelineValid = streamInAssembly && actionInAssembly &&
+            allElementsConnected && onlyOnePipelineCreated && allElementsConfigured;
         return this.pipelineValid;
     }
 
@@ -66,7 +71,7 @@ export class PipelineValidationService {
         return !this.isActionInAssembly(rawPipelineModel) && !this.isStreamInAssembly(rawPipelineModel) && !this.isInAssembly(rawPipelineModel, 'sepa');
     }
 
-    buildErrorMessages(streamInAssembly, actionInAssembly, allElementsConnected, onlyOnePipelineCreated) {
+    buildErrorMessages(streamInAssembly, actionInAssembly, allElementsConnected, onlyOnePipelineCreated, allElementsConfigured) {
         this.errorMessages = [];
         if (!streamInAssembly) {
             this.errorMessages.push(this.availableErrorMessages[0]);
@@ -80,6 +85,15 @@ export class PipelineValidationService {
         if (!onlyOnePipelineCreated) {
             this.errorMessages.push(this.availableErrorMessages[3]);
         }
+        if (!allElementsConfigured) {
+            this.errorMessages.push(this.availableErrorMessages[4]);
+        }
+    }
+
+    allElementsConfigured(rawPipelineModel: PipelineElementConfig[]): boolean {
+        return rawPipelineModel
+            .filter(config => ((config.payload instanceof DataProcessorInvocation) || (config.payload instanceof DataSinkInvocation)))
+            .every(config => config.settings.completed);
     }
 
     allElementsConnected(rawPipelineModel) {


[incubator-streampipes] 01/03: [hotfix] Remove pipeline from cache after storage

Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ca2b01123b33bf8f6e8d190671d32b7c60121a9b
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Tue Aug 18 21:42:56 2020 +0200

    [hotfix] Remove pipeline from cache after storage
---
 ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.ts b/ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.ts
index 583666b..2c3142e 100644
--- a/ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.ts
+++ b/ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.ts
@@ -136,7 +136,7 @@ export class SavePipelineComponent implements OnInit {
     this.displaySuccess(data);
     this.hide();
     this.editorService.makePipelineAssemblyEmpty(true);
-    this.editorService.removePipelineFromCache();
+    this.editorService.removePipelineFromCache().subscribe();
     if (this.ShepherdService.isTourActive()) {
       this.ShepherdService.hideCurrentStep();
     }


[incubator-streampipes] 03/03: Merge branch 'STREAMPIPES-193' of github.com:apache/incubator-streampipes into STREAMPIPES-193

Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 18bc42e7c78e1bdea99e79bae8ebff1eb3e72af2
Merge: 57ca59c a850854
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Tue Aug 18 21:57:48 2020 +0200

    Merge branch 'STREAMPIPES-193' of github.com:apache/incubator-streampipes into STREAMPIPES-193

 .../core/components/toolbar/toolbar.component.html |  3 ++
 .../core/components/toolbar/toolbar.component.ts   |  9 ++++
 ui/src/app/home/home.component.html                |  2 +-
 ui/src/app/info/info.component.ts                  |  1 -
 ui/src/app/info/info.module.ts                     |  5 +-
 .../info/versions/service/version-info.service.ts  | 55 ----------------------
 ui/src/app/info/versions/versions.component.ts     | 12 ++---
 ui/src/app/services/rest-api.service.ts            |  8 ++++
 8 files changed, 28 insertions(+), 67 deletions(-)