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/07/16 21:05:54 UTC
[incubator-streampipes] branch STREAMPIPES-145 updated (6571665 ->
85f35de)
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a change to branch STREAMPIPES-145
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git.
from 6571665 [STREAMPIPES-145] Migrate user-defined output strategy
new 3791c49 [STREAMPIPES-145] Restrict output strategy rendering to customizable output strategies
new 85f35de [STREAMPIPES-145] Fix bug in pipeline element cache
The 2 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:
.../output-strategy/output-strategy.component.html | 2 +-
.../output-strategy/output-strategy.component.ts | 4 +++
.../pipeline-assembly.component.ts | 2 +-
ui/src/app/editor-v2/services/editor.service.ts | 29 ++++++++++++++++++----
4 files changed, 30 insertions(+), 7 deletions(-)
[incubator-streampipes] 02/02: [STREAMPIPES-145] Fix bug in
pipeline element cache
Posted by ri...@apache.org.
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 85f35decd8c89cb429f82f678d9f6be1296895fb
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Thu Jul 16 23:05:36 2020 +0200
[STREAMPIPES-145] Fix bug in pipeline element cache
---
.../pipeline-assembly.component.ts | 2 +-
ui/src/app/editor-v2/services/editor.service.ts | 29 ++++++++++++++++++----
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/ui/src/app/editor-v2/components/pipeline-assembly/pipeline-assembly.component.ts b/ui/src/app/editor-v2/components/pipeline-assembly/pipeline-assembly.component.ts
index 384b7ec..4c9333f 100644
--- a/ui/src/app/editor-v2/components/pipeline-assembly/pipeline-assembly.component.ts
+++ b/ui/src/app/editor-v2/components/pipeline-assembly/pipeline-assembly.component.ts
@@ -214,7 +214,7 @@ export class PipelineAssemblyComponent implements OnInit {
checkAndDisplayCachedPipeline() {
this.EditorService.getCachedPipeline().subscribe(msg => {
if (msg) {
- this.rawPipelineModel = msg as any;
+ this.rawPipelineModel = msg;
this.displayPipelineInEditor(true);
}
});
diff --git a/ui/src/app/editor-v2/services/editor.service.ts b/ui/src/app/editor-v2/services/editor.service.ts
index 5703c65..0b4218a 100644
--- a/ui/src/app/editor-v2/services/editor.service.ts
+++ b/ui/src/app/editor-v2/services/editor.service.ts
@@ -19,15 +19,17 @@
import {Injectable} from "@angular/core";
import {HttpClient} from "@angular/common/http";
import {
- PipelineElementRecommendationMessage,
- PipelineModificationMessage
+ DataProcessorInvocation, DataSinkInvocation,
+ PipelineElementRecommendationMessage,
+ PipelineModificationMessage, SpDataSet, SpDataStream
} from "../../core-model/gen/streampipes-model";
import {Observable, Subject} from "rxjs";
import {PlatformServicesCommons} from "../../platform-services/apis/commons.service";
-import {PipelineElementUnion} from "../model/editor.model";
+import {PipelineElementConfig, PipelineElementUnion} from "../model/editor.model";
import {PanelType} from "../../core-ui/dialog/base-dialog/base-dialog.model";
import {DialogService} from "../../core-ui/dialog/base-dialog/base-dialog.service";
import {HelpComponent} from "../dialog/help/help.component";
+import {map} from "rxjs/operators";
@Injectable()
export class EditorService {
@@ -55,8 +57,25 @@ export class EditorService {
});
}
- getCachedPipeline() {
- return this.http.get(this.platformServicesCommons.authUserBasePath() + "/pipeline-cache");
+ getCachedPipeline(): Observable<PipelineElementConfig[]> {
+ return this.http.get(this.platformServicesCommons.authUserBasePath() + "/pipeline-cache")
+ .pipe(map(result => {
+ let configs: PipelineElementConfig[] = result as PipelineElementConfig[];
+ configs.map(config => config.payload = this.convert(config.payload));
+ return configs;
+ }));
+ }
+
+ convert(payload: any) {
+ if (payload['@class'] === "org.apache.streampipes.model.SpDataSet") {
+ return SpDataSet.fromData(payload as SpDataSet);
+ } else if (payload['@class'] === "org.apache.streampipes.model.SpDataStream") {
+ return SpDataStream.fromData(payload as SpDataStream);
+ } else if (payload['@class'] === "org.apache.streampipes.model.graph.DataProcessorInvocation") {
+ return DataProcessorInvocation.fromData(payload as DataProcessorInvocation);
+ } else {
+ return DataSinkInvocation.fromData(payload as DataSinkInvocation);
+ }
}
getEpCategories() {
[incubator-streampipes] 01/02: [STREAMPIPES-145] Restrict output
strategy rendering to customizable output strategies
Posted by ri...@apache.org.
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 3791c49c30d1d31eeffe8508534bf81c53a292c7
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Thu Jul 16 22:37:09 2020 +0200
[STREAMPIPES-145] Restrict output strategy rendering to customizable output strategies
---
.../components/output-strategy/output-strategy.component.html | 2 +-
.../editor-v2/components/output-strategy/output-strategy.component.ts | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ui/src/app/editor-v2/components/output-strategy/output-strategy.component.html b/ui/src/app/editor-v2/components/output-strategy/output-strategy.component.html
index 9e7a6c3..0db80dc 100644
--- a/ui/src/app/editor-v2/components/output-strategy/output-strategy.component.html
+++ b/ui/src/app/editor-v2/components/output-strategy/output-strategy.component.html
@@ -16,7 +16,7 @@
~
-->
-<div fxFlex="100" fxLayout="column">
+<div fxFlex="100" fxLayout="column" *ngIf="customizableOutputStrategy">
<div fxFlex="100" fxLayout="row" class="static-property-panel">
<div fxFlex="30" fxLayout="column">
<b>Select output</b>
diff --git a/ui/src/app/editor-v2/components/output-strategy/output-strategy.component.ts b/ui/src/app/editor-v2/components/output-strategy/output-strategy.component.ts
index 2f6f298..db33b0f 100644
--- a/ui/src/app/editor-v2/components/output-strategy/output-strategy.component.ts
+++ b/ui/src/app/editor-v2/components/output-strategy/output-strategy.component.ts
@@ -41,6 +41,10 @@ export class OutputStrategyComponent implements OnInit {
label: string;
+ customizableOutputStrategy: boolean;
+
ngOnInit(): void {
+ this.customizableOutputStrategy = this.outputStrategy['@class'] === 'org.apache.streampipes.model.output.CustomOutputStrategy' ||
+ this.outputStrategy['@class'] === 'org.apache.streampipes.model.output.UserDefinedOutputStrategy';
}
}
\ No newline at end of file