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

riemer pushed a commit to branch 2822-remove-pipeline-exportimport
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to 
refs/heads/2822-remove-pipeline-exportimport by this push:
     new 2e20dba679 chore(#2822): Remove pipeline export
2e20dba679 is described below

commit 2e20dba679d3c59248e85d8beca4dd90ef49c363
Author: Dominik Riemer <[email protected]>
AuthorDate: Fri May 3 22:02:45 2024 +0200

    chore(#2822): Remove pipeline export
---
 .../existing-adapters.component.html               |   1 -
 .../category-already-in-pipeline.filter.ts         |  35 ---
 .../import-pipeline-dialog.component.html          | 106 --------
 .../import-pipeline-dialog.component.scss          |  19 --
 .../import-pipeline-dialog.component.ts            | 115 --------
 .../pipeline-categories-dialog.component.html      | 289 ---------------------
 .../pipeline-categories-dialog.component.scss      |  19 --
 .../pipeline-categories-dialog.component.ts        | 149 -----------
 ui/src/app/pipelines/pipeline-category.filter.ts   |  35 ---
 ui/src/app/pipelines/pipelines.component.html      |  35 +--
 ui/src/app/pipelines/pipelines.component.ts        |  55 ----
 ui/src/app/pipelines/pipelines.module.ts           |  10 +-
 12 files changed, 8 insertions(+), 860 deletions(-)

diff --git 
a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
 
b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
index 24c8cb8934..ee553983b9 100644
--- 
a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
+++ 
b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
@@ -61,7 +61,6 @@
                 fxFlex="100"
                 fxLayout="row"
                 fxLayoutAlign="end center"
-                style="padding-left: 10px; padding-right: 10px; font-size: 
14px"
                 class="page-container-nav"
             >
                 <button
diff --git a/ui/src/app/pipelines/category-already-in-pipeline.filter.ts 
b/ui/src/app/pipelines/category-already-in-pipeline.filter.ts
deleted file mode 100644
index be5a2e1afe..0000000000
--- a/ui/src/app/pipelines/category-already-in-pipeline.filter.ts
+++ /dev/null
@@ -1,35 +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.
- *
- */
-
-import { Pipe, PipeTransform } from '@angular/core';
-import { Pipeline } from '@streampipes/platform-services';
-
-@Pipe({
-    name: 'categoryAlreadyInPipelineFilter',
-    pure: false,
-})
-export class CategoryAlreadyInPipelinePipe implements PipeTransform {
-    transform(pipelines: Pipeline[], categoryId: string): any {
-        return pipelines.filter(pipeline => {
-            return (
-                !pipeline.pipelineCategories ||
-                !pipeline.pipelineCategories.some(pc => pc === categoryId)
-            );
-        });
-    }
-}
diff --git 
a/ui/src/app/pipelines/dialog/import-pipeline/import-pipeline-dialog.component.html
 
b/ui/src/app/pipelines/dialog/import-pipeline/import-pipeline-dialog.component.html
deleted file mode 100644
index 313557d34a..0000000000
--- 
a/ui/src/app/pipelines/dialog/import-pipeline/import-pipeline-dialog.component.html
+++ /dev/null
@@ -1,106 +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.
-  ~
-  -->
-
-<div class="sp-dialog-container">
-    <div class="sp-dialog-content p-15">
-        <div fxFlex="100">
-            <!-- Select element to visualize -->
-            <div fxFlex="100" style="margin: 5px; width: 100%">
-                <div *ngIf="page === 'upload-pipelines'">
-                    <h4>{{ pages[0].description }}</h4>
-                    <input
-                        type="file"
-                        id="file"
-                        (change)="handleFileInput($event.target.files)"
-                    />
-                </div>
-
-                <!-- Select Type -->
-                <div *ngIf="page === 'select-pipelines'">
-                    <h4>{{ pages[1].description }}</h4>
-                    <div *ngFor="let availablePipeline of availablePipelines">
-                        <mat-checkbox
-                            (click)="toggleSelectedPipeline(availablePipeline)"
-                        >
-                            {{ availablePipeline.name }}
-                        </mat-checkbox>
-                    </div>
-                </div>
-
-                <!-- Select Scheme -->
-                <div ng-if="page == 'import-pipelines'">
-                    <div
-                        fxLayout="column"
-                        fxLayoutAlign="center center"
-                        *ngIf="importing"
-                    >
-                        <b
-                            ><h4>{{ pages[2].description }}</h4></b
-                        >
-                        <mat-spinner
-                            [mode]="'indeterminate'"
-                            class="md-accent"
-                        ></mat-spinner>
-                        <b
-                            ><h4>
-                                Importing {{ selectedPipelines.length }}
-                                {{
-                                    selectedPipelines.length === 1
-                                        ? 'pipeline'
-                                        : 'pipelines'
-                                }}...
-                            </h4></b
-                        >
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-    <mat-divider></mat-divider>
-    <div class="sp-dialog-actions actions-align-right">
-        <button
-            mat-button
-            mat-raised-button
-            class="mat-basic"
-            (click)="close(false)"
-            style="margin-right: 10px"
-        >
-            Close
-        </button>
-        <button
-            mat-button
-            mat-raised-button
-            class="mat-basic"
-            (click)="back()"
-            *ngIf="!('upload-pipelines' === page)"
-            style="margin-right: 10px"
-        >
-            Back
-        </button>
-        <button
-            mat-button
-            mat-raised-button
-            color="accent"
-            (click)="startImport()"
-            *ngIf="page === 'select-pipelines'"
-            data-cy="import-selected-pipelines-btn"
-        >
-            Import
-        </button>
-    </div>
-</div>
diff --git 
a/ui/src/app/pipelines/dialog/import-pipeline/import-pipeline-dialog.component.scss
 
b/ui/src/app/pipelines/dialog/import-pipeline/import-pipeline-dialog.component.scss
deleted file mode 100644
index fddade7bf6..0000000000
--- 
a/ui/src/app/pipelines/dialog/import-pipeline/import-pipeline-dialog.component.scss
+++ /dev/null
@@ -1,19 +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.
- *
- */
-
-@import '../../../../scss/sp/sp-dialog.scss';
diff --git 
a/ui/src/app/pipelines/dialog/import-pipeline/import-pipeline-dialog.component.ts
 
b/ui/src/app/pipelines/dialog/import-pipeline/import-pipeline-dialog.component.ts
deleted file mode 100644
index 2dfd2178f6..0000000000
--- 
a/ui/src/app/pipelines/dialog/import-pipeline/import-pipeline-dialog.component.ts
+++ /dev/null
@@ -1,115 +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.
- *
- */
-
-import { Component } from '@angular/core';
-import { Pipeline, PipelineService } from '@streampipes/platform-services';
-import { DialogRef } from '@streampipes/shared-ui';
-import { forkJoin } from 'rxjs';
-
-@Component({
-    selector: 'sp-import-pipeline-dialog',
-    templateUrl: './import-pipeline-dialog.component.html',
-    styleUrls: ['./import-pipeline-dialog.component.scss'],
-})
-export class ImportPipelineDialogComponent {
-    currentStatus: any;
-    page = 'upload-pipelines';
-
-    availablePipelines: Pipeline[] = [];
-    selectedPipelines: Pipeline[] = [];
-
-    importing = false;
-
-    pages = [
-        {
-            type: 'upload-pipelines',
-            title: 'Upload',
-            description:
-                'Upload a json file containing the pipelines to import',
-        },
-        {
-            type: 'select-pipelines',
-            title: 'Select pipelines',
-            description: 'Select the pipelines to import',
-        },
-        {
-            type: 'import-pipelines',
-            title: 'Import',
-            description: '',
-        },
-    ];
-
-    constructor(
-        private pipelineService: PipelineService,
-        private dialogRef: DialogRef<ImportPipelineDialogComponent>,
-    ) {}
-
-    handleFileInput(files: any) {
-        const file = files[0];
-        const aReader = new FileReader();
-        aReader.readAsText(file, 'UTF-8');
-        aReader.onload = evt => {
-            this.availablePipelines = JSON.parse(aReader.result as string);
-            console.log(this.availablePipelines);
-            this.page = 'select-pipelines';
-        };
-    }
-
-    close(refreshPipelines: boolean) {
-        this.dialogRef.close(refreshPipelines);
-    }
-
-    back() {
-        if (this.page === 'select-pipelines') {
-            this.page = 'upload-pipelines';
-        } else if (this.page === 'import-pipelines') {
-            this.page = 'select-pipelines';
-        }
-    }
-
-    toggleSelectedPipeline(pipeline: Pipeline) {
-        if (this.selectedPipelines.some(p => p._id === pipeline._id)) {
-            this.selectedPipelines.splice(
-                this.selectedPipelines.findIndex(sp => sp._id === 
pipeline._id),
-                1,
-            );
-        } else {
-            this.selectedPipelines.push(pipeline);
-        }
-    }
-
-    storePipelines() {
-        const promises = [];
-        this.selectedPipelines.forEach(pipeline => {
-            pipeline._rev = undefined;
-            pipeline._id = undefined;
-            promises.push(this.pipelineService.storePipeline(pipeline));
-        });
-
-        forkJoin(promises).subscribe(results => {
-            this.importing = false;
-            this.close(true);
-        });
-    }
-
-    startImport() {
-        this.page = 'import-pipelines';
-        this.importing = true;
-        this.storePipelines();
-    }
-}
diff --git 
a/ui/src/app/pipelines/dialog/pipeline-categories/pipeline-categories-dialog.component.html
 
b/ui/src/app/pipelines/dialog/pipeline-categories/pipeline-categories-dialog.component.html
deleted file mode 100644
index 72cee565ff..0000000000
--- 
a/ui/src/app/pipelines/dialog/pipeline-categories/pipeline-categories-dialog.component.html
+++ /dev/null
@@ -1,289 +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.
-  ~
-  -->
-
-<div class="sp-dialog-container">
-    <div class="sp-dialog-content p-15">
-        <div
-            *ngFor="let pipelineCategory of pipelineCategories"
-            fxLayout="column"
-        >
-            <div style="border: 5px; border-color: blue">
-                <div fxFlex="80" fxLayout="column">
-                    <div fxFlex fxLayout="column">
-                        <h4>
-                            <b>{{ pipelineCategory.categoryName }}</b>
-                        </h4>
-                        <h5>
-                            <i>{{ pipelineCategory.categoryDescription }}</i>
-                        </h5>
-                        <div
-                            
*ngIf="categoryDetailsVisible[pipelineCategory._id]"
-                        >
-                            <div
-                                *ngIf="
-                                    addPipelineToCategorySelected[
-                                        pipelineCategory._id
-                                    ]
-                                "
-                                style="padding: 10px"
-                            >
-                                <div
-                                    class="md-list-item-text"
-                                    fxFlex="80"
-                                    fxLayout="column"
-                                >
-                                    <mat-select
-                                        [(ngModel)]="selectedPipelineId"
-                                        placeholder="Select Pipeline"
-                                    >
-                                        <mat-option
-                                            *ngFor="
-                                                let pipeline of pipelines
-                                                    | 
categoryAlreadyInPipelineFilter
-                                                        : pipelineCategory._id
-                                            "
-                                            [value]="pipeline._id"
-                                        >
-                                            <b>{{ pipeline.name }}</b
-                                            ><br />
-                                        </mat-option>
-                                        <mat-option
-                                            *ngFor="
-                                                let systemPipeline of 
systemPipelines
-                                                    | 
categoryAlreadyInPipelineFilter
-                                                        : pipelineCategory._id
-                                            "
-                                            [value]="systemPipeline._id"
-                                        >
-                                            <b>{{ systemPipeline.name }}</b
-                                            ><br />
-                                        </mat-option>
-                                    </mat-select>
-                                </div>
-                                <div
-                                    class="md-list-item-text"
-                                    fxFlex="20"
-                                    fxLayout="row"
-                                    fxLayoutAlign="end center"
-                                >
-                                    <div
-                                        fxFlex="50"
-                                        fxLayout="row"
-                                        fxLayoutAlign="center end"
-                                    >
-                                        <button
-                                            mat-icon-button
-                                            (click)="
-                                                addPipelineToCategory(
-                                                    pipelineCategory
-                                                )
-                                            "
-                                            color="accent"
-                                        >
-                                            <mat-icon>save</mat-icon>
-                                        </button>
-                                    </div>
-                                    <div
-                                        fxFlex="50"
-                                        fxLayout="row"
-                                        fxLayoutAlign="center end"
-                                    >
-                                        <button
-                                            mat-icon-button
-                                            (click)="
-                                                showAddToCategoryInput(
-                                                    pipelineCategory._id,
-                                                    false
-                                                )
-                                            "
-                                            color="accent"
-                                        >
-                                            <mat-icon>delete</mat-icon>
-                                        </button>
-                                    </div>
-                                </div>
-                            </div>
-                            <div
-                                *ngFor="
-                                    let pipeline of pipelines
-                                        | pipelineInCategoryFilter
-                                            : pipelineCategory._id
-                                "
-                            >
-                                <div
-                                    class="md-list-item-text"
-                                    fxFlex="80"
-                                    fxLayout="column"
-                                >
-                                    {{ pipeline.name }}
-                                </div>
-                                <div
-                                    class="md-list-item-text"
-                                    fxFlex="20"
-                                    fxLayout="column"
-                                    fxLayoutAlign="end center"
-                                >
-                                    <button
-                                        mat-icon-button
-                                        (click)="
-                                            removePipelineFromCategory(
-                                                pipeline,
-                                                pipelineCategory._id
-                                            )
-                                        "
-                                        color="accent"
-                                    >
-                                        <mat-icon>delete</mat-icon>
-                                    </button>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <div fxFlex="20" fxLayout="row">
-                    <div
-                        class="md-list-item-text"
-                        fxFlex="33"
-                        fxLayout="row"
-                        fxLayoutAlign="center start"
-                    >
-                        <button
-                            mat-icon-button
-                            
*ngIf="categoryDetailsVisible[pipelineCategory._id]"
-                            (click)="
-                                toggleCategoryDetailsVisibility(
-                                    pipelineCategory._id
-                                )
-                            "
-                            color="accent"
-                            matTooltip="Hide Details"
-                            matTooltipPosition="above"
-                        >
-                            <mat-icon>expand_less</mat-icon>
-                        </button>
-                        <button
-                            mat-icon-button
-                            *ngIf="
-                                !categoryDetailsVisible[pipelineCategory._id]
-                            "
-                            (click)="
-                                toggleCategoryDetailsVisibility(
-                                    pipelineCategory._id
-                                )
-                            "
-                            color="accent"
-                            matTooltip="Show Details"
-                            matTooltipPosition="above"
-                        >
-                            <mat-icon>expand_more</mat-icon>
-                        </button>
-                    </div>
-                    <div
-                        class="md-list-item-text"
-                        fxFlex="33"
-                        fxLayout="row"
-                        fxLayoutAlign="center start"
-                    >
-                        <button
-                            mat-icon-button
-                            (click)="
-                                showAddToCategoryInput(
-                                    pipelineCategory._id,
-                                    true
-                                )
-                            "
-                            color="accent"
-                            matTooltip="Add Pipeline To Category"
-                            matTooltipPosition="above"
-                        >
-                            <mat-icon>add_circle_outline</mat-icon>
-                        </button>
-                    </div>
-                    <div
-                        class="md-list-item-text"
-                        flex="33"
-                        layout="row"
-                        layout-align="center start"
-                    >
-                        <button
-                            mat-icon-button
-                            (click)="
-                                deletePipelineCategory(pipelineCategory._id)
-                            "
-                            color="accent"
-                            matTooltip="Delete Category"
-                            matTooltipPosition="above"
-                        >
-                            <mat-icon>delete</mat-icon>
-                        </button>
-                    </div>
-                </div>
-            </div>
-            <mat-divider></mat-divider>
-        </div>
-        <div *ngIf="addSelected">
-            <div class="md-list-item-text" fxFlex="20" fxLayout="column">
-                <mat-form-field color="accent">
-                    <mat-label>Name</mat-label>
-                    <input matInput type="text" [(ngModel)]="newCategoryName" 
/>
-                </mat-form-field>
-            </div>
-            <div class="md-list-item-text" fxFlex="60" fxLayout="column">
-                <mat-form-field color="accent">
-                    <mat-label>Description</mat-label>
-                    <input
-                        matInput
-                        type="text"
-                        [(ngModel)]="newCategoryDescription"
-                    />
-                </mat-form-field>
-            </div>
-            <div class="md-list-item-text" fxFlex="20" fxLayout="column">
-                <button
-                    mat-icon-button
-                    (click)="addPipelineCategory()"
-                    color="accent"
-                    class="md-accent md-icon-button"
-                >
-                    <mat-icon>save</mat-icon>
-                </button>
-            </div>
-        </div>
-        <div style="margin-top: 10px">
-            <button
-                mat-button
-                mat-raised-button
-                color="accent"
-                (click)="showAddInput()"
-            >
-                Add Category
-            </button>
-        </div>
-    </div>
-    <mat-divider></mat-divider>
-    <div class="sp-dialog-actions actions-align-right">
-        <button
-            mat-button
-            mat-raised-button
-            class="mat-basic"
-            (click)="close()"
-        >
-            Close
-        </button>
-    </div>
-</div>
diff --git 
a/ui/src/app/pipelines/dialog/pipeline-categories/pipeline-categories-dialog.component.scss
 
b/ui/src/app/pipelines/dialog/pipeline-categories/pipeline-categories-dialog.component.scss
deleted file mode 100644
index fddade7bf6..0000000000
--- 
a/ui/src/app/pipelines/dialog/pipeline-categories/pipeline-categories-dialog.component.scss
+++ /dev/null
@@ -1,19 +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.
- *
- */
-
-@import '../../../../scss/sp/sp-dialog.scss';
diff --git 
a/ui/src/app/pipelines/dialog/pipeline-categories/pipeline-categories-dialog.component.ts
 
b/ui/src/app/pipelines/dialog/pipeline-categories/pipeline-categories-dialog.component.ts
deleted file mode 100644
index e480e4eccf..0000000000
--- 
a/ui/src/app/pipelines/dialog/pipeline-categories/pipeline-categories-dialog.component.ts
+++ /dev/null
@@ -1,149 +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.
- *
- */
-
-import { Component, Input, OnInit } from '@angular/core';
-import {
-    Pipeline,
-    PipelineCategory,
-    PipelineService,
-} from '@streampipes/platform-services';
-import { DialogRef } from '@streampipes/shared-ui';
-
-@Component({
-    selector: 'sp-pipeline-categories-dialog',
-    templateUrl: './pipeline-categories-dialog.component.html',
-    styleUrls: ['./pipeline-categories-dialog.component.scss'],
-})
-export class PipelineCategoriesDialogComponent implements OnInit {
-    addSelected: any;
-
-    addPipelineToCategorySelected: any;
-    categoryDetailsVisible: any;
-
-    selectedPipelineId: string;
-    pipelineCategories: PipelineCategory[];
-
-    newCategoryName: string;
-    newCategoryDescription: string;
-
-    @Input()
-    pipelines: Pipeline[];
-
-    @Input()
-    systemPipelines: Pipeline[];
-
-    constructor(
-        private pipelineService: PipelineService,
-        private dialogRef: DialogRef<PipelineCategoriesDialogComponent>,
-    ) {
-        this.addSelected = false;
-        this.addPipelineToCategorySelected = [];
-        this.categoryDetailsVisible = [];
-        this.selectedPipelineId = '';
-    }
-
-    ngOnInit() {
-        this.fetchPipelineCategories();
-        this.fetchPipelines();
-    }
-
-    toggleCategoryDetailsVisibility(categoryId) {
-        this.categoryDetailsVisible[categoryId] =
-            !this.categoryDetailsVisible[categoryId];
-    }
-
-    addPipelineToCategory(pipelineCategory) {
-        console.log(pipelineCategory);
-        const pipeline = this.findPipeline(this.selectedPipelineId);
-        if (pipeline['pipelineCategories'] === undefined) {
-            pipeline['pipelineCategories'] = [];
-        }
-        pipeline['pipelineCategories'].push(pipelineCategory._id);
-        this.storeUpdatedPipeline(pipeline);
-    }
-
-    removePipelineFromCategory(pipeline, categoryId) {
-        const index = pipeline.pipelineCategories.indexOf(categoryId);
-        pipeline.pipelineCategories.splice(index, 1);
-        this.storeUpdatedPipeline(pipeline);
-    }
-
-    storeUpdatedPipeline(pipeline) {
-        this.pipelineService.updatePipeline(pipeline).subscribe(msg => {
-            // this.refreshPipelines();
-            // this.getPipelineCategories();
-            this.fetchPipelineCategories();
-        });
-    }
-
-    findPipeline(pipelineId) {
-        let matchedPipeline = {};
-        this.pipelines.forEach(pipeline => {
-            if (pipeline._id === pipelineId) {
-                matchedPipeline = pipeline;
-            }
-        });
-        return matchedPipeline;
-    }
-
-    addPipelineCategory() {
-        const newCategory: any = {};
-        newCategory.categoryName = this.newCategoryName;
-        newCategory.categoryDescription = this.newCategoryDescription;
-        this.pipelineService
-            .storePipelineCategory(newCategory)
-            .subscribe(data => {
-                this.fetchPipelineCategories();
-                this.addSelected = false;
-            });
-    }
-
-    fetchPipelineCategories() {
-        this.pipelineService
-            .getPipelineCategories()
-            .subscribe(pipelineCategories => {
-                this.pipelineCategories = pipelineCategories;
-            });
-    }
-
-    fetchPipelines() {}
-
-    showAddToCategoryInput(categoryId, show) {
-        this.addPipelineToCategorySelected[categoryId] = show;
-        this.categoryDetailsVisible[categoryId] = true;
-        console.log(this.categoryDetailsVisible);
-    }
-
-    deletePipelineCategory(pipelineId) {
-        this.pipelineService
-            .deletePipelineCategory(pipelineId)
-            .subscribe(data => {
-                this.fetchPipelineCategories();
-            });
-    }
-
-    showAddInput() {
-        this.addSelected = true;
-        this.newCategoryName = '';
-        this.newCategoryDescription = '';
-    }
-
-    close() {
-        this.dialogRef.close();
-    }
-}
diff --git a/ui/src/app/pipelines/pipeline-category.filter.ts 
b/ui/src/app/pipelines/pipeline-category.filter.ts
deleted file mode 100644
index 9ba3aa4811..0000000000
--- a/ui/src/app/pipelines/pipeline-category.filter.ts
+++ /dev/null
@@ -1,35 +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.
- *
- */
-
-import { Pipe, PipeTransform } from '@angular/core';
-import { Pipeline } from '@streampipes/platform-services';
-
-@Pipe({
-    name: 'pipelineInCategoryFilter',
-    pure: false,
-})
-export class PipelineInCategoryPipe implements PipeTransform {
-    transform(pipelines: Pipeline[], categoryId: string): any {
-        return pipelines.filter(pipeline => {
-            return (
-                pipeline.pipelineCategories &&
-                pipeline.pipelineCategories.some(pc => pc === categoryId)
-            );
-        });
-    }
-}
diff --git a/ui/src/app/pipelines/pipelines.component.html 
b/ui/src/app/pipelines/pipelines.component.html
index f8feda3394..62775062e2 100644
--- a/ui/src/app/pipelines/pipelines.component.html
+++ b/ui/src/app/pipelines/pipelines.component.html
@@ -57,41 +57,20 @@
         <button
             mat-icon-button
             color="accent"
-            matTooltip="Refresh pipelines"
-            matTooltipPosition="above"
-            (click)="refreshPipelines()"
-        >
-            <i class="material-icons"> refresh </i>
-        </button>
-        <button
-            mat-icon-button
-            color="accent"
-            matTooltip="Export pipelines"
-            matTooltipPosition="above"
-            (click)="exportPipelines()"
-            data-cy="export-pipelines-btn"
+            (click)="startPipelineTour()"
+            [matTooltip]="'Tutorial'"
+            [disabled]="tutorialActive"
         >
-            <i class="material-icons"> cloud_download </i>
+            <i class="material-icons"> school </i>
         </button>
         <button
             mat-icon-button
             color="accent"
-            matTooltip="Import pipelines"
+            matTooltip="Refresh pipelines"
             matTooltipPosition="above"
-            (click)="openImportPipelinesDialog()"
-            data-cy="import-pipelines-btn"
-        >
-            <i class="material-icons"> cloud_upload </i>
-        </button>
-        <button
-            mat-icon-button
-            color="accent"
-            (click)="startPipelineTour()"
-            [matTooltip]="'Tutorial'"
-            [disabled]="tutorialActive"
-            style="margin-right: 5px"
+            (click)="refreshPipelines()"
         >
-            <i class="material-icons"> school </i>
+            <i class="material-icons"> refresh </i>
         </button>
     </div>
     <div fxFlex="100" fxLayout="column">
diff --git a/ui/src/app/pipelines/pipelines.component.ts 
b/ui/src/app/pipelines/pipelines.component.ts
index e87d8f02f3..aa11020969 100644
--- a/ui/src/app/pipelines/pipelines.component.ts
+++ b/ui/src/app/pipelines/pipelines.component.ts
@@ -16,7 +16,6 @@
  *
  */
 
-import * as FileSaver from 'file-saver';
 import { Component, OnDestroy, OnInit } from '@angular/core';
 import {
     FunctionId,
@@ -32,9 +31,7 @@ import {
     PanelType,
     SpBreadcrumbService,
 } from '@streampipes/shared-ui';
-import { ImportPipelineDialogComponent } from 
'./dialog/import-pipeline/import-pipeline-dialog.component';
 import { StartAllPipelinesDialogComponent } from 
'./dialog/start-all-pipelines/start-all-pipelines-dialog.component';
-import { PipelineCategoriesDialogComponent } from 
'./dialog/pipeline-categories/pipeline-categories-dialog.component';
 import { ActivatedRoute, Router } from '@angular/router';
 import { AuthService } from '../services/auth.service';
 import { UserPrivilege } from '../_enums/user-privilege.enum';
@@ -51,7 +48,6 @@ import { Subscription } from 'rxjs';
 export class PipelinesComponent implements OnInit, OnDestroy {
     pipeline: Pipeline;
     pipelines: Pipeline[] = [];
-    systemPipelines: Pipeline[] = [];
     starting: boolean;
     stopping: boolean;
     pipelineCategories: PipelineCategory[];
@@ -122,18 +118,6 @@ export class PipelinesComponent implements OnInit, 
OnDestroy {
             });
     }
 
-    setSelectedTab(index) {
-        this.activeCategoryId =
-            index === 0 ? undefined : this.pipelineCategories[index - 1]._id;
-    }
-
-    exportPipelines() {
-        const blob = new Blob([JSON.stringify(this.pipelines)], {
-            type: 'application/json',
-        });
-        FileSaver.saveAs(blob, 'pipelines.json');
-    }
-
     getFunctions() {
         this.functionsService.getActiveFunctions().subscribe(functions => {
             this.functions = functions.map(f => f.functionId);
@@ -168,10 +152,6 @@ export class PipelinesComponent implements OnInit, 
OnDestroy {
             });
     }
 
-    activeClass(pipeline) {
-        return 'active-pipeline';
-    }
-
     checkCurrentSelectionStatus(status) {
         let active = true;
         this.pipelines.forEach(pipeline => {
@@ -189,23 +169,6 @@ export class PipelinesComponent implements OnInit, 
OnDestroy {
         return active;
     }
 
-    openImportPipelinesDialog() {
-        const dialogRef: DialogRef<ImportPipelineDialogComponent> =
-            this.dialogService.open(ImportPipelineDialogComponent, {
-                panelType: PanelType.STANDARD_PANEL,
-                title: 'Import Pipeline',
-                width: '70vw',
-                data: {
-                    pipelines: this.pipelines,
-                },
-            });
-        dialogRef.afterClosed().subscribe(data => {
-            if (data) {
-                this.refreshPipelines();
-            }
-        });
-    }
-
     startAllPipelines(action) {
         const dialogRef: DialogRef<StartAllPipelinesDialogComponent> =
             this.dialogService.open(StartAllPipelinesDialogComponent, {
@@ -226,24 +189,6 @@ export class PipelinesComponent implements OnInit, 
OnDestroy {
         });
     }
 
-    showPipelineCategoriesDialog() {
-        const dialogRef: DialogRef<PipelineCategoriesDialogComponent> =
-            this.dialogService.open(PipelineCategoriesDialogComponent, {
-                panelType: PanelType.STANDARD_PANEL,
-                title: 'Pipeline Categories',
-                width: '70vw',
-                data: {
-                    pipelines: this.pipelines,
-                    systemPipelines: this.systemPipelines,
-                },
-            });
-
-        dialogRef.afterClosed().subscribe(data => {
-            this.getPipelineCategories();
-            this.refreshPipelines();
-        });
-    }
-
     refreshPipelines() {
         this.getPipelines();
     }
diff --git a/ui/src/app/pipelines/pipelines.module.ts 
b/ui/src/app/pipelines/pipelines.module.ts
index 90161270d1..6d969cd1c7 100644
--- a/ui/src/app/pipelines/pipelines.module.ts
+++ b/ui/src/app/pipelines/pipelines.module.ts
@@ -16,7 +16,6 @@
  *
  */
 
-import { CategoryAlreadyInPipelinePipe } from 
'./category-already-in-pipeline.filter';
 import { PipelinesComponent } from './pipelines.component';
 import { NgModule } from '@angular/core';
 import { FlexLayoutModule } from '@ngbracket/ngx-layout';
@@ -27,11 +26,8 @@ import { PipelineOverviewComponent } from 
'./components/pipeline-overview/pipeli
 import { PipelineStatusDialogComponent } from 
'./dialog/pipeline-status/pipeline-status-dialog.component';
 import { DeletePipelineDialogComponent } from 
'./dialog/delete-pipeline/delete-pipeline-dialog.component';
 import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
-import { ImportPipelineDialogComponent } from 
'./dialog/import-pipeline/import-pipeline-dialog.component';
 import { StartAllPipelinesDialogComponent } from 
'./dialog/start-all-pipelines/start-all-pipelines-dialog.component';
-import { PipelineCategoriesDialogComponent } from 
'./dialog/pipeline-categories/pipeline-categories-dialog.component';
 import { FormsModule } from '@angular/forms';
-import { PipelineInCategoryPipe } from './pipeline-category.filter';
 import { MatSortModule } from '@angular/material/sort';
 import { MatTableModule } from '@angular/material/table';
 import { PipelineNotificationsComponent } from 
'./dialog/pipeline-notifications/pipeline-notifications.component';
@@ -130,19 +126,15 @@ import { MatIconModule } from '@angular/material/icon';
     declarations: [
         DeletePipelineDialogComponent,
         FunctionsOverviewComponent,
-        ImportPipelineDialogComponent,
         PipelinesComponent,
-        PipelineCategoriesDialogComponent,
         PipelineNotificationsComponent,
         PipelineOverviewComponent,
         PipelineStatusDialogComponent,
         StartAllPipelinesDialogComponent,
-        PipelineInCategoryPipe,
-        CategoryAlreadyInPipelinePipe,
         SpFunctionsMetricsComponent,
         SpFunctionsLogsComponent,
     ],
-    providers: [CategoryAlreadyInPipelinePipe, PipelineInCategoryPipe],
+    providers: [],
     exports: [PipelinesComponent],
 })
 export class PipelinesModule {


Reply via email to