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 2020/08/15 21:54:11 UTC

[incubator-streampipes] 04/11: [STREAMPIPES-193] Fix layout bug in pipeline details view

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

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

commit 265fb3831224cd010c2a2003a776169bcec15de4
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Thu Aug 13 23:32:01 2020 +0200

    [STREAMPIPES-193] Fix layout bug in pipeline details view
---
 ui/src/app/core-v2/components/base-navigation.component.ts          | 2 +-
 .../components/actions/pipeline-actions.component.ts                | 6 +++---
 ui/src/app/pipeline-details/pipeline-details.component.scss         | 4 ++++
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/ui/src/app/core-v2/components/base-navigation.component.ts b/ui/src/app/core-v2/components/base-navigation.component.ts
index 8b2ac9a..29ac724 100644
--- a/ui/src/app/core-v2/components/base-navigation.component.ts
+++ b/ui/src/app/core-v2/components/base-navigation.component.ts
@@ -82,7 +82,7 @@ export abstract class BaseNavigationComponent {
   }
 
   onInit() {
-    this.activePage = "";
+    this.activePage = this.Router.url.replace("/", "");
     this.activePageName = this.getPageTitle(this.activePage);
     this.Router.events.subscribe(event => {
       if (event instanceof NavigationEnd) {
diff --git a/ui/src/app/pipeline-details/components/actions/pipeline-actions.component.ts b/ui/src/app/pipeline-details/components/actions/pipeline-actions.component.ts
index eff9fe6..ca6bad1 100644
--- a/ui/src/app/pipeline-details/components/actions/pipeline-actions.component.ts
+++ b/ui/src/app/pipeline-details/components/actions/pipeline-actions.component.ts
@@ -19,6 +19,7 @@
 import {Component, EventEmitter, Inject, Input, OnInit, Output} from "@angular/core";
 import {PipelineOperationsService} from "../../../pipelines/services/pipeline-operations.service";
 import {Pipeline} from "../../../core-model/gen/streampipes-model";
+import {Router} from "@angular/router";
 
 @Component({
     selector: 'pipeline-actions',
@@ -36,8 +37,7 @@ export class PipelineActionsComponent implements OnInit {
     reloadPipelineEmitter: EventEmitter<boolean> = new EventEmitter<boolean>();
 
     constructor(public pipelineOperationsService: PipelineOperationsService,
-                @Inject('$state') private $state) {
-        this.$state = $state;
+                private Router: Router) {
     }
 
     ngOnInit() {
@@ -54,7 +54,7 @@ export class PipelineActionsComponent implements OnInit {
     }
 
     switchToPipelineView() {
-        this.$state.go("streampipes.pipelines");
+        this.Router.navigate(["pipelines"]);
     }
 
     startPipeline() {
diff --git a/ui/src/app/pipeline-details/pipeline-details.component.scss b/ui/src/app/pipeline-details/pipeline-details.component.scss
index 58ba04b..a375af7 100644
--- a/ui/src/app/pipeline-details/pipeline-details.component.scss
+++ b/ui/src/app/pipeline-details/pipeline-details.component.scss
@@ -16,3 +16,7 @@
  *
  */
 
+.md-padding {
+  padding: 10px;
+}
+