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 2022/07/12 15:40:43 UTC

[incubator-streampipes] branch STREAMPIPES-558 updated (d38b7ec49 -> 407bfabec)

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

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


    from d38b7ec49 [STREAMPIPES-537] Minor layout fix
     new 9a4943235 [STREAMPIPES-537] Remove unneeded files
     new 407bfabec [STREAMPIPES-537] Harmonize pipeline element installation module

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:
 ui/src/app/add/add.component.html                  |  96 +++++++++----------
 ui/src/app/add/add.component.scss                  |   4 +
 ui/src/app/add/add.module.ts                       |   2 +
 .../add-endpoint/add-endpoint.component.html       |   2 +-
 .../existing-adapters.component.html               |   2 +-
 ui/src/app/dashboard/dashboard.component.css       |  30 ------
 ui/src/app/dashboard/dashboard.component.html      |  51 ----------
 ui/src/app/dashboard/dashboard.component.ts        | 103 ---------------------
 ui/src/app/dashboard/dashboard.module.ts           |   6 +-
 9 files changed, 56 insertions(+), 240 deletions(-)
 delete mode 100644 ui/src/app/dashboard/dashboard.component.css
 delete mode 100644 ui/src/app/dashboard/dashboard.component.html
 delete mode 100644 ui/src/app/dashboard/dashboard.component.ts


[incubator-streampipes] 01/02: [STREAMPIPES-537] Remove unneeded files

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

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

commit 9a4943235c08f153c51ecf3e4ce727b1694a40ab
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Tue Jul 12 17:21:09 2022 +0200

    [STREAMPIPES-537] Remove unneeded files
---
 ui/src/app/dashboard/dashboard.component.css  |  30 --------
 ui/src/app/dashboard/dashboard.component.html |  51 -------------
 ui/src/app/dashboard/dashboard.component.ts   | 103 --------------------------
 ui/src/app/dashboard/dashboard.module.ts      |   6 +-
 4 files changed, 2 insertions(+), 188 deletions(-)

diff --git a/ui/src/app/dashboard/dashboard.component.css b/ui/src/app/dashboard/dashboard.component.css
deleted file mode 100644
index 8e7687a52..000000000
--- a/ui/src/app/dashboard/dashboard.component.css
+++ /dev/null
@@ -1,30 +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.
- *
- */
-
-.mr-20 {
-    margin-right:20px;
-}
-
-.dashboard-panel {
-    height: 100%;
-    flex-direction: column;
-    box-sizing: border-box;
-    display: flex;
-    flex: 1 1 100%;
-    overflow-y: auto;
-}
\ No newline at end of file
diff --git a/ui/src/app/dashboard/dashboard.component.html b/ui/src/app/dashboard/dashboard.component.html
deleted file mode 100644
index 7cb4e9c9b..000000000
--- a/ui/src/app/dashboard/dashboard.component.html
+++ /dev/null
@@ -1,51 +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 fxLayout="column" class="page-container">
-    <div fxLayout="row" class="p-0 sp-tab-bg">
-        <div fxFlex="100" class="page-container-nav">
-            <div fxFlex="100" fxLayout="row">
-                <div fxFlex fxLayoutAlign="start center">
-                    <mat-tab-group [selectedIndex]="selectedIndex" (selectedIndexChange)="selectDashboard($event)" color="accent">
-                        <mat-tab label="Start"></mat-tab>
-                        <mat-tab *ngFor="let dashboard of dashboards" label="{{dashboard.name}}"></mat-tab>
-                    </mat-tab-group>
-                </div>
-                <div fxFlex fxLayoutAlign="end center" class="mr-20">
-                <button mat-button mat-icon-button color="accent"
-                        *ngIf="selectedIndex > 0 && hasDashboardWritePrivileges" (click)="toggleEditMode()" [disabled]="editMode">
-                    <i class="material-icons">edit</i>
-                </button>
-                </div>
-            </div>
-        </div>
-    </div>
-
-    <div class="fixed-height" fxLayout="column" fxFlex="100" *ngIf="dashboardsLoaded">
-    <dashboard-overview (selectDashboardEmitter)="openDashboard($event)"
-                        (reloadDashboardsEmitter)="getDashboards()"
-                        [dashboards]="dashboards"
-                        *ngIf="!dashboardTabSelected">
-
-    </dashboard-overview>
-    <dashboard-panel fxLayout="column" [(editMode)]="editMode" [dashboard]="selectedDashboard"
-                     class="dashboard-panel" *ngIf="dashboardTabSelected">
-
-    </dashboard-panel>
-    </div>
-</div>
diff --git a/ui/src/app/dashboard/dashboard.component.ts b/ui/src/app/dashboard/dashboard.component.ts
deleted file mode 100644
index a9624d814..000000000
--- a/ui/src/app/dashboard/dashboard.component.ts
+++ /dev/null
@@ -1,103 +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, OnInit } from '@angular/core';
-import { Dashboard, DashboardService } from '@streampipes/platform-services';
-import { RefreshDashboardService } from './services/refresh-dashboard.service';
-import { Tuple2 } from '../core-model/base/Tuple2';
-import { EditModeService } from './services/edit-mode.service';
-import { ActivatedRoute, Router } from '@angular/router';
-import { AuthService } from '../services/auth.service';
-import { UserPrivilege } from '../_enums/user-privilege.enum';
-
-@Component({
-    selector: 'dashboard',
-    templateUrl: './dashboard.component.html',
-    styleUrls: ['./dashboard.component.css']
-})
-export class DashboardComponent implements OnInit {
-
-    selectedDashboard: Dashboard;
-    selectedIndex = 0;
-    dashboardsLoaded = false;
-    dashboardTabSelected = false;
-
-    editMode = false;
-
-    dashboards: Dashboard[];
-    hasDashboardWritePrivileges = false;
-
-    routeParams: any;
-
-    constructor(private dashboardService: DashboardService,
-                private refreshDashboardService: RefreshDashboardService,
-                private editModeService: EditModeService,
-                private route: ActivatedRoute,
-                private router: Router,
-                private authService: AuthService) {}
-
-    ngOnInit() {
-        this.hasDashboardWritePrivileges = this.authService.hasRole(UserPrivilege.PRIVILEGE_WRITE_DASHBOARD);
-        this.route.params.subscribe(params => {
-            this.getDashboards(params.id);
-        });
-        this.refreshDashboardService.refreshSubject.subscribe(currentDashboardId => {
-            this.getDashboards(currentDashboardId);
-        });
-        this.editModeService.editModeSubject.subscribe(editMode => {
-            this.editMode = editMode;
-        });
-
-    }
-
-    openDashboard(data: Tuple2<Dashboard, boolean>) {
-        const index = this.dashboards.indexOf(data.a);
-        this.editMode = data.b;
-        this.selectDashboard((index + 1));
-    }
-
-    selectDashboard(index: number) {
-        this.selectedIndex = index;
-        if (index === 0) {
-            this.dashboardTabSelected = false;
-            this.router.navigate(['dashboard']);
-        } else {
-            this.dashboardTabSelected = true;
-            this.selectedDashboard = this.dashboards[(index - 1)];
-            this.router.navigate(['dashboard', this.selectedDashboard._id]);
-        }
-    }
-
-    protected getDashboards(currentDashboardId?: string) {
-        this.dashboardsLoaded = false;
-        this.dashboardService.getDashboards().subscribe(data => {
-            this.dashboards = data.sort((a, b) => a.name.localeCompare(b.name));
-            if (currentDashboardId) {
-                const currentDashboard = this.dashboards.find(d => d._id === currentDashboardId);
-                this.selectDashboard(this.dashboards.indexOf(currentDashboard) + 1);
-            } else {
-                this.selectedIndex = 0;
-            }
-            this.dashboardsLoaded = true;
-        });
-    }
-
-    toggleEditMode() {
-        this.editMode = ! (this.editMode);
-    }
-}
diff --git a/ui/src/app/dashboard/dashboard.module.ts b/ui/src/app/dashboard/dashboard.module.ts
index 7453b1763..d77c77677 100644
--- a/ui/src/app/dashboard/dashboard.module.ts
+++ b/ui/src/app/dashboard/dashboard.module.ts
@@ -20,7 +20,6 @@ import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { FlexLayoutModule } from '@angular/flex-layout';
 import { GridsterModule } from 'angular-gridster2';
-import { DashboardComponent } from './dashboard.component';
 import { DashboardPanelComponent } from './components/panel/dashboard-panel.component';
 import { MatTabsModule } from '@angular/material/tabs';
 import { DashboardWidgetComponent } from './components/widget/dashboard-widget.component';
@@ -107,7 +106,6 @@ import { SharedUiModule } from '@streampipes/shared-ui';
   ],
   declarations: [
     BarRaceWidgetComponent,
-    DashboardComponent,
     DashboardGridComponent,
     DashboardOverviewComponent,
     DashboardPanelComponent,
@@ -137,8 +135,8 @@ import { SharedUiModule } from '@streampipes/shared-ui';
     SemanticTypeUtilsService
   ],
   exports: [
-    DashboardComponent,
-    DashboardWidgetComponent
+    DashboardWidgetComponent,
+    StandaloneDashboardComponent
   ]
 })
 export class DashboardModule {


[incubator-streampipes] 02/02: [STREAMPIPES-537] Harmonize pipeline element installation module

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

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

commit 407bfabecad328639d345cb45a1e2837a2506214
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Tue Jul 12 17:40:31 2022 +0200

    [STREAMPIPES-537] Harmonize pipeline element installation module
---
 ui/src/app/add/add.component.html                  | 96 +++++++++++-----------
 ui/src/app/add/add.component.scss                  |  4 +
 ui/src/app/add/add.module.ts                       |  2 +
 .../add-endpoint/add-endpoint.component.html       |  2 +-
 .../existing-adapters.component.html               |  2 +-
 5 files changed, 54 insertions(+), 52 deletions(-)

diff --git a/ui/src/app/add/add.component.html b/ui/src/app/add/add.component.html
index c970623a1..0c7509465 100644
--- a/ui/src/app/add/add.component.html
+++ b/ui/src/app/add/add.component.html
@@ -16,46 +16,35 @@
   ~
   -->
 
-<div fxLayout="column" class="page-container">
-    <div fxLayout="row" class="border sp-bg-lightgray p-0">
-        <div fxFlex="100" class="page-container-nav">
-            <div fxFlex="100" fxLayout="row">
-                <button mat-button mat-flat-button color="accent" (click)="showManageRdfEndpointsDialog()">Manage
-                    Endpoints
-                </button>
-            </div>
-        </div>
-    </div>
-    <div fxLayout="row" class="fixed-height add-options sp-tab-bg">
-        <div class="add-options-item pl-5" fxLayoutAlign="start center" fxLayout="row">
-            <div fxFlex="100" fxLayout="row">
-                <button mat-button mat-raised-button color="accent" [disabled]="selectedEndpointItems.length === 0"
+<sp-basic-view [showBackLink]="false" [padding]="true">
+    <div nav fxFlex="100" fxLayoutAlign="start center" fxLayout="row" class="pl-10">
+        <div fxFlex="100" fxLayout="row">
+            <button mat-button mat-raised-button color="accent" [disabled]="selectedEndpointItems.length === 0"
                     (click)="installSelected()" class="mr-10">
-                    <i class="material-icons">cloud_download</i>
-                    &nbsp;Install selected
-                </button>
-                <button mat-button mat-raised-button color="accent" [disabled]="selectedEndpointItems.length === 0"
+                <i class="material-icons">cloud_download</i>
+                &nbsp;Install selected
+            </button>
+            <button mat-button mat-raised-button color="accent" [disabled]="selectedEndpointItems.length === 0"
                     (click)="uninstallSelected()" class="mr-10">
-                    <i class="material-icons">delete</i>
-                    &nbsp;Uninstall selected
-                </button>
-                <button mat-button mat-icon-button color="accent" class="mr-10" (click)="selectAll(true)"
+                <i class="material-icons">delete</i>
+                &nbsp;Uninstall selected
+            </button>
+            <button mat-button mat-icon-button color="accent" class="mr-10" (click)="selectAll(true)"
                     matTooltip="Select all" matTooltipPosition="above">
-                    <i class="material-icons">queue</i>
-                </button>
-                <button mat-button mat-icon-button color="accent" class="mr-10" (click)="selectAll(false)"
+                <i class="material-icons">queue</i>
+            </button>
+            <button mat-button mat-icon-button color="accent" class="mr-10" (click)="selectAll(false)"
                     matTooltip="Select none" matTooltipPosition="above">
-                    <i class="material-icons">filter_none</i>
-                </button>
-            </div>
+                <i class="material-icons">filter_none</i>
+            </button>
         </div>
         <span fxFlex></span>
-        <div class="add-options-item" fxLayoutAlign="start center" fxLayout="row">
+        <div fxLayoutAlign="start center" fxLayout="row">
             <mat-form-field color="accent">
-                <mat-select [(value)]="selectedCategory" 
-                (selectionChange)="filterByCatergory($event)" >
+                <mat-select [(value)]="selectedCategory"
+                            (selectionChange)="filterByCatergory($event)">
                     <mat-option [value]="'all'">
-                        All 
+                        All
                     </mat-option>
                     <mat-option [value]="'set'">
                         Sets
@@ -72,14 +61,14 @@
                 </mat-select>
             </mat-form-field>
         </div>
-        <div class="add-options-item pl-5" fxLayoutAlign="start center" fxLayout="row">
+        <div class="ml-10" fxLayoutAlign="start center" fxLayout="row">
             <mat-icon>search</mat-icon>
 
-            <mat-form-field class="form-style" color="accent">
+            <mat-form-field class="form-style" color="accent" floatLabel="never">
                 <input matInput placeholder="Find Element" value="" [(ngModel)]="filterTerm" name="something">
             </mat-form-field>
         </div>
-        <div class="add-options-item" fxLayoutAlign="start center" fxLayout="row">
+        <div fxLayoutAlign="start center" fxLayout="row" class="ml-10">
             <mat-form-field color="accent">
                 <mat-select [(value)]="selectedInstallationStatus">
                     <mat-option [value]="'all'">
@@ -94,28 +83,35 @@
                 </mat-select>
             </mat-form-field>
         </div>
-        <div class="add-options-item" fxLayoutAlign="start center" fxLayout="row">
+        <div fxLayoutAlign="start center" fxLayout="row" class="ml-10">
             <button mat-button mat-icon-button color="accent" (click)="getEndpointItems()" matTooltip="Reload items"
-                matTooltipPosition="above">
+                    matTooltipPosition="above">
                 <mat-icon>refresh</mat-icon>
             </button>
         </div>
+        <button mat-button mat-icon-button color="accent" (click)="showManageRdfEndpointsDialog()"
+                matTooltip="Manage Endpoints">
+            <i class="material-icons">settings</i>
+        </button>
     </div>
+    <div fxLayout="column" fxFlex="100">
 
-    <div fxFlex="100" fxLayout="column" fxLayoutAlign="start start" class="page-container-padding-inner"
-        *ngIf="endpointItemsLoadingComplete">
-        <div fxLayoutAlign="start start" fxLayout="column">
 
+        <div fxFlex="100" fxLayout="column" fxLayoutAlign="start start"
+             *ngIf="endpointItemsLoadingComplete">
+            <div fxLayoutAlign="start start" fxLayout="column">
+                <sp-basic-header-title-component title="Available Pipeline Elements"></sp-basic-header-title-component>
+            </div>
+            <div fxLayout="row wrap" class="w-100">
+                <sp-endpoint-item fxFlex="33" [itemSelected]="endpointItem.selected" [item]="endpointItem"
+                                  (triggerInstallation)="triggerInstallation($event)"
+                                  *ngFor="let endpointItem of endpointItems | pipelineElementTypeFilter: selectedTab | pipelineElementNameFilter: filterTerm | pipelineElementInstallationStatusFilter: selectedInstallationStatus | orderBy: 'asc':'name'"
+                                  class="p-15" (click)="toggleSelected(endpointItem)"></sp-endpoint-item>
+            </div>
         </div>
-        <div fxLayout="row wrap" class="w-100">
-            <sp-endpoint-item fxFlex="33" [itemSelected]="endpointItem.selected" [item]="endpointItem"
-                (triggerInstallation)="triggerInstallation($event)"
-                *ngFor="let endpointItem of endpointItems | pipelineElementTypeFilter: selectedTab | pipelineElementNameFilter: filterTerm | pipelineElementInstallationStatusFilter: selectedInstallationStatus | orderBy: 'asc':'name'"
-                class="p-15" (click)="toggleSelected(endpointItem)"></sp-endpoint-item>
+        <div fxFlex="100" fxLayout="row" fxLayoutAlign="center center" *ngIf="!endpointItemsLoadingComplete">
+            <mat-spinner [mode]="'indeterminate'" [diameter]="20" color="accent"></mat-spinner>
+            <h4>&nbsp;&nbsp;Searching for available pipeline elements, please wait...</h4>
         </div>
     </div>
-    <div fxFlex="100" fxLayout="row" fxLayoutAlign="center center" *ngIf="!endpointItemsLoadingComplete">
-        <mat-spinner [mode]="'indeterminate'" [diameter]="20" color="accent"></mat-spinner>
-        <h4>&nbsp;&nbsp;Searching for available pipeline elements, please wait...</h4>
-    </div>
-</div>
\ No newline at end of file
+</sp-basic-view>
diff --git a/ui/src/app/add/add.component.scss b/ui/src/app/add/add.component.scss
index b641e781f..ffe023f99 100644
--- a/ui/src/app/add/add.component.scss
+++ b/ui/src/app/add/add.component.scss
@@ -30,6 +30,10 @@
   margin-right: 10px;
 }
 
+.ml-10 {
+  margin-left: 10px;
+}
+
 .add-options {
   padding:0px;
   border-bottom: 1px solid var(--color-bg-2);
diff --git a/ui/src/app/add/add.module.ts b/ui/src/app/add/add.module.ts
index f85f8b1cc..9c91e7dd7 100644
--- a/ui/src/app/add/add.module.ts
+++ b/ui/src/app/add/add.module.ts
@@ -34,6 +34,7 @@ import { EndpointInstallationComponent } from './dialogs/endpoint-installation/e
 import { PipelineElementNameFilter } from './filter/pipeline-element-name.pipe';
 import { PipelineElementInstallationStatusFilter } from './filter/pipeline-element-installation-status.pipe';
 import { RouterModule } from "@angular/router";
+import { SharedUiModule } from '../../../projects/streampipes/shared-ui/src/lib/shared-ui.module';
 
 
 @NgModule({
@@ -56,6 +57,7 @@ import { RouterModule } from "@angular/router";
         ]
       }
     ]),
+    SharedUiModule
   ],
   declarations: [
     AddComponent,
diff --git a/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.html b/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.html
index 6dd1064f1..2b9c7cf53 100644
--- a/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.html
+++ b/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.html
@@ -50,7 +50,7 @@
             </div>
         </div>
         <div style="margin-top:10px;">
-            <button mat-button mat-raised-button color="accent" (click)="showAddInput()">Add Category</button>
+            <button mat-button mat-raised-button color="accent" (click)="showAddInput()">Add Endpoint</button>
         </div>
     </div>
     <mat-divider></mat-divider>
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 d9ac903c5..c9b811da4 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
@@ -15,7 +15,7 @@
   ~ limitations under the License.
   ~
   -->
-<sp-basic-view [showBackLink]="false" padding="0">
+<sp-basic-view [showBackLink]="false" [padding]="true">
 
     <div nav fxFlex="100" fxLayoutAlign="start center" fxLayout="row" class="pl-10">
         <button mat-button mat-raised-button color="accent" (click)="createNewAdapter()">