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

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new bcdb18c15c chore: Remove remainings of pipeline category feature 
(#2967)
bcdb18c15c is described below

commit bcdb18c15ca08abcf9a65cb5ca8105e607fb9eff
Author: Dominik Riemer <[email protected]>
AuthorDate: Thu Jun 27 18:42:33 2024 +0200

    chore: Remove remainings of pipeline category feature (#2967)
    
    * chore: Remove remainings of pipeline category feature
    
    * Merge typescript model
    
    * Remove remaining usages of PipelineCategory
    
    * Fix pipeline overview
---
 .../streampipes/model/pipeline/Pipeline.java       | 12 ----
 .../model/pipeline/PipelineCategory.java           | 81 ----------------------
 .../streampipes/rest/impl/PipelineCategory.java    | 77 --------------------
 .../streampipes/rest/impl/PipelineResource.java    |  1 -
 .../streampipes/storage/api/INoSqlStorage.java     |  2 -
 .../storage/api/IPipelineCategoryStorage.java      | 33 ---------
 .../storage/couchdb/CouchDbStorageManager.java     |  7 --
 .../couchdb/impl/PipelineCategoryStorageImpl.java  | 49 -------------
 .../src/lib/apis/pipeline.service.ts               | 26 +------
 .../src/lib/model/gen/streampipes-model.ts         | 28 +-------
 .../save-pipeline/save-pipeline.component.ts       | 18 +----
 .../pipeline-overview.component.html               |  4 +-
 .../pipeline-overview.component.ts                 | 32 +--------
 .../start-all-pipelines-dialog.component.ts        | 22 +-----
 ui/src/app/pipelines/pipelines.component.html      |  1 -
 ui/src/app/pipelines/pipelines.component.ts        | 26 +------
 16 files changed, 11 insertions(+), 408 deletions(-)

diff --git 
a/streampipes-model/src/main/java/org/apache/streampipes/model/pipeline/Pipeline.java
 
b/streampipes-model/src/main/java/org/apache/streampipes/model/pipeline/Pipeline.java
index 7055ca29aa..169ae4174e 100644
--- 
a/streampipes-model/src/main/java/org/apache/streampipes/model/pipeline/Pipeline.java
+++ 
b/streampipes-model/src/main/java/org/apache/streampipes/model/pipeline/Pipeline.java
@@ -42,8 +42,6 @@ public class Pipeline extends ElementComposition {
   private boolean publicElement;
 
   private String createdByUser;
-
-  private List<String> pipelineCategories;
   private List<String> pipelineNotifications;
 
   private PipelineHealthStatus healthStatus;
@@ -60,7 +58,6 @@ public class Pipeline extends ElementComposition {
     super();
     this.actions = new ArrayList<>();
     this.pipelineNotifications = new ArrayList<>();
-    this.pipelineCategories = new ArrayList<>();
   }
 
   public List<DataSinkInvocation> getActions() {
@@ -120,14 +117,6 @@ public class Pipeline extends ElementComposition {
     this.rev = rev;
   }
 
-  public List<String> getPipelineCategories() {
-    return pipelineCategories;
-  }
-
-  public void setPipelineCategories(List<String> pipelineCategories) {
-    this.pipelineCategories = pipelineCategories;
-  }
-
   public long getCreatedAt() {
     return createdAt;
   }
@@ -176,7 +165,6 @@ public class Pipeline extends ElementComposition {
     pipeline.setStreams(streams);
     pipeline.setActions(actions);
     pipeline.setCreatedByUser(createdByUser);
-    pipeline.setPipelineCategories(pipelineCategories);
     pipeline.setCreatedAt(createdAt);
     pipeline.setPipelineId(pipelineId);
     pipeline.setHealthStatus(healthStatus);
diff --git 
a/streampipes-model/src/main/java/org/apache/streampipes/model/pipeline/PipelineCategory.java
 
b/streampipes-model/src/main/java/org/apache/streampipes/model/pipeline/PipelineCategory.java
deleted file mode 100644
index 95dd7d618a..0000000000
--- 
a/streampipes-model/src/main/java/org/apache/streampipes/model/pipeline/PipelineCategory.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.model.pipeline;
-
-import org.apache.streampipes.model.shared.annotation.TsModel;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.google.gson.annotations.SerializedName;
-
-@TsModel
-public class PipelineCategory {
-
-  private String categoryName;
-  private String categoryDescription;
-
-  @JsonProperty("_id")
-  private @SerializedName("_id") String categoryId;
-
-  @JsonProperty("_rev")
-  private @SerializedName("_rev") String rev;
-
-  public PipelineCategory() {
-
-  }
-
-  public PipelineCategory(String categoryName, String categoryDescription) {
-    super();
-    this.categoryName = categoryName;
-    this.categoryDescription = categoryDescription;
-  }
-
-  public String getCategoryName() {
-    return categoryName;
-  }
-
-  public void setCategoryName(String categoryName) {
-    this.categoryName = categoryName;
-  }
-
-  public String getCategoryDescription() {
-    return categoryDescription;
-  }
-
-  public void setCategoryDescription(String categoryDescription) {
-    this.categoryDescription = categoryDescription;
-  }
-
-  public String getCategoryId() {
-    return categoryId;
-  }
-
-  public void setCategoryId(String categoryId) {
-    this.categoryId = categoryId;
-  }
-
-  public String getRev() {
-    return rev;
-  }
-
-  public void setRev(String rev) {
-    this.rev = rev;
-  }
-
-
-}
diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineCategory.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineCategory.java
deleted file mode 100644
index 4ef3a6dde8..0000000000
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineCategory.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.rest.impl;
-
-import org.apache.streampipes.model.message.Message;
-import org.apache.streampipes.model.message.Notifications;
-import org.apache.streampipes.rest.core.base.impl.AbstractRestResource;
-import org.apache.streampipes.storage.api.IPipelineCategoryStorage;
-
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-@RestController
-@RequestMapping("/api/v2/pipelinecategories")
-public class PipelineCategory extends AbstractRestResource {
-
-  @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
-  public 
ResponseEntity<List<org.apache.streampipes.model.pipeline.PipelineCategory>> 
getCategories() {
-    return ok(getPipelineCategoryStorage()
-        .getPipelineCategories());
-  }
-
-  @PostMapping(
-      produces = MediaType.APPLICATION_JSON_VALUE,
-      consumes = MediaType.APPLICATION_JSON_VALUE
-  )
-  public ResponseEntity<? extends Message> addCategory(
-      @RequestBody org.apache.streampipes.model.pipeline.PipelineCategory 
pipelineCategory) {
-    boolean success = getPipelineCategoryStorage()
-        .addPipelineCategory(pipelineCategory);
-    if (success) {
-      return ok(Notifications.success("Category successfully stored. "));
-    } else {
-      return ok(Notifications.error("Could not create category."));
-    }
-  }
-
-  @DeleteMapping(path = "/{categoryId}", produces = 
MediaType.APPLICATION_JSON_VALUE)
-  public ResponseEntity<? extends Message> 
removeCategory(@PathVariable("categoryId") String categoryId) {
-    boolean success = getPipelineCategoryStorage()
-        .deletePipelineCategory(categoryId);
-    if (success) {
-      return ok(Notifications.success("Category successfully deleted. "));
-    } else {
-      return ok(Notifications.error("Could not delete category."));
-    }
-  }
-
-  private IPipelineCategoryStorage getPipelineCategoryStorage() {
-    return getNoSqlStorage().getPipelineCategoryStorageApi();
-  }
-}
diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineResource.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineResource.java
index 4afe07c171..fae5851172 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineResource.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineResource.java
@@ -241,7 +241,6 @@ public class PipelineResource extends 
AbstractAuthGuardedRestResource {
       storedPipeline.setActions(pipeline.getActions());
     }
     storedPipeline.setCreatedAt(System.currentTimeMillis());
-    storedPipeline.setPipelineCategories(pipeline.getPipelineCategories());
     storedPipeline.setHealthStatus(pipeline.getHealthStatus());
     
storedPipeline.setPipelineNotifications(pipeline.getPipelineNotifications());
     storedPipeline.setValid(pipeline.isValid());
diff --git 
a/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/INoSqlStorage.java
 
b/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/INoSqlStorage.java
index 3b704f5eb1..3169a61c69 100644
--- 
a/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/INoSqlStorage.java
+++ 
b/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/INoSqlStorage.java
@@ -44,8 +44,6 @@ public interface INoSqlStorage {
 
   INotificationStorage getNotificationStorageApi();
 
-  IPipelineCategoryStorage getPipelineCategoryStorageApi();
-
   IAssetDashboardStorage getAssetDashboardStorage();
 
   CRUDStorage<String, DataLakeMeasure> getDataLakeStorage();
diff --git 
a/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IPipelineCategoryStorage.java
 
b/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IPipelineCategoryStorage.java
deleted file mode 100644
index 516de60fbb..0000000000
--- 
a/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IPipelineCategoryStorage.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.storage.api;
-
-import org.apache.streampipes.model.pipeline.PipelineCategory;
-
-import java.util.List;
-
-public interface IPipelineCategoryStorage {
-
-  List<PipelineCategory> getPipelineCategories();
-
-  boolean addPipelineCategory(PipelineCategory pipelineCategory);
-
-  boolean deletePipelineCategory(String categoryId);
-
-}
diff --git 
a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/CouchDbStorageManager.java
 
b/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/CouchDbStorageManager.java
index abdb176262..dca2e03294 100644
--- 
a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/CouchDbStorageManager.java
+++ 
b/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/CouchDbStorageManager.java
@@ -37,7 +37,6 @@ import 
org.apache.streampipes.storage.api.INotificationStorage;
 import org.apache.streampipes.storage.api.IPasswordRecoveryTokenStorage;
 import org.apache.streampipes.storage.api.IPermissionStorage;
 import org.apache.streampipes.storage.api.IPipelineCanvasMetadataStorage;
-import org.apache.streampipes.storage.api.IPipelineCategoryStorage;
 import org.apache.streampipes.storage.api.IPipelineElementConnectionStorage;
 import org.apache.streampipes.storage.api.IPipelineElementDescriptionStorage;
 import org.apache.streampipes.storage.api.IPipelineElementTemplateStorage;
@@ -64,7 +63,6 @@ import 
org.apache.streampipes.storage.couchdb.impl.NotificationStorageImpl;
 import org.apache.streampipes.storage.couchdb.impl.PasswordRecoveryTokenImpl;
 import org.apache.streampipes.storage.couchdb.impl.PermissionStorageImpl;
 import 
org.apache.streampipes.storage.couchdb.impl.PipelineCanvasMetadataStorageImpl;
-import org.apache.streampipes.storage.couchdb.impl.PipelineCategoryStorageImpl;
 import 
org.apache.streampipes.storage.couchdb.impl.PipelineElementDescriptionStorageImpl;
 import 
org.apache.streampipes.storage.couchdb.impl.PipelineElementTemplateStorageImpl;
 import org.apache.streampipes.storage.couchdb.impl.PipelineStorageImpl;
@@ -122,11 +120,6 @@ public enum CouchDbStorageManager implements INoSqlStorage 
{
     return new NotificationStorageImpl();
   }
 
-  @Override
-  public IPipelineCategoryStorage getPipelineCategoryStorageApi() {
-    return new PipelineCategoryStorageImpl();
-  }
-
   @Override
   public IAssetDashboardStorage getAssetDashboardStorage() {
     return new AssetDashboardStorageImpl();
diff --git 
a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/PipelineCategoryStorageImpl.java
 
b/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/PipelineCategoryStorageImpl.java
deleted file mode 100644
index 30ffc23852..0000000000
--- 
a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/PipelineCategoryStorageImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.storage.couchdb.impl;
-
-import org.apache.streampipes.model.pipeline.PipelineCategory;
-import org.apache.streampipes.storage.api.IPipelineCategoryStorage;
-import org.apache.streampipes.storage.couchdb.dao.AbstractDao;
-import org.apache.streampipes.storage.couchdb.utils.Utils;
-
-import java.util.List;
-
-public class PipelineCategoryStorageImpl extends AbstractDao<PipelineCategory> 
implements IPipelineCategoryStorage {
-
-  public PipelineCategoryStorageImpl() {
-    super(Utils::getCouchDbPipelineCategoriesClient, PipelineCategory.class);
-  }
-
-  @Override
-  public List<PipelineCategory> getPipelineCategories() {
-    return findAll();
-  }
-
-  @Override
-  public boolean addPipelineCategory(PipelineCategory pipelineCategory) {
-    return persist(pipelineCategory).k;
-  }
-
-  @Override
-  public boolean deletePipelineCategory(String categoryId) {
-    return delete(categoryId);
-  }
-
-}
diff --git 
a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline.service.ts 
b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline.service.ts
index 05ff064fb9..d4e084424c 100644
--- a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline.service.ts
+++ b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline.service.ts
@@ -23,7 +23,6 @@ import { Observable } from 'rxjs';
 import {
     Message,
     Pipeline,
-    PipelineCategory,
     PipelineElementRecommendationMessage,
     PipelineModificationMessage,
     PipelineOperationStatus,
@@ -40,30 +39,7 @@ export class PipelineService {
         private platformServicesCommons: PlatformServicesCommons,
     ) {}
 
-    getPipelineCategories(): Observable<PipelineCategory[]> {
-        return this.http.get(`${this.apiBasePath}/pipelinecategories`).pipe(
-            map(response => {
-                return (response as any[]).map(p =>
-                    PipelineCategory.fromData(p),
-                );
-            }),
-        );
-    }
-
-    storePipelineCategory(pipelineCategory: PipelineCategory) {
-        return this.http.post(
-            `${this.apiBasePath}/pipelinecategories`,
-            pipelineCategory,
-        );
-    }
-
-    deletePipelineCategory(categoryId: string) {
-        return this.http.delete(
-            `${this.apiBasePath}/pipelinecategories/${categoryId}`,
-        );
-    }
-
-    startPipeline(pipelineId): Observable<PipelineOperationStatus> {
+    startPipeline(pipelineId: string): Observable<PipelineOperationStatus> {
         return this.http
             .get(`${this.apiBasePath}/pipelines/${pipelineId}/start`)
             .pipe(
diff --git 
a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts
 
b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts
index b17762f145..dac76da020 100644
--- 
a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts
+++ 
b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts
@@ -20,7 +20,7 @@
 /* tslint:disable */
 /* eslint-disable */
 // @ts-nocheck
-// Generated using typescript-generator version 3.2.1263 on 2024-06-27 
13:13:44.
+// Generated using typescript-generator version 3.2.1263 on 2024-06-27 
15:00:50.
 
 export class NamedStreamPipesEntity implements Storable {
     '@class':
@@ -2454,7 +2454,6 @@ export class Pipeline extends ElementComposition {
     createdAt: number;
     createdByUser: string;
     healthStatus: PipelineHealthStatus;
-    pipelineCategories: string[];
     pipelineNotifications: string[];
     publicElement: boolean;
     restartOnSystemReboot: boolean;
@@ -2476,9 +2475,6 @@ export class Pipeline extends ElementComposition {
         instance.createdAt = data.createdAt;
         instance.createdByUser = data.createdByUser;
         instance.healthStatus = data.healthStatus;
-        instance.pipelineCategories = __getCopyArrayFn(__identity<string>())(
-            data.pipelineCategories,
-        );
         instance.pipelineNotifications = 
__getCopyArrayFn(__identity<string>())(
             data.pipelineNotifications,
         );
@@ -2537,28 +2533,6 @@ export class PipelineCanvasMetadata {
     }
 }
 
-export class PipelineCategory {
-    _id: string;
-    _rev: string;
-    categoryDescription: string;
-    categoryName: string;
-
-    static fromData(
-        data: PipelineCategory,
-        target?: PipelineCategory,
-    ): PipelineCategory {
-        if (!data) {
-            return data;
-        }
-        const instance = target || new PipelineCategory();
-        instance._id = data._id;
-        instance._rev = data._rev;
-        instance.categoryDescription = data.categoryDescription;
-        instance.categoryName = data.categoryName;
-        return instance;
-    }
-}
-
 export class PipelineEdgeValidation {
     sourceId: string;
     status: EdgeValidationStatus;
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 4476366bba..863d9693fc 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
@@ -22,8 +22,8 @@ import {
     Message,
     Pipeline,
     PipelineCanvasMetadata,
-    PipelineService,
     PipelineCanvasMetadataService,
+    PipelineService,
 } from '@streampipes/platform-services';
 import { EditorService } from '../../services/editor.service';
 import { ShepherdService } from '../../../services/tour/shepherd.service';
@@ -42,8 +42,7 @@ import { IdGeneratorService } from 
'../../../core-services/id-generator/id-gener
     styleUrls: ['./save-pipeline.component.scss'],
 })
 export class SavePipelineComponent implements OnInit {
-    pipelineCategories: any;
-    startPipelineAfterStorage: any;
+    startPipelineAfterStorage: boolean;
     updateMode: any;
 
     submitPipelineForm: UntypedFormGroup = new UntypedFormGroup({});
@@ -77,12 +76,10 @@ export class SavePipelineComponent implements OnInit {
         private shepherdService: ShepherdService,
         private pipelineCanvasService: PipelineCanvasMetadataService,
     ) {
-        this.pipelineCategories = [];
         this.updateMode = 'update';
     }
 
     ngOnInit() {
-        this.getPipelineCategories();
         if (this.currentModifiedPipelineId) {
             this.currentPipelineName = this.pipeline.name;
         }
@@ -129,14 +126,6 @@ export class SavePipelineComponent implements OnInit {
         this.errorMessage = data;
     }
 
-    getPipelineCategories() {
-        this.pipelineService
-            .getPipelineCategories()
-            .subscribe(pipelineCategories => {
-                this.pipelineCategories = pipelineCategories;
-            });
-    }
-
     savePipeline(switchTab) {
         let storageRequest;
         const updateMode =
@@ -174,10 +163,9 @@ export class SavePipelineComponent implements OnInit {
 
     updateId(entity: InvocablePipelineElementUnion) {
         const lastIdIndex = entity.elementId.lastIndexOf(':');
-        const newElementId =
+        entity.elementId =
             entity.elementId.substring(0, lastIdIndex + 1) +
             this.idGeneratorService.generate(5);
-        entity.elementId = newElementId;
     }
 
     storePipelineCanvasMetadata(pipelineId: string, updateMode: boolean) {
diff --git 
a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.html
 
b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.html
index ea01ffa894..182f09c9de 100644
--- 
a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.html
+++ 
b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.html
@@ -19,7 +19,7 @@
 <div
     fxFlex="100"
     fxLayout="column"
-    *ngIf="filteredPipelinesAvailable"
+    *ngIf="pipelines.length > 0"
     style="margin: 1px"
 >
     <table
@@ -280,7 +280,7 @@
     fxFlex="100"
     fxLayout="column"
     fxLayoutAlign="center center"
-    *ngIf="!filteredPipelinesAvailable"
+    *ngIf="pipelines.length === 0"
 >
     <h5>(no pipelines available)</h5>
 </div>
diff --git 
a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.ts
 
b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.ts
index ad53f66fbf..dc0f8b81d9 100644
--- 
a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.ts
+++ 
b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.ts
@@ -44,9 +44,6 @@ import { CurrentUserService } from '@streampipes/shared-ui';
 })
 export class PipelineOverviewComponent implements OnInit {
     _pipelines: Pipeline[];
-    _activeCategoryId: string;
-
-    filteredPipelinesAvailable = false;
 
     @Input()
     pipelineToStart: Pipeline;
@@ -134,38 +131,11 @@ export class PipelineOverviewComponent implements OnInit {
         this.addPipelinesToTable();
     }
 
-    get activeCategoryId(): string {
-        return this._activeCategoryId;
-    }
-
-    @Input()
-    set activeCategoryId(activeCategoryId: string) {
-        this._activeCategoryId = activeCategoryId;
-        if (this._pipelines) {
-            this.addPipelinesToTable();
-        }
-    }
-
     addPipelinesToTable() {
-        this.dataSource = new MatTableDataSource<Pipeline>(
-            this.filterPipelines(),
-        );
+        this.dataSource = new MatTableDataSource<Pipeline>(this._pipelines);
         setTimeout(() => {
             this.dataSource.paginator = this.paginator;
             this.dataSource.sort = this.sort;
         });
     }
-
-    filterPipelines(): Pipeline[] {
-        const filteredPipelines: Pipeline[] = this._pipelines.filter(
-            pipeline =>
-                !this._activeCategoryId ||
-                (pipeline.pipelineCategories &&
-                    pipeline.pipelineCategories.some(
-                        pc => pc === this.activeCategoryId,
-                    )),
-        );
-        this.filteredPipelinesAvailable = filteredPipelines.length > 0;
-        return filteredPipelines.sort((a, b) => a.name.localeCompare(b.name));
-    }
 }
diff --git 
a/ui/src/app/pipelines/dialog/start-all-pipelines/start-all-pipelines-dialog.component.ts
 
b/ui/src/app/pipelines/dialog/start-all-pipelines/start-all-pipelines-dialog.component.ts
index 229fdee5e5..e92ff7a1d7 100644
--- 
a/ui/src/app/pipelines/dialog/start-all-pipelines/start-all-pipelines-dialog.component.ts
+++ 
b/ui/src/app/pipelines/dialog/start-all-pipelines/start-all-pipelines-dialog.component.ts
@@ -29,9 +29,6 @@ export class StartAllPipelinesDialogComponent implements 
OnInit {
     @Input()
     pipelines: Pipeline[];
 
-    @Input()
-    activeCategory: string;
-
     pipelinesToModify: Pipeline[];
     installationStatus: any;
     installationFinished: boolean;
@@ -77,29 +74,12 @@ export class StartAllPipelinesDialogComponent implements 
OnInit {
 
     getPipelinesToModify() {
         this.pipelines.forEach(pipeline => {
-            if (
-                pipeline.running !== this.action &&
-                this.hasCategory(pipeline)
-            ) {
+            if (pipeline.running !== this.action) {
                 this.pipelinesToModify.push(pipeline);
             }
         });
     }
 
-    hasCategory(pipeline: Pipeline) {
-        let categoryPresent = false;
-        if (!this.activeCategory) {
-            return true;
-        } else {
-            pipeline.pipelineCategories.forEach(category => {
-                if (category === this.activeCategory) {
-                    categoryPresent = true;
-                }
-            });
-            return categoryPresent;
-        }
-    }
-
     initiateInstallation(pipeline, index) {
         this.installationRunning = true;
         this.installationStatus.push({
diff --git a/ui/src/app/pipelines/pipelines.component.html 
b/ui/src/app/pipelines/pipelines.component.html
index 62775062e2..537331c60c 100644
--- a/ui/src/app/pipelines/pipelines.component.html
+++ b/ui/src/app/pipelines/pipelines.component.html
@@ -88,7 +88,6 @@
                 >
                     <div fxFlex="100">
                         <sp-pipeline-overview
-                            [activeCategoryId]="activeCategoryId"
                             [pipelines]="pipelines"
                             [pipelineToStart]="pipelineToStart"
                             (refreshPipelinesEmitter)="refreshPipelines()"
diff --git a/ui/src/app/pipelines/pipelines.component.ts 
b/ui/src/app/pipelines/pipelines.component.ts
index aa11020969..55f13b3927 100644
--- a/ui/src/app/pipelines/pipelines.component.ts
+++ b/ui/src/app/pipelines/pipelines.component.ts
@@ -21,7 +21,6 @@ import {
     FunctionId,
     FunctionsService,
     Pipeline,
-    PipelineCategory,
     PipelineService,
 } from '@streampipes/platform-services';
 import {
@@ -50,11 +49,8 @@ export class PipelinesComponent implements OnInit, OnDestroy 
{
     pipelines: Pipeline[] = [];
     starting: boolean;
     stopping: boolean;
-    pipelineCategories: PipelineCategory[];
-    activeCategoryId: string;
 
     pipelineIdToStart: string;
-
     pipelineToStart: Pipeline;
 
     pipelinesReady = false;
@@ -81,7 +77,6 @@ export class PipelinesComponent implements OnInit, OnDestroy {
         private breadcrumbService: SpBreadcrumbService,
         private shepherdService: ShepherdService,
     ) {
-        this.pipelineCategories = [];
         this.starting = false;
         this.stopping = false;
     }
@@ -108,7 +103,6 @@ export class PipelinesComponent implements OnInit, 
OnDestroy {
                 if (params.startTutorial) {
                     this.startPipelineTour();
                 }
-                this.getPipelineCategories();
                 this.getPipelines();
                 this.getFunctions();
             });
@@ -144,26 +138,11 @@ export class PipelinesComponent implements OnInit, 
OnDestroy {
         this.pipelineIdToStart = undefined;
     }
 
-    getPipelineCategories() {
-        this.pipelineService
-            .getPipelineCategories()
-            .subscribe(pipelineCategories => {
-                this.pipelineCategories = pipelineCategories;
-            });
-    }
-
     checkCurrentSelectionStatus(status) {
         let active = true;
         this.pipelines.forEach(pipeline => {
-            if (
-                !this.activeCategoryId ||
-                pipeline.pipelineCategories.some(
-                    pc => pc === this.activeCategoryId,
-                )
-            ) {
-                if (pipeline.running === status) {
-                    active = false;
-                }
+            if (pipeline.running === status) {
+                active = false;
             }
         });
         return active;
@@ -178,7 +157,6 @@ export class PipelinesComponent implements OnInit, 
OnDestroy {
                 data: {
                     pipelines: this.pipelines,
                     action: action,
-                    activeCategoryId: this.activeCategoryId,
                 },
             });
 

Reply via email to