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

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


The following commit(s) were added to refs/heads/STREAMPIPES-145 by this push:
     new f500ca2  Fix load empty pipeline cache
f500ca2 is described below

commit f500ca2ace79c2e10399989b330e4d983e2624b8
Author: Philipp Zehnder <[email protected]>
AuthorDate: Thu Jul 30 22:50:53 2020 +0200

    Fix load empty pipeline cache
---
 .idea/runConfigurations/Apache_StreamPipes___Core.xml | 4 ++++
 ui/src/app/editor-v2/services/editor.service.ts       | 9 ++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/.idea/runConfigurations/Apache_StreamPipes___Core.xml 
b/.idea/runConfigurations/Apache_StreamPipes___Core.xml
index aa91de0..765372e 100644
--- a/.idea/runConfigurations/Apache_StreamPipes___Core.xml
+++ b/.idea/runConfigurations/Apache_StreamPipes___Core.xml
@@ -10,6 +10,10 @@
     </envs>
     <option name="MAIN_CLASS_NAME" 
value="org.apache.streampipes.backend.StreamPipesBackendApplication" />
     <module name="streampipes-backend" />
+    <extension name="net.ashald.envfile">
+      <option name="IS_ENABLED" value="false" />
+      <ENTRIES />
+    </extension>
     <method v="2">
       <option name="Make" enabled="true" />
     </method>
diff --git a/ui/src/app/editor-v2/services/editor.service.ts 
b/ui/src/app/editor-v2/services/editor.service.ts
index f8aa36c..7e3cbab 100644
--- a/ui/src/app/editor-v2/services/editor.service.ts
+++ b/ui/src/app/editor-v2/services/editor.service.ts
@@ -58,12 +58,15 @@ export class EditorService {
     }
 
     getCachedPipeline(): Observable<PipelineElementConfig[]> {
-        return this.http.get(this.platformServicesCommons.authUserBasePath() + 
"/pipeline-cache")
+        return this.http.get(this.platformServicesCommons.authUserBasePath() + 
'/pipeline-cache')
             .pipe(map(result => {
-              console.log(result);
-                let configs: PipelineElementConfig[] = result as 
PipelineElementConfig[];
+              if (result === null) {
+                return [];
+              } else {
+                const configs: PipelineElementConfig[] = result as 
PipelineElementConfig[];
                 configs.map(config => config.payload = 
this.convert(config.payload));
                 return configs;
+              }
             }));
     }
 

Reply via email to