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 2021/07/19 21:13:24 UTC
[incubator-streampipes] branch STREAMPIPES-319 updated (74fb762 ->
eb7c177)
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a change to branch STREAMPIPES-319
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git.
from 74fb762 [STREAMPIPES-395] Harmonize colors in data explorer module
new 65e4fff [STREAMPIPES-395] Improve layout of data explorer module
new 1d042b3 [STREAMPIPES-395] Decrease toolbar height
new 47ca256 [STREAMPIPES-395] Move version info to bottom of iconbar
new ebf0fa6 [STREAMPIPES-395] Harmonize css of info module
new 1a15e48 [STREAMPIPES-395] Add user-level configuration option to select color scheme
new 2410895 [STREAMPIPES-395] Modify layout of toolbar
new eb7c177 [STREAMPIPES-319] Change auto-generated element id of generic adapters
The 7 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:
.../apache/streampipes/model/client/user/User.java | 9 ++++++++
.../adapter/GenericAdapterSetDescription.java | 4 +++-
.../adapter/GenericAdapterStreamDescription.java | 3 ++-
.../streampipes/model/util/ElementIdGenerator.java | 12 ++++++++--
.../org/apache/streampipes/rest/impl/User.java | 16 +++++++++++++
.../connect/services/data-marketplace.service.ts | 2 --
.../app/core-model/gen/streampipes-model-client.ts | 4 +++-
.../core/components/iconbar/iconbar.component.html | 17 ++++++++------
.../components/iconbar/iconbar.component.scss} | 5 ++--
.../core/components/iconbar/iconbar.component.ts | 4 ++--
.../streampipes/streampipes.component.html | 6 ++---
.../streampipes/streampipes.component.scss | 4 ++++
.../core/components/toolbar/toolbar.component.html | 19 +++++++--------
.../core/components/toolbar/toolbar.component.scss | 15 ++++++++++++
.../core/components/toolbar/toolbar.component.ts | 15 ++++++++----
.../widgets/table/table-widget.component.html | 2 +-
.../no-data/no-data-in-date-range.component.css | 7 ++++++
.../no-data/no-data-in-date-range.component.html | 5 ++--
ui/src/app/info/about/about.component.html | 17 +++++---------
ui/src/app/info/info.component.html | 8 +++----
.../general-profile-settings.component.html | 21 +++++++++++++++++
.../general-profile-settings.component.scss | 10 ++++++++
.../general/general-profile-settings.component.ts | 27 +++++++++++++++++++++-
ui/src/app/profile/profile.service.ts | 6 +++++
ui/src/scss/sp/buttons.ng1.scss | 1 +
ui/src/scss/sp/layout.scss | 8 +++++++
ui/src/scss/sp/main.scss | 4 ++--
ui/src/scss/sp/sp-theme.scss | 2 ++
ui/src/scss/sp/widgets.scss | 4 ++--
29 files changed, 199 insertions(+), 58 deletions(-)
copy ui/src/app/{pipeline-details/pipeline-details.component.scss => core/components/iconbar/iconbar.component.scss} (96%)
[incubator-streampipes] 03/07: [STREAMPIPES-395] Move version info
to bottom of iconbar
Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch STREAMPIPES-319
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 47ca256b042fdcd5b89eaf905527974d00c14b84
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Mon Jul 19 20:04:42 2021 +0200
[STREAMPIPES-395] Move version info to bottom of iconbar
---
ui/src/app/core/components/iconbar/iconbar.component.html | 14 ++++++++++----
ui/src/app/core/components/iconbar/iconbar.component.scss | 11 +++++++++++
ui/src/app/core/components/iconbar/iconbar.component.ts | 13 ++++++++++++-
ui/src/app/core/components/toolbar/toolbar.component.html | 3 ---
ui/src/app/core/components/toolbar/toolbar.component.ts | 8 +-------
5 files changed, 34 insertions(+), 15 deletions(-)
diff --git a/ui/src/app/core/components/iconbar/iconbar.component.html b/ui/src/app/core/components/iconbar/iconbar.component.html
index d6e8bc0..086baf0 100644
--- a/ui/src/app/core/components/iconbar/iconbar.component.html
+++ b/ui/src/app/core/components/iconbar/iconbar.component.html
@@ -16,7 +16,7 @@
~
-->
-<div style="padding-top:0px;">
+<div style="padding-top:0px;" fxFlex="100" fxLayout="column">
<div [ngClass]="item.link === activePage ? 'sp-navbar-item-selected': 'sp-navbar-item'"
*ngFor="let item of menu" style="min-width:0px;padding:0px;padding-top:5px;padding-bottom:5px;">
<button mat-button mat-icon-button class="button-margin-iconbar iconbar-size" (click)="go(item.link)"
@@ -31,17 +31,23 @@
<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]="NotificationCountService.unreadNotificationCount" [matBadgeHidden]="NotificationCountService.unreadNotificationCount == 0" [ngClass]="'notifications' === activePage ?'sp-navbar-icon-selected' : 'sp-navbar-icon'">chat
+ <mat-icon [matBadge]="NotificationCountService.unreadNotificationCount"
+ [matBadgeHidden]="NotificationCountService.unreadNotificationCount == 0"
+ [ngClass]="'notifications' === activePage ?'sp-navbar-icon-selected' : 'sp-navbar-icon'">chat
</mat-icon>
</button>
</div>
- <mat-divider style="border-top-color:white;"></mat-divider>
+ <mat-divider style="border-top-color:var(--color-navigation-text);"></mat-divider>
<div [ngClass]="item.link === activePage ? 'sp-navbar-item-selected' : 'sp-navbar-item'"
*ngFor="let item of admin" style="padding-top:5px;padding-bottom:5px;">
- <button mat-button mat-icon-button class="md-icon-button button-margin-iconbar iconbar-size" (click)="go(item.link)"
+ <button mat-button mat-icon-button class="md-icon-button button-margin-iconbar iconbar-size"
+ (click)="go(item.link)"
matTooltip="{{item.title}}">
<mat-icon
[ngClass]="item.link === activePage ?'sp-navbar-icon-selected' : 'sp-navbar-icon'">{{item.icon}}</mat-icon>
</button>
</div>
+ <div fxFlex="100" fxLayoutAlign="center end">
+ <span class="version-info-text">v{{versionInfo.backendVersion}}</span>
+ </div>
</div>
diff --git a/ui/src/app/core/components/iconbar/iconbar.component.scss b/ui/src/app/core/components/iconbar/iconbar.component.scss
index 33d1429..9034201 100644
--- a/ui/src/app/core/components/iconbar/iconbar.component.scss
+++ b/ui/src/app/core/components/iconbar/iconbar.component.scss
@@ -19,3 +19,14 @@
.iconbar-size {
width: 35px;
}
+
+.version-info-text {
+ position: relative;
+ bottom: 10px;
+ color: var(--color-navigation-text);
+ font-size: small;
+ display: block;
+ transform: rotate(-90deg) translate(-100%);
+ margin-top: -50%;
+ white-space: nowrap;
+}
diff --git a/ui/src/app/core/components/iconbar/iconbar.component.ts b/ui/src/app/core/components/iconbar/iconbar.component.ts
index 2d2b9b7..181acb9 100644
--- a/ui/src/app/core/components/iconbar/iconbar.component.ts
+++ b/ui/src/app/core/components/iconbar/iconbar.component.ts
@@ -20,9 +20,11 @@ import {Component, OnInit} from "@angular/core";
import {BaseNavigationComponent} from "../base-navigation.component";
import {Client} from "@stomp/stompjs";
import {NotificationItem} from "../../../notifications/model/notifications.model";
+import {RestApi} from "../../../services/rest-api.service";
import {Router} from "@angular/router";
import {AuthStatusService} from "../../../services/auth-status.service";
import {NotificationCountService} from "../../../services/notification-count-service";
+import {VersionInfo} from "../../../info/versions/service/version-info.model";
@Component({
selector: 'iconbar',
@@ -32,15 +34,18 @@ import {NotificationCountService} from "../../../services/notification-count-ser
export class IconbarComponent extends BaseNavigationComponent implements OnInit {
unreadNotifications: number = 0;
+ versionInfo: VersionInfo;
constructor(Router: Router,
private AuthStatusService: AuthStatusService,
- public NotificationCountService: NotificationCountService) {
+ public NotificationCountService: NotificationCountService,
+ private RestApi: RestApi,) {
super(Router);
}
ngOnInit(): void {
super.onInit();
+ this.getVersion();
this.connectToBroker();
this.NotificationCountService.loadUnreadNotifications();
}
@@ -71,4 +76,10 @@ export class IconbarComponent extends BaseNavigationComponent implements OnInit
stompClient.activate();
}
+ getVersion(){
+ this.RestApi.getVersionInfo().subscribe((response) => {
+ this.versionInfo = response as VersionInfo;
+ })
+ }
+
}
diff --git a/ui/src/app/core/components/toolbar/toolbar.component.html b/ui/src/app/core/components/toolbar/toolbar.component.html
index 35cc13a..1cd1b68 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.html
+++ b/ui/src/app/core/components/toolbar/toolbar.component.html
@@ -33,9 +33,6 @@
<div>
<mat-slide-toggle color="accent" [formControl]="appearanceControl">Dark Mode</mat-slide-toggle>
</div>
- <div style="padding: 5px 5px;margin-left:10px;font-size:12pt;">
- <span style="margin-top:12px;font-weight:bold;">version: </span><span style="font-weight: normal;" *ngIf="versionInfo">{{versionInfo.backendVersion}}</span>
- </div>
<div style="height:100%;">
<div [ngClass]="feedbackOpen.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 72721d7..6429cbc 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.ts
+++ b/ui/src/app/core/components/toolbar/toolbar.component.ts
@@ -36,7 +36,6 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
@ViewChild('feedbackOpen') feedbackOpen: MatMenuTrigger;
@ViewChild('accountMenuOpen') accountMenuOpen: MatMenuTrigger;
- versionInfo: VersionInfo;
userEmail;
appearanceControl: FormControl;
@@ -59,7 +58,6 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
});
//this.darkMode = this.AuthStatusService.darkMode;
super.onInit();
- this.getVersion();
}
modifyAppearance(darkMode: boolean) {
@@ -99,9 +97,5 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
});
};
- getVersion(){
- this.RestApi.getVersionInfo().subscribe((response) => {
- this.versionInfo = response as VersionInfo;
- })
- }
+
}
[incubator-streampipes] 06/07: [STREAMPIPES-395] Modify layout of
toolbar
Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch STREAMPIPES-319
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 2410895cca5b1ff15ba29e9a5d181a8ae87bee42
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Mon Jul 19 22:31:53 2021 +0200
[STREAMPIPES-395] Modify layout of toolbar
---
ui/src/app/core/components/iconbar/iconbar.component.html | 3 ---
ui/src/app/core/components/iconbar/iconbar.component.scss | 11 +----------
ui/src/app/core/components/iconbar/iconbar.component.ts | 14 +-------------
ui/src/app/core/components/toolbar/toolbar.component.html | 5 ++++-
ui/src/app/core/components/toolbar/toolbar.component.scss | 9 +++++++++
ui/src/app/core/components/toolbar/toolbar.component.ts | 8 ++++++++
6 files changed, 23 insertions(+), 27 deletions(-)
diff --git a/ui/src/app/core/components/iconbar/iconbar.component.html b/ui/src/app/core/components/iconbar/iconbar.component.html
index 086baf0..051b245 100644
--- a/ui/src/app/core/components/iconbar/iconbar.component.html
+++ b/ui/src/app/core/components/iconbar/iconbar.component.html
@@ -47,7 +47,4 @@
[ngClass]="item.link === activePage ?'sp-navbar-icon-selected' : 'sp-navbar-icon'">{{item.icon}}</mat-icon>
</button>
</div>
- <div fxFlex="100" fxLayoutAlign="center end">
- <span class="version-info-text">v{{versionInfo.backendVersion}}</span>
- </div>
</div>
diff --git a/ui/src/app/core/components/iconbar/iconbar.component.scss b/ui/src/app/core/components/iconbar/iconbar.component.scss
index 9034201..885298c 100644
--- a/ui/src/app/core/components/iconbar/iconbar.component.scss
+++ b/ui/src/app/core/components/iconbar/iconbar.component.scss
@@ -20,13 +20,4 @@
width: 35px;
}
-.version-info-text {
- position: relative;
- bottom: 10px;
- color: var(--color-navigation-text);
- font-size: small;
- display: block;
- transform: rotate(-90deg) translate(-100%);
- margin-top: -50%;
- white-space: nowrap;
-}
+
diff --git a/ui/src/app/core/components/iconbar/iconbar.component.ts b/ui/src/app/core/components/iconbar/iconbar.component.ts
index 181acb9..46aabdb 100644
--- a/ui/src/app/core/components/iconbar/iconbar.component.ts
+++ b/ui/src/app/core/components/iconbar/iconbar.component.ts
@@ -20,11 +20,9 @@ import {Component, OnInit} from "@angular/core";
import {BaseNavigationComponent} from "../base-navigation.component";
import {Client} from "@stomp/stompjs";
import {NotificationItem} from "../../../notifications/model/notifications.model";
-import {RestApi} from "../../../services/rest-api.service";
import {Router} from "@angular/router";
import {AuthStatusService} from "../../../services/auth-status.service";
import {NotificationCountService} from "../../../services/notification-count-service";
-import {VersionInfo} from "../../../info/versions/service/version-info.model";
@Component({
selector: 'iconbar',
@@ -34,18 +32,15 @@ import {VersionInfo} from "../../../info/versions/service/version-info.model";
export class IconbarComponent extends BaseNavigationComponent implements OnInit {
unreadNotifications: number = 0;
- versionInfo: VersionInfo;
constructor(Router: Router,
private AuthStatusService: AuthStatusService,
- public NotificationCountService: NotificationCountService,
- private RestApi: RestApi,) {
+ public NotificationCountService: NotificationCountService) {
super(Router);
}
ngOnInit(): void {
super.onInit();
- this.getVersion();
this.connectToBroker();
this.NotificationCountService.loadUnreadNotifications();
}
@@ -75,11 +70,4 @@ export class IconbarComponent extends BaseNavigationComponent implements OnInit
stompClient.activate();
}
-
- getVersion(){
- this.RestApi.getVersionInfo().subscribe((response) => {
- this.versionInfo = response as VersionInfo;
- })
- }
-
}
diff --git a/ui/src/app/core/components/toolbar/toolbar.component.html b/ui/src/app/core/components/toolbar/toolbar.component.html
index 203177b..74a04b8 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.html
+++ b/ui/src/app/core/components/toolbar/toolbar.component.html
@@ -24,12 +24,15 @@
<img alt="icon" src="../../../../assets/img/sp/logo-navigation.png" style="height:30px;">
</div>
<div style="padding: 5px 5px;font-size:15px;margin-left:10px;">
- <h4 style="margin-top:16px;font-size:12pt;font-weight:bold;">{{activePageName}}</h4>
+ <h4 style="margin-top:14px;font-size:12pt;font-weight:bold;">{{activePageName}}</h4>
</div>
</div>
</div>
<span fxFlex></span>
<div fxFlex="40" fxLayout fxLayoutAlign="end center" *ngIf="authenticated" style="height:100%;">
+ <div fxLayoutAlign="start center" *ngIf="versionInfo.backendVersion">
+ <span class="version-info-text">v{{versionInfo.backendVersion}}</span>
+ </div>
<!-- uncomment this to quickly investigate layout issues between dark and light mode -->
<!-- <div>-->
<!-- <mat-slide-toggle color="accent" [formControl]="appearanceControl">Dark Mode</mat-slide-toggle>-->
diff --git a/ui/src/app/core/components/toolbar/toolbar.component.scss b/ui/src/app/core/components/toolbar/toolbar.component.scss
index 57f14f5..71920e8 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.scss
+++ b/ui/src/app/core/components/toolbar/toolbar.component.scss
@@ -44,3 +44,12 @@
max-height:40px;
width:100%;
}
+
+.version-info-text {
+ color: var(--color-navigation-text);
+ font-size: small;
+ display: block;
+ margin-top: 3px;
+ margin-right: 15px;
+ white-space: nowrap;
+}
diff --git a/ui/src/app/core/components/toolbar/toolbar.component.ts b/ui/src/app/core/components/toolbar/toolbar.component.ts
index 13933e7..9af947f 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.ts
+++ b/ui/src/app/core/components/toolbar/toolbar.component.ts
@@ -25,6 +25,7 @@ import {MatMenuTrigger} from "@angular/material/menu";
import {FormControl} from "@angular/forms";
import {OverlayContainer} from "@angular/cdk/overlay";
import {ProfileService} from "../../../profile/profile.service";
+import {VersionInfo} from "../../../info/versions/service/version-info.model";
@Component({
selector: 'toolbar',
@@ -37,6 +38,7 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
@ViewChild('accountMenuOpen') accountMenuOpen: MatMenuTrigger;
userEmail;
+ versionInfo: VersionInfo;
appearanceControl: FormControl;
@@ -49,6 +51,7 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
}
ngOnInit(): void {
+ this.getVersion();
this.userEmail = this.AuthStatusService.email;
this.profileService.getUserProfile().subscribe(user => {
this.AuthStatusService.darkMode = user.darkMode;
@@ -102,5 +105,10 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
});
};
+ getVersion(){
+ this.RestApi.getVersionInfo().subscribe((response) => {
+ this.versionInfo = response as VersionInfo;
+ })
+ }
}
[incubator-streampipes] 02/07: [STREAMPIPES-395] Decrease toolbar
height
Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch STREAMPIPES-319
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 1d042b3f49370dfd9953626201f0da9df75b7d0c
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sun Jul 18 11:41:17 2021 +0200
[STREAMPIPES-395] Decrease toolbar height
---
ui/src/app/core/components/iconbar/iconbar.component.html | 8 ++++----
.../iconbar.component.scss} | 11 ++---------
ui/src/app/core/components/iconbar/iconbar.component.ts | 3 ++-
.../core/components/streampipes/streampipes.component.html | 6 +++---
.../core/components/streampipes/streampipes.component.scss | 4 ++++
ui/src/app/core/components/toolbar/toolbar.component.html | 6 +++---
ui/src/app/core/components/toolbar/toolbar.component.scss | 6 ++++++
ui/src/scss/sp/main.scss | 4 ++--
8 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/ui/src/app/core/components/iconbar/iconbar.component.html b/ui/src/app/core/components/iconbar/iconbar.component.html
index 4185019..d6e8bc0 100644
--- a/ui/src/app/core/components/iconbar/iconbar.component.html
+++ b/ui/src/app/core/components/iconbar/iconbar.component.html
@@ -19,7 +19,7 @@
<div style="padding-top:0px;">
<div [ngClass]="item.link === activePage ? 'sp-navbar-item-selected': 'sp-navbar-item'"
*ngFor="let item of menu" style="min-width:0px;padding:0px;padding-top:5px;padding-bottom:5px;">
- <button mat-button mat-icon-button class="button-margin-iconbar" (click)="go(item.link)"
+ <button mat-button mat-icon-button class="button-margin-iconbar iconbar-size" (click)="go(item.link)"
matTooltip="{{item.title}}" matTooltipPosition="right">
<mat-icon [ngClass]="item.link === activePage ? 'sp-navbar-icon-selected' : 'sp-navbar-icon'">
{{item.icon}}
@@ -28,7 +28,7 @@
</div>
<div [ngClass]="'notifications' === activePage ? 'sp-navbar-item-selected' : 'sp-navbar-item'"
style="padding-top:5px;padding-bottom:5px;">
- <button mat-button mat-icon-button class="md-icon-button button-margin-iconbar"
+ <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]="NotificationCountService.unreadNotificationCount" [matBadgeHidden]="NotificationCountService.unreadNotificationCount == 0" [ngClass]="'notifications' === activePage ?'sp-navbar-icon-selected' : 'sp-navbar-icon'">chat
@@ -38,10 +38,10 @@
<mat-divider style="border-top-color:white;"></mat-divider>
<div [ngClass]="item.link === activePage ? 'sp-navbar-item-selected' : 'sp-navbar-item'"
*ngFor="let item of admin" style="padding-top:5px;padding-bottom:5px;">
- <button mat-button mat-icon-button class="md-icon-button button-margin-iconbar" (click)="go(item.link)"
+ <button mat-button mat-icon-button class="md-icon-button button-margin-iconbar iconbar-size" (click)="go(item.link)"
matTooltip="{{item.title}}">
<mat-icon
[ngClass]="item.link === activePage ?'sp-navbar-icon-selected' : 'sp-navbar-icon'">{{item.icon}}</mat-icon>
</button>
</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/ui/src/app/core/components/streampipes/streampipes.component.scss b/ui/src/app/core/components/iconbar/iconbar.component.scss
similarity index 82%
copy from ui/src/app/core/components/streampipes/streampipes.component.scss
copy to ui/src/app/core/components/iconbar/iconbar.component.scss
index 2230324..33d1429 100644
--- a/ui/src/app/core/components/streampipes/streampipes.component.scss
+++ b/ui/src/app/core/components/iconbar/iconbar.component.scss
@@ -16,13 +16,6 @@
*
*/
-@import "../../../../scss/variables";
-
-.iconbar {
- background: var(--color-navigation-bg);
-}
-
-.base {
- color: var(--color-default-text);
- background: var(--color-bg-0);
+.iconbar-size {
+ width: 35px;
}
diff --git a/ui/src/app/core/components/iconbar/iconbar.component.ts b/ui/src/app/core/components/iconbar/iconbar.component.ts
index 39328db..2d2b9b7 100644
--- a/ui/src/app/core/components/iconbar/iconbar.component.ts
+++ b/ui/src/app/core/components/iconbar/iconbar.component.ts
@@ -27,6 +27,7 @@ import {NotificationCountService} from "../../../services/notification-count-ser
@Component({
selector: 'iconbar',
templateUrl: './iconbar.component.html',
+ styleUrls: ['./iconbar.component.scss']
})
export class IconbarComponent extends BaseNavigationComponent implements OnInit {
@@ -70,4 +71,4 @@ export class IconbarComponent extends BaseNavigationComponent implements OnInit
stompClient.activate();
}
-}
\ No newline at end of file
+}
diff --git a/ui/src/app/core/components/streampipes/streampipes.component.html b/ui/src/app/core/components/streampipes/streampipes.component.html
index cb811f7..3154e84 100644
--- a/ui/src/app/core/components/streampipes/streampipes.component.html
+++ b/ui/src/app/core/components/streampipes/streampipes.component.html
@@ -17,11 +17,11 @@
-->
<div [ngClass]="authStatusService.darkMode ? 'dark-mode base-style' : 'light-mode base-style'">
- <div style="height: 50px;">
+ <div class="sp-toolbar-outer">
<toolbar></toolbar>
</div>
- <div style="display: flex;flex-direction:row; height: calc(100vh - 50px);">
- <div style="width:40px;color:white;" class="iconbar">
+ <div style="display: flex;flex-direction:row; height: calc(100vh - 40px);">
+ <div style="width:35px;color:white;" class="iconbar">
<iconbar></iconbar>
</div>
<div style="width: 100%; height: 100%; overflow-y: auto;" class="base">
diff --git a/ui/src/app/core/components/streampipes/streampipes.component.scss b/ui/src/app/core/components/streampipes/streampipes.component.scss
index 2230324..e6fb5ea 100644
--- a/ui/src/app/core/components/streampipes/streampipes.component.scss
+++ b/ui/src/app/core/components/streampipes/streampipes.component.scss
@@ -26,3 +26,7 @@
color: var(--color-default-text);
background: var(--color-bg-0);
}
+
+.sp-toolbar-outer {
+ height: 40px;
+}
diff --git a/ui/src/app/core/components/toolbar/toolbar.component.html b/ui/src/app/core/components/toolbar/toolbar.component.html
index 1700097..35cc13a 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.html
+++ b/ui/src/app/core/components/toolbar/toolbar.component.html
@@ -17,11 +17,11 @@
-->
<mat-toolbar class="md-primary md-hue-2 top-nav toolbar-bg">
- <div class="md-toolbar-tools" style="height:50px;max-height:50px;width:100%;">
+ <div class="md-toolbar-tools sp-toolbar">
<div fxFlex="60" fxLayout fxLayoutAlign="start center">
- <div class="md-toolbar-tools" style="height:50px;max-height:50px;" fxFlex fxLayout="row" fxLayoutAlign="start center">
+ <div class="md-toolbar-tools" style="height:40px;max-height:40px;" fxFlex fxLayout="row" fxLayoutAlign="start center">
<div style="padding:5px;border-radius:0px;margin-right:15px;position:relative;left:20px;">
- <img alt="icon" src="../../../../assets/img/sp/logo-navigation.png" style="height:35px;">
+ <img alt="icon" src="../../../../assets/img/sp/logo-navigation.png" style="height:30px;">
</div>
<div style="padding: 5px 5px;font-size:15px;margin-left:10px;">
<h4 style="margin-top:16px;font-size:12pt;font-weight:bold;">{{activePageName}}</h4>
diff --git a/ui/src/app/core/components/toolbar/toolbar.component.scss b/ui/src/app/core/components/toolbar/toolbar.component.scss
index cd99037..57f14f5 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.scss
+++ b/ui/src/app/core/components/toolbar/toolbar.component.scss
@@ -38,3 +38,9 @@
border-bottom: 2px solid var(--color-navigation-divider);
color: var(--color-navigation-text);
}
+
+.sp-toolbar {
+ height:40px;
+ max-height:40px;
+ width:100%;
+}
diff --git a/ui/src/scss/sp/main.scss b/ui/src/scss/sp/main.scss
index 15d6e19..91063a9 100644
--- a/ui/src/scss/sp/main.scss
+++ b/ui/src/scss/sp/main.scss
@@ -392,11 +392,11 @@ md-content {
}
md-toolbar.top-nav {
- min-height: 50px !important;
+ min-height: 40px !important;
}
.top-nav {
- height: 50px !important;
+ height: 40px !important;
border-bottom: 0px solid $sp-color-accent;
}
[incubator-streampipes] 04/07: [STREAMPIPES-395] Harmonize css of
info 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-319
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit ebf0fa67a203b334f44c1ae9508bcf33700fa79d
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Mon Jul 19 20:27:05 2021 +0200
[STREAMPIPES-395] Harmonize css of info module
---
ui/src/app/info/about/about.component.html | 17 ++++++-----------
ui/src/app/info/info.component.html | 8 +++-----
2 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/ui/src/app/info/about/about.component.html b/ui/src/app/info/about/about.component.html
index ff653a2..065ba45 100644
--- a/ui/src/app/info/about/about.component.html
+++ b/ui/src/app/info/about/about.component.html
@@ -56,13 +56,11 @@
<li>
<div fxLayout="row fill" fxFlex="100">
<div fxFlex="5" fxLayoutAlign="start center">
- <img height="24" width="24"
- src="https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/github.svg"/>
+ <mat-icon>code</mat-icon>
</div>
<div fxFlex="95" fxLayoutAlign="start center">
<h5> Find the source
- code at <a
- href="https://github.com/apache/incubator-streampipes">https://github.com/apache/incubator-streampipes</a>
+ code at <a href="https://github.com/apache/incubator-streampipes">https://github.com/apache/incubator-streampipes</a>
</h5>
</div>
</div>
@@ -70,8 +68,7 @@
<li>
<div fxLayout="row fill" fxFlex="100">
<div fxFlex="5" fxLayoutAlign="start center">
- <img height="24" width="24"
- src="https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/docker.svg"/>
+ <mat-icon>local_shipping</mat-icon>
</div>
<div fxFlex="95" fxLayoutAlign="start center">
<h5> Find the docker
@@ -93,8 +90,7 @@
<li>
<div fxLayout="row fill" fxFlex="100">
<div fxFlex="5" fxLayoutAlign="start center">
- <img height="24" width="24"
- src="https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/twitter.svg"/>
+ <mat-icon>chat</mat-icon>
</div>
<div fxFlex="95" fxLayoutAlign="start center">
<h5>Follow us on <a
@@ -118,8 +114,7 @@
<li>
<div fxLayout="row fill" fxFlex="100">
<div fxFlex="5" fxLayoutAlign="start center">
- <img height="24" width="24"
- src="https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/github.svg"/>
+ <mat-icon>star_rate</mat-icon>
</div>
<div fxFlex="95" fxLayoutAlign="start center">
<h5>If you like
@@ -133,4 +128,4 @@
</div>
</div>
</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/ui/src/app/info/info.component.html b/ui/src/app/info/info.component.html
index 2887b09..777645d 100644
--- a/ui/src/app/info/info.component.html
+++ b/ui/src/app/info/info.component.html
@@ -17,10 +17,8 @@
-->
<div class="page-container page-container-padding">
- <div _ngcontent-c10="" class="pageheadbar" fxflex="48px" fxlayout="row" fxlayoutalign="start center"
- ng-reflect-layout="row" ng-reflect-align="start center" ng-reflect-flex="48px"
- style="flex: 1 1 48px; box-sizing: border-box; flex-direction: row; display: flex; place-content: center flex-start; align-items: center; min-height: 50px;">
- <mat-tab-group (selectedTabChange)="tabChanged($event)">
+ <div class="page-container-nav">
+ <mat-tab-group (selectedTabChange)="tabChanged($event)" color="accent">
<mat-tab label="About">
</mat-tab>
<mat-tab label="System Info">
@@ -42,4 +40,4 @@
</div>
</div>
-</div>
\ No newline at end of file
+</div>
[incubator-streampipes] 01/07: [STREAMPIPES-395] Improve layout of
data explorer 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-319
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 65e4fff39f7385b618b7d85e1a83e0860f1b0774
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sun Jul 18 11:28:39 2021 +0200
[STREAMPIPES-395] Improve layout of data explorer module
---
.../components/widgets/table/table-widget.component.html | 2 +-
.../widgets/utils/no-data/no-data-in-date-range.component.css | 7 +++++++
.../widgets/utils/no-data/no-data-in-date-range.component.html | 5 +++--
ui/src/scss/sp/widgets.scss | 4 ++--
4 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/ui/src/app/data-explorer/components/widgets/table/table-widget.component.html b/ui/src/app/data-explorer/components/widgets/table/table-widget.component.html
index 0b2f044..dd31089 100644
--- a/ui/src/app/data-explorer/components/widgets/table/table-widget.component.html
+++ b/ui/src/app/data-explorer/components/widgets/table/table-widget.component.html
@@ -18,7 +18,7 @@
<div class="widget-content">
<div class="widget-inner-options" style="margin-left: 0;margin-right: 0;margin-top: 0;">
- <div fxFlex="100" layout="row" fxLayoutAlign="start center" style="margin-left: 0px;margin-right: 0px;">
+ <div fxFlex="100" fxLayout="row" fxLayoutAlign="start center" style="margin-left: 0px;margin-right: 0px;">
<mat-form-field appearance="standard" class="form-field-margin form-field-size-smaller" style="margin-right: 5px;">
<mat-label><mat-icon>search</mat-icon><span> Search</span></mat-label>
<input matInput (input)="onFilterChange($event.target.value)" >
diff --git a/ui/src/app/data-explorer/components/widgets/utils/no-data/no-data-in-date-range.component.css b/ui/src/app/data-explorer/components/widgets/utils/no-data/no-data-in-date-range.component.css
index 2d5997c..b372e44 100644
--- a/ui/src/app/data-explorer/components/widgets/utils/no-data/no-data-in-date-range.component.css
+++ b/ui/src/app/data-explorer/components/widgets/utils/no-data/no-data-in-date-range.component.css
@@ -18,4 +18,11 @@
.default-text {
color: var(--color-default-text);
+ padding: 10px;
+ font-size: 16pt;
+ text-align: center;
+}
+
+.date-range-text {
+ font-size: 12pt;
}
diff --git a/ui/src/app/data-explorer/components/widgets/utils/no-data/no-data-in-date-range.component.html b/ui/src/app/data-explorer/components/widgets/utils/no-data/no-data-in-date-range.component.html
index 630accc..f5580c8 100644
--- a/ui/src/app/data-explorer/components/widgets/utils/no-data/no-data-in-date-range.component.html
+++ b/ui/src/app/data-explorer/components/widgets/utils/no-data/no-data-in-date-range.component.html
@@ -21,8 +21,9 @@
<div fxLayout="row" fxLayoutAlign="center center" style="margin-top: 30px">
<!-- TODO Icon -->
</div>
- <div fxLayout="row" fxLayoutAlign="center center" style="margin-top: 30px">
- <h3 class="default-text">Found no data in selected time range ({{viewDateRange.startDate | date:'MM/dd/yyyy HH:mm'}} - {{viewDateRange.endDate | date:'MM/dd/yyyy HH:mm'}})</h3>
+ <div fxLayout="column" fxLayoutAlign="center center" style="margin-top: 30px">
+ <div class="default-text">Found no data in selected time range</div>
+ <div class="default-text date-range-text">{{viewDateRange.startDate | date:'MM/dd/yyyy HH:mm'}} - {{viewDateRange.endDate | date:'MM/dd/yyyy HH:mm'}}</div>
</div>
</div>
diff --git a/ui/src/scss/sp/widgets.scss b/ui/src/scss/sp/widgets.scss
index 61653da..d573d72 100644
--- a/ui/src/scss/sp/widgets.scss
+++ b/ui/src/scss/sp/widgets.scss
@@ -22,8 +22,8 @@
}
.widget-inner-options {
- background: var(--color-bg-4);
- border-bottom: 1px solid var(--color-bg-1);
+ background: var(--color-bg-1);
+ border-bottom: 1px solid var(--color-bg-2);
padding: 5px;
height: 40px;
}
[incubator-streampipes] 05/07: [STREAMPIPES-395] Add user-level
configuration option to select color scheme
Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch STREAMPIPES-319
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 1a15e487eab75249ab0474b7ede679357cfd393d
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Mon Jul 19 21:49:47 2021 +0200
[STREAMPIPES-395] Add user-level configuration option to select color scheme
---
.../apache/streampipes/model/client/user/User.java | 9 ++++++++
.../org/apache/streampipes/rest/impl/User.java | 16 +++++++++++++
.../app/core-model/gen/streampipes-model-client.ts | 4 +++-
.../core/components/toolbar/toolbar.component.html | 7 +++---
.../core/components/toolbar/toolbar.component.ts | 9 ++++++--
.../general-profile-settings.component.html | 21 +++++++++++++++++
.../general-profile-settings.component.scss | 10 ++++++++
.../general/general-profile-settings.component.ts | 27 +++++++++++++++++++++-
ui/src/app/profile/profile.service.ts | 6 +++++
ui/src/scss/sp/buttons.ng1.scss | 1 +
ui/src/scss/sp/layout.scss | 8 +++++++
ui/src/scss/sp/sp-theme.scss | 2 ++
12 files changed, 113 insertions(+), 7 deletions(-)
diff --git a/streampipes-model-client/src/main/java/org/apache/streampipes/model/client/user/User.java b/streampipes-model-client/src/main/java/org/apache/streampipes/model/client/user/User.java
index 79b8349..84cf051 100644
--- a/streampipes-model-client/src/main/java/org/apache/streampipes/model/client/user/User.java
+++ b/streampipes-model-client/src/main/java/org/apache/streampipes/model/client/user/User.java
@@ -47,6 +47,7 @@ public class User {
private List<UserApiToken> userApiTokens;
private boolean hideTutorial;
+ private boolean darkMode = false;
private Set<Role> roles;
@@ -254,4 +255,12 @@ public class User {
public void setRev(String rev) {
this.rev = rev;
}
+
+ public boolean isDarkMode() {
+ return darkMode;
+ }
+
+ public void setDarkMode(boolean darkMode) {
+ this.darkMode = darkMode;
+ }
}
diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/User.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/User.java
index b53e4b1..8350f46 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/User.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/User.java
@@ -44,6 +44,22 @@ public class User extends AbstractRestResource {
}
}
+ @Path("/appearance/mode/{darkMode}")
+ @PUT
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response updateAppearanceMode(@PathParam("email") String email,
+ @PathParam("darkMode") boolean darkMode) {
+ if (email != null) {
+ org.apache.streampipes.model.client.user.User user = getUser(email);
+ user.setDarkMode(darkMode);
+ getUserStorage().updateUser(user);
+
+ return ok(Notifications.success("Appearance updated"));
+ } else {
+ return statusMessage(Notifications.error("User not found"));
+ }
+ }
+
@PUT
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
diff --git a/ui/src/app/core-model/gen/streampipes-model-client.ts b/ui/src/app/core-model/gen/streampipes-model-client.ts
index 7036175..94ab771 100644
--- a/ui/src/app/core-model/gen/streampipes-model-client.ts
+++ b/ui/src/app/core-model/gen/streampipes-model-client.ts
@@ -19,7 +19,7 @@
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
-// Generated using typescript-generator version 2.27.744 on 2021-06-22 10:02:27.
+// Generated using typescript-generator version 2.27.744 on 2021-07-19 21:39:30.
export class Element {
elementId: string;
@@ -141,6 +141,7 @@ export class RawUserApiToken {
}
export class User {
+ darkMode: boolean;
email: string;
fullName: string;
hideTutorial: boolean;
@@ -176,6 +177,7 @@ export class User {
instance.preferredActions = __getCopyArrayFn(__identity<string>())(data.preferredActions);
instance.userApiTokens = __getCopyArrayFn(UserApiToken.fromData)(data.userApiTokens);
instance.hideTutorial = data.hideTutorial;
+ instance.darkMode = data.darkMode;
instance.roles = __getCopyArrayFn(__identity<Role>())(data.roles);
return instance;
}
diff --git a/ui/src/app/core/components/toolbar/toolbar.component.html b/ui/src/app/core/components/toolbar/toolbar.component.html
index 1cd1b68..203177b 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.html
+++ b/ui/src/app/core/components/toolbar/toolbar.component.html
@@ -30,9 +30,10 @@
</div>
<span fxFlex></span>
<div fxFlex="40" fxLayout fxLayoutAlign="end center" *ngIf="authenticated" style="height:100%;">
- <div>
- <mat-slide-toggle color="accent" [formControl]="appearanceControl">Dark Mode</mat-slide-toggle>
- </div>
+ <!-- uncomment this to quickly investigate layout issues between dark and light mode -->
+<!-- <div>-->
+<!-- <mat-slide-toggle color="accent" [formControl]="appearanceControl">Dark Mode</mat-slide-toggle>-->
+<!-- </div>-->
<div style="height:100%;">
<div [ngClass]="feedbackOpen.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 6429cbc..13933e7 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.ts
+++ b/ui/src/app/core/components/toolbar/toolbar.component.ts
@@ -22,9 +22,9 @@ import {Router} from "@angular/router";
import {RestApi} from "../../../services/rest-api.service";
import {AuthStatusService} from "../../../services/auth-status.service";
import {MatMenuTrigger} from "@angular/material/menu";
-import {VersionInfo} from "../../../info/versions/service/version-info.model";
import {FormControl} from "@angular/forms";
import {OverlayContainer} from "@angular/cdk/overlay";
+import {ProfileService} from "../../../profile/profile.service";
@Component({
selector: 'toolbar',
@@ -41,6 +41,7 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
appearanceControl: FormControl;
constructor(Router: Router,
+ private profileService: ProfileService,
private RestApi: RestApi,
public AuthStatusService: AuthStatusService,
private overlay: OverlayContainer) {
@@ -49,8 +50,12 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
ngOnInit(): void {
this.userEmail = this.AuthStatusService.email;
+ this.profileService.getUserProfile().subscribe(user => {
+ this.AuthStatusService.darkMode = user.darkMode;
+ this.modifyAppearance(user.darkMode);
+ })
this.appearanceControl = new FormControl(this.AuthStatusService.darkMode);
- this.modifyAppearance(this.AuthStatusService.darkMode);
+ //this.modifyAppearance(this.AuthStatusService.darkMode);
this.appearanceControl.valueChanges.subscribe(darkMode => {
this.AuthStatusService.darkMode = darkMode;
this.modifyAppearance(darkMode);
diff --git a/ui/src/app/profile/components/general/general-profile-settings.component.html b/ui/src/app/profile/components/general/general-profile-settings.component.html
index 63a76a3..19bf587 100644
--- a/ui/src/app/profile/components/general/general-profile-settings.component.html
+++ b/ui/src/app/profile/components/general/general-profile-settings.component.html
@@ -46,6 +46,27 @@
</div>
</div>
<mat-divider></mat-divider>
+ <div fxLayout="row" fxFlex="100" class="mt-30">
+ <div fxFlex="300px" fxLayout="column" class="profile-section">
+ <div class="settings-title">Appearance</div>
+ <div class="settings-description">Change the appearance of your {{appConstants.APP_NAME}} installation</div>
+ </div>
+ <div fxFill fxLayout="column">
+ <label id="radio-group-label">Color Scheme</label>
+ <mat-radio-group [(ngModel)]="darkMode"
+ aria-labelledby="radio-group-label"
+ class="appearance-radio-group" (ngModelChange)="changeModePreview($event)">
+ <mat-radio-button [value]="false" class="appearance-radio-button">Light Mode</mat-radio-button>
+ <mat-radio-button [value]="true" class="appearance-radio-button">Dark Mode</mat-radio-button>
+ </mat-radio-group>
+ <div>
+ <button mat-button mat-raised-button color="accent"
+ (click)="updateAppearanceMode()">
+ Save color scheme
+ </button>
+ </div>
+ </div>
+ </div>
</div>
</div>
diff --git a/ui/src/app/profile/components/general/general-profile-settings.component.scss b/ui/src/app/profile/components/general/general-profile-settings.component.scss
index 965fae7..0d460dd 100644
--- a/ui/src/app/profile/components/general/general-profile-settings.component.scss
+++ b/ui/src/app/profile/components/general/general-profile-settings.component.scss
@@ -33,3 +33,13 @@
.title-section {
width: 300px;
}
+
+.appearance-radio-group {
+ display: flex;
+ flex-direction: column;
+ margin: 15px 0;
+}
+
+.appearance-radio-button {
+ margin: 5px;
+}
diff --git a/ui/src/app/profile/components/general/general-profile-settings.component.ts b/ui/src/app/profile/components/general/general-profile-settings.component.ts
index cf6fcdb..1cf73ff 100644
--- a/ui/src/app/profile/components/general/general-profile-settings.component.ts
+++ b/ui/src/app/profile/components/general/general-profile-settings.component.ts
@@ -21,6 +21,7 @@ import {ProfileService} from "../../profile.service";
import {User} from "../../../core-model/gen/streampipes-model-client";
import {BasicProfileSettings} from "../basic-profile-settings";
import {AppConstants} from "../../../services/app.constants";
+import {AuthStatusService} from "../../../services/auth-status.service";
@Component({
selector: 'general-profile-settings',
@@ -29,15 +30,39 @@ import {AppConstants} from "../../../services/app.constants";
})
export class GeneralProfileSettingsComponent extends BasicProfileSettings implements OnInit {
- constructor(profileService: ProfileService, appConstants: AppConstants) {
+ darkMode: boolean = false;
+ originalDarkMode: boolean = false;
+ darkModeChanged: boolean = false;
+
+ constructor(private authStatusService: AuthStatusService,
+ profileService: ProfileService,
+ appConstants: AppConstants) {
super(profileService, appConstants);
}
ngOnInit(): void {
+ this.darkMode = this.authStatusService.darkMode;
+ this.originalDarkMode = this.authStatusService.darkMode;
this.receiveUserData();
}
+ ngOnDestroy(): void {
+ if (!this.darkModeChanged) {
+ this.authStatusService.darkMode = this.originalDarkMode;
+ }
+ }
+
+ changeModePreview(value: boolean) {
+ this.authStatusService.darkMode = value;
+ }
+
onUserDataReceived() {
}
+ updateAppearanceMode() {
+ this.profileService.updateAppearanceMode(this.darkMode).subscribe(response => {
+ this.darkModeChanged = true;
+ });
+ }
+
}
diff --git a/ui/src/app/profile/profile.service.ts b/ui/src/app/profile/profile.service.ts
index 89f5e5d..ca611a4 100644
--- a/ui/src/app/profile/profile.service.ts
+++ b/ui/src/app/profile/profile.service.ts
@@ -44,6 +44,12 @@ export class ProfileService {
}))
}
+ updateAppearanceMode(darkMode: boolean): Observable<Message> {
+ return this.http.put(`${this.platformServicesCommons.authUserBasePath()}/appearance/mode/${darkMode}`, {}).pipe(map(response => {
+ return Message.fromData(response as any);
+ }))
+ }
+
requestNewApiToken(baseToken: RawUserApiToken): Observable<RawUserApiToken> {
return this.http.post(this.platformServicesCommons.authUserBasePath() + "/tokens", baseToken)
.pipe(map(response => {
diff --git a/ui/src/scss/sp/buttons.ng1.scss b/ui/src/scss/sp/buttons.ng1.scss
index d65059d..023737a 100644
--- a/ui/src/scss/sp/buttons.ng1.scss
+++ b/ui/src/scss/sp/buttons.ng1.scss
@@ -30,6 +30,7 @@
.sp-navbar-item:hover {
color: var(--color-navigation-selected);
+ background: var(--color-navigation-hover);
}
.sp-navbar-icon {
diff --git a/ui/src/scss/sp/layout.scss b/ui/src/scss/sp/layout.scss
index 1d23127..1feaaad 100644
--- a/ui/src/scss/sp/layout.scss
+++ b/ui/src/scss/sp/layout.scss
@@ -56,6 +56,14 @@
margin-top: 10px;
}
+.mt-20 {
+ margin-top: 20px;
+}
+
+.mt-30 {
+ margin-top: 30px;
+}
+
.mb-10 {
margin-bottom: 10px;
}
diff --git a/ui/src/scss/sp/sp-theme.scss b/ui/src/scss/sp/sp-theme.scss
index 13d4119..8b9e4db 100644
--- a/ui/src/scss/sp/sp-theme.scss
+++ b/ui/src/scss/sp/sp-theme.scss
@@ -172,6 +172,7 @@ $accent: map-get($custom-theme-light, accent);
--color-navigation-link-text: #121212;
--color-navigation-text: #121212;
--color-navigation-selected: #{mat-color($primary)};
+ --color-navigation-hover: #{mat-color($primary, 600)};
--color-navigation-bg-selected: #121212;
--color-navigation-divider: #{mat-color($primary)};
@@ -205,6 +206,7 @@ $accent: map-get($custom-theme-light, accent);
--color-navigation-link-text: #FFFFFF;
--color-navigation-text: #FFFFFF;
--color-navigation-selected: #{mat-color($primary)};
+ --color-navigation-hover: #{mat-color($primary, 600)};
--color-navigation-bg-selected: #FFFFFF;
--color-navigation-divider: #{mat-color($primary)};
[incubator-streampipes] 07/07: [STREAMPIPES-319] Change
auto-generated element id of generic adapters
Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch STREAMPIPES-319
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit eb7c177f8cb0ebc2c633baae2cd2642f3ff54ffa
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Mon Jul 19 23:13:10 2021 +0200
[STREAMPIPES-319] Change auto-generated element id of generic adapters
---
.../model/connect/adapter/GenericAdapterSetDescription.java | 4 +++-
.../connect/adapter/GenericAdapterStreamDescription.java | 3 ++-
.../apache/streampipes/model/util/ElementIdGenerator.java | 12 ++++++++++--
ui/src/app/connect/services/data-marketplace.service.ts | 2 --
4 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/GenericAdapterSetDescription.java b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/GenericAdapterSetDescription.java
index 51c49be..e195459 100644
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/GenericAdapterSetDescription.java
+++ b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/GenericAdapterSetDescription.java
@@ -23,10 +23,12 @@ import org.apache.streampipes.model.connect.grounding.ProtocolDescription;
import org.apache.streampipes.model.connect.grounding.ProtocolSetDescription;
import org.apache.streampipes.model.schema.EventSchema;
import org.apache.streampipes.model.shared.annotation.TsModel;
+import org.apache.streampipes.model.util.ElementIdGenerator;
@TsModel
public class GenericAdapterSetDescription extends AdapterSetDescription implements GenericAdapterDescription {
- public static final String ID = "http://streampipes.org/genericadaptersetdescription";
+
+ public static final String ID = ElementIdGenerator.makeFixedElementId(GenericAdapterSetDescription.class);
// private String sourceType = "org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription";
diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/GenericAdapterStreamDescription.java b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/GenericAdapterStreamDescription.java
index 3500783..1a8239b 100644
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/GenericAdapterStreamDescription.java
+++ b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/GenericAdapterStreamDescription.java
@@ -23,11 +23,12 @@ import org.apache.streampipes.model.connect.grounding.ProtocolDescription;
import org.apache.streampipes.model.connect.grounding.ProtocolStreamDescription;
import org.apache.streampipes.model.schema.EventSchema;
import org.apache.streampipes.model.shared.annotation.TsModel;
+import org.apache.streampipes.model.util.ElementIdGenerator;
@TsModel
public class GenericAdapterStreamDescription extends AdapterStreamDescription implements GenericAdapterDescription{
- public static final String ID = "http://streampipes.org/genericadapterstreamdescription";
+ public static final String ID = ElementIdGenerator.makeFixedElementId(GenericAdapterStreamDescription.class);
private FormatDescription formatDescription;
diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/util/ElementIdGenerator.java b/streampipes-model/src/main/java/org/apache/streampipes/model/util/ElementIdGenerator.java
index 79c2baf..7448189 100644
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/util/ElementIdGenerator.java
+++ b/streampipes-model/src/main/java/org/apache/streampipes/model/util/ElementIdGenerator.java
@@ -24,12 +24,20 @@ public class ElementIdGenerator {
private static final String prefix = "urn:streampipes.apache.org:spi:";
public static String makeElementId(Object obj) {
- return prefix
- + obj.getClass().getSimpleName().toLowerCase()
+ return makeElementId(obj.getClass());
+ }
+
+ public static String makeElementId(Class<?> clazz) {
+ return makeFixedElementId(clazz)
+ ":"
+ RandomStringUtils.randomAlphabetic(6);
}
+ public static String makeFixedElementId(Class<?> clazz) {
+ return prefix
+ + clazz.getSimpleName().toLowerCase();
+ }
+
public static String makeElementIdFromAppId(String appId) {
return prefix + appId;
}
diff --git a/ui/src/app/connect/services/data-marketplace.service.ts b/ui/src/app/connect/services/data-marketplace.service.ts
index aca69a5..3e1298f 100644
--- a/ui/src/app/connect/services/data-marketplace.service.ts
+++ b/ui/src/app/connect/services/data-marketplace.service.ts
@@ -136,13 +136,11 @@ export class DataMarketplaceService {
if (protocol.sourceType === 'SET') {
newAdapterDescription = new GenericAdapterSetDescription();
newAdapterDescription["@class"] = "org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription";
- newAdapterDescription.elementId = 'http://streampipes.org/genericadaptersetdescription'
newAdapterDescription.dataSet = new SpDataSet();
newAdapterDescription.dataSet.eventSchema = new EventSchema();
} else if (protocol.sourceType === 'STREAM') {
newAdapterDescription = new GenericAdapterStreamDescription();
newAdapterDescription["@class"] = "org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription";
- newAdapterDescription.elementId = 'http://streampipes.org/genericadapterstreamdescription'
newAdapterDescription.dataStream = new SpDataStream();
newAdapterDescription.dataStream.eventSchema = new EventSchema();
}