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/05 19:04:20 UTC

[incubator-streampipes] branch dev updated (507551f5f -> 5b3d970f9)

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

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


    from 507551f5f [STREAMPIPES-556] Add silent period to notifications, upgrade sink to new single-class model
     new 3a1bfca31 [hotfix] Improve layout of button toggle in general configuration view
     new 5b3d970f9 [STREAMPIPES-557] Move notifications from iconbar to toolbar

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:
 .../general-configuration.component.html           |  4 ++--
 .../core/components/iconbar/iconbar.component.html | 12 ----------
 .../core/components/iconbar/iconbar.component.ts   | 16 +------------
 .../core/components/toolbar/toolbar.component.html | 16 +++++++++++++
 .../core/components/toolbar/toolbar.component.ts   | 26 +++++++++++++++++++---
 5 files changed, 42 insertions(+), 32 deletions(-)


[incubator-streampipes] 02/02: [STREAMPIPES-557] Move notifications from iconbar to toolbar

Posted by ri...@apache.org.
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/incubator-streampipes.git

commit 5b3d970f940470a4c53ceba5ef6e0b6b9b887417
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Tue Jul 5 21:04:11 2022 +0200

    [STREAMPIPES-557] Move notifications from iconbar to toolbar
---
 .../core/components/iconbar/iconbar.component.html | 12 ----------
 .../core/components/iconbar/iconbar.component.ts   | 16 +------------
 .../core/components/toolbar/toolbar.component.html | 16 +++++++++++++
 .../core/components/toolbar/toolbar.component.ts   | 26 +++++++++++++++++++---
 4 files changed, 40 insertions(+), 30 deletions(-)

diff --git a/ui/src/app/core/components/iconbar/iconbar.component.html b/ui/src/app/core/components/iconbar/iconbar.component.html
index a04b7845e..8e9b6a2fe 100644
--- a/ui/src/app/core/components/iconbar/iconbar.component.html
+++ b/ui/src/app/core/components/iconbar/iconbar.component.html
@@ -28,19 +28,7 @@
         </button>
         </div>
     </div>
-    <div [ngClass]="'notifications' === activePage ? 'sp-navbar-item-selected' : 'sp-navbar-item'"
-         style="padding-top:5px;padding-bottom:5px;" *ngIf="notificationsVisible">
-        <button mat-button mat-icon-button class="md-icon-button button-margin-iconbar iconbar-size"
-                (click)="go('notifications')"
-                matTooltip="Notifications" matTooltipPosition="right">
-            <mat-icon [matBadge]="unreadNotificationCount"
-                      [matBadgeHidden]="unreadNotificationCount == 0"
-                      [ngClass]="'notifications' === activePage ?'sp-navbar-icon-selected' : 'sp-navbar-icon'"
-                      data-cy="navigation-icon">chat
 
-            </mat-icon>
-        </button>
-    </div>
     <mat-divider style="border-top-color:var(--color-navigation-text);"></mat-divider>
     <div *ngFor="let item of admin" >
         <div  [ngClass]="item.link === activePage ? 'sp-navbar-item-selected' : 'sp-navbar-item'"
diff --git a/ui/src/app/core/components/iconbar/iconbar.component.ts b/ui/src/app/core/components/iconbar/iconbar.component.ts
index a670fda90..9d7aeeaf9 100644
--- a/ui/src/app/core/components/iconbar/iconbar.component.ts
+++ b/ui/src/app/core/components/iconbar/iconbar.component.ts
@@ -31,10 +31,8 @@ import { AppConstants } from '../../../services/app.constants';
   templateUrl: './iconbar.component.html',
   styleUrls: ['./iconbar.component.scss']
 })
-export class IconbarComponent extends BaseNavigationComponent implements OnInit, OnDestroy {
+export class IconbarComponent extends BaseNavigationComponent implements OnInit {
 
-  unreadNotificationCount = 0;
-  unreadNotificationsSubscription: Subscription;
 
   constructor(router: Router,
               authService: AuthService,
@@ -46,18 +44,6 @@ export class IconbarComponent extends BaseNavigationComponent implements OnInit,
 
   ngOnInit(): void {
     super.onInit();
-    this.unreadNotificationsSubscription = timer(0, 10000).pipe(
-      exhaustMap(() => this.restApi.getUnreadNotificationsCount()))
-      .subscribe(response => {
-        this.notificationCountService.unreadNotificationCount$.next(response.count);
-      });
 
-    this.notificationCountService.unreadNotificationCount$.subscribe(count => {
-      this.unreadNotificationCount = count;
-    });
-  }
-
-  ngOnDestroy() {
-    this.unreadNotificationsSubscription.unsubscribe();
   }
 }
diff --git a/ui/src/app/core/components/toolbar/toolbar.component.html b/ui/src/app/core/components/toolbar/toolbar.component.html
index 0d1034707..871dcf29b 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.html
+++ b/ui/src/app/core/components/toolbar/toolbar.component.html
@@ -34,6 +34,22 @@
 <!--            <div>-->
 <!--                <mat-slide-toggle color="accent" [formControl]="appearanceControl">Dark Mode</mat-slide-toggle>-->
 <!--            </div>-->
+            <div [ngClass]="'notifications' === activePage ? 'sp-navbar-item-selected' : 'sp-navbar-item'"
+                 *ngIf="notificationsVisible" class="h-100">
+                <button mat-button mat-icon-button class="md-icon-button button-margin-iconbar iconbar-size"
+                        (click)="go('notifications')"
+                        fxLayout fxLayoutAlign="center center"
+                        matTooltip="Notifications" matTooltipPosition="bottom">
+                    <mat-icon [matBadge]="unreadNotificationCount"
+                              matBadgeColor="accent"
+                              matBadgePosition="below after"
+                              [matBadgeHidden]="unreadNotificationCount == 0"
+                              [ngClass]="'notifications' === activePage ?'sp-navbar-icon-selected' : 'sp-navbar-icon'"
+                              data-cy="navigation-icon">chat
+
+                    </mat-icon>
+                </button>
+            </div>
             <div style="height:100%;">
                 <div [ngClass]="accountMenuOpen.menuOpen ? 'sp-navbar-item-selected' : 'sp-navbar-item'" fxLayout fxLayoutAlign="center center" style="height: 100%;">
                     <button mat-button mat-icon-button
diff --git a/ui/src/app/core/components/toolbar/toolbar.component.ts b/ui/src/app/core/components/toolbar/toolbar.component.ts
index ff14471b8..d476b91df 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.ts
+++ b/ui/src/app/core/components/toolbar/toolbar.component.ts
@@ -16,7 +16,7 @@
  *
  */
 
-import { Component, OnInit, ViewChild } from '@angular/core';
+import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
 import { BaseNavigationComponent } from '../base-navigation.component';
 import { Router } from '@angular/router';
 import { RestApi } from '../../../services/rest-api.service';
@@ -26,13 +26,16 @@ import { OverlayContainer } from '@angular/cdk/overlay';
 import { ProfileService } from '../../../profile/profile.service';
 import { AuthService } from '../../../services/auth.service';
 import { AppConstants } from '../../../services/app.constants';
+import { Subscription, timer } from 'rxjs';
+import { exhaustMap } from 'rxjs/operators';
+import { NotificationCountService } from '../../../services/notification-count-service';
 
 @Component({
   selector: 'toolbar',
   templateUrl: './toolbar.component.html',
   styleUrls: ['./toolbar.component.scss']
 })
-export class ToolbarComponent extends BaseNavigationComponent implements OnInit {
+export class ToolbarComponent extends BaseNavigationComponent implements OnInit, OnDestroy {
 
   @ViewChild('feedbackOpen') feedbackOpen: MatMenuTrigger;
   @ViewChild('accountMenuOpen') accountMenuOpen: MatMenuTrigger;
@@ -42,16 +45,29 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
 
   appearanceControl: FormControl;
 
+  unreadNotificationCount = 0;
+  unreadNotificationsSubscription: Subscription;
+
   constructor(router: Router,
               private profileService: ProfileService,
               private restApi: RestApi,
               private overlay: OverlayContainer,
               authService: AuthService,
-              appConstants: AppConstants) {
+              appConstants: AppConstants,
+              public notificationCountService: NotificationCountService) {
     super(authService, router, appConstants);
   }
 
   ngOnInit(): void {
+    this.unreadNotificationsSubscription = timer(0, 10000).pipe(
+      exhaustMap(() => this.restApi.getUnreadNotificationsCount()))
+      .subscribe(response => {
+        this.notificationCountService.unreadNotificationCount$.next(response.count);
+      });
+
+    this.notificationCountService.unreadNotificationCount$.subscribe(count => {
+      this.unreadNotificationCount = count;
+    });
     this.authService.user$.subscribe(user => {
       this.userEmail = user.displayName;
       this.profileService.getUserProfile(user.username).subscribe(userInfo => {
@@ -97,4 +113,8 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
     this.router.navigate(['login']);
   }
 
+  ngOnDestroy() {
+    this.unreadNotificationsSubscription.unsubscribe();
+  }
+
 }


[incubator-streampipes] 01/02: [hotfix] Improve layout of button toggle in general configuration view

Posted by ri...@apache.org.
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/incubator-streampipes.git

commit 3a1bfca3120df391fede57caea5c23b39da6ccf3
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Tue Jul 5 21:00:46 2022 +0200

    [hotfix] Improve layout of button toggle in general configuration view
---
 .../general-configuration/general-configuration.component.html        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui/src/app/configuration/general-configuration/general-configuration.component.html b/ui/src/app/configuration/general-configuration/general-configuration.component.html
index e072b9840..3be142995 100644
--- a/ui/src/app/configuration/general-configuration/general-configuration.component.html
+++ b/ui/src/app/configuration/general-configuration/general-configuration.component.html
@@ -31,7 +31,7 @@
                     <div class="subsection-title">Host and Port</div>
                     <div fxLayout="column" fxFlex="100">
                         <div fxLayout="row">
-                            <div>
+                            <div fxLayout="row" fxLayoutAlign="start center">
                                 <mat-button-toggle-group name="protocol" aria-label="Protocol"
                                     formControlName="protocol">
                                     <mat-button-toggle value="http">http</mat-button-toggle>
@@ -89,4 +89,4 @@
         </div>
 
     </div>
-</sp-configuration-component>
\ No newline at end of file
+</sp-configuration-component>