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 2024/03/28 08:51:06 UTC

(streampipes) branch 2659-show-adapter-status-light-in-adapter-overview updated: feat(#2659): Show status light in adapter overview

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

riemer pushed a commit to branch 2659-show-adapter-status-light-in-adapter-overview
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/2659-show-adapter-status-light-in-adapter-overview by this push:
     new 1f4ba724f2 feat(#2659): Show status light in adapter overview
1f4ba724f2 is described below

commit 1f4ba724f221d77c19d105772a8d1ed5eddfcab7
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Thu Mar 28 09:50:40 2024 +0100

    feat(#2659): Show status light in adapter overview
---
 .../existing-adapters.component.html               | 24 +++++++++++++++++
 .../existing-adapters.component.scss               |  5 +++-
 .../existing-adapters.component.ts                 |  6 ++++-
 .../pipeline-overview.component.scss               | 27 -------------------
 .../pipeline-overview.component.ts                 |  5 +++-
 .../sp/status-light.scss}                          | 30 +---------------------
 6 files changed, 38 insertions(+), 59 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 495961296c..42fe0ba177 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
@@ -112,6 +112,30 @@
                             data-cy="all-adapters-table"
                             matSort
                         >
+                            <ng-container matColumnDef="status">
+                                <th
+                                    mat-header-cell
+                                    mat-sort-header
+                                    *matHeaderCellDef
+                                >
+                                    Status
+                                </th>
+                                <td mat-cell *matCellDef="let adapter">
+                                    <div
+                                        fxLayout="row"
+                                        fxLayoutAlign="start center"
+                                    >
+                                        <div
+                                            *ngIf="adapter.running"
+                                            class="light light-green"
+                                        ></div>
+                                        <div
+                                            *ngIf="!adapter.running"
+                                            class="light light-neutral"
+                                        ></div>
+                                    </div>
+                                </td>
+                            </ng-container>
                             <ng-container matColumnDef="start">
                                 <th mat-header-cell *matHeaderCellDef>Start</th>
                                 <td
diff --git a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.scss b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.scss
index 2f5552cad7..888f10a466 100644
--- a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.scss
+++ b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.scss
@@ -28,8 +28,11 @@
 }
 
 .adapter-icon {
-    max-height: 50px;
+    padding-top: 5px;
+    padding-bottom: 5px;
+    max-height: 40px;
 }
+
 .real-time {
     cursor: pointer;
     color: #ffeb3b;
diff --git a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.ts b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.ts
index 99022ad582..b3e39e8159 100644
--- a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.ts
+++ b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.ts
@@ -52,7 +52,10 @@ import { HelpComponent } from '../../../core-ui/help/help.component';
 @Component({
     selector: 'sp-existing-adapters',
     templateUrl: './existing-adapters.component.html',
-    styleUrls: ['./existing-adapters.component.scss'],
+    styleUrls: [
+        './existing-adapters.component.scss',
+        '../../../../scss/sp/status-light.scss',
+    ],
 })
 export class ExistingAdaptersComponent implements OnInit, OnDestroy {
     existingAdapters: AdapterDescription[] = [];
@@ -67,6 +70,7 @@ export class ExistingAdaptersComponent implements OnInit, OnDestroy {
     sort: MatSort;
 
     displayedColumns: string[] = [
+        'status',
         'start',
         'name',
         'adapterBase',
diff --git a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.scss b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.scss
index dd97d20ab8..8f14307cfb 100644
--- a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.scss
+++ b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.scss
@@ -32,33 +32,6 @@
     max-width: 120px;
 }
 
-.light {
-    background-color: rgba(0, 0, 0, 0.3);
-    border-radius: 50%;
-    width: 15px;
-    height: 15px;
-}
-
-.light-red {
-    background-color: red;
-    box-shadow: 0 0 5px 2px red;
-}
-
-.light-yellow {
-    background-color: #dede2d;
-    box-shadow: 0 0 5px 2px #dede2d;
-}
-
-.light-green {
-    background-color: green;
-    box-shadow: 0 0 5px 2px green;
-}
-
-.light-neutral {
-    background-color: #b4b4b4;
-    box-shadow: 0 0 2px 1px #b4b4b4;
-}
-
 .ml-10 {
     margin-left: 10px;
 }
diff --git a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.ts b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.ts
index 422a17d448..ad53f66fbf 100644
--- a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.ts
+++ b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.ts
@@ -37,7 +37,10 @@ import { CurrentUserService } from '@streampipes/shared-ui';
 @Component({
     selector: 'sp-pipeline-overview',
     templateUrl: './pipeline-overview.component.html',
-    styleUrls: ['./pipeline-overview.component.scss'],
+    styleUrls: [
+        './pipeline-overview.component.scss',
+        '../../../../scss/sp/status-light.scss',
+    ],
 })
 export class PipelineOverviewComponent implements OnInit {
     _pipelines: Pipeline[];
diff --git a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.scss b/ui/src/scss/sp/status-light.scss
similarity index 75%
copy from ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.scss
copy to ui/src/scss/sp/status-light.scss
index dd97d20ab8..11251d5c52 100644
--- a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.scss
+++ b/ui/src/scss/sp/status-light.scss
@@ -1,4 +1,4 @@
-/*
+/*!
  * 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.
@@ -16,22 +16,6 @@
  *
  */
 
-.mat-mdc-paginator {
-    border-top: 1px solid rgba(0, 0, 0, 0.12);
-}
-
-.mat-mdc-row:nth-child(even) {
-    background-color: var(--color-bg-1);
-}
-.mat-mdc-row:nth-child(odd) {
-    background-color: var(--color-bg-2);
-}
-
-.mat-column-status {
-    width: 120px;
-    max-width: 120px;
-}
-
 .light {
     background-color: rgba(0, 0, 0, 0.3);
     border-radius: 50%;
@@ -58,15 +42,3 @@
     background-color: #b4b4b4;
     box-shadow: 0 0 2px 1px #b4b4b4;
 }
-
-.ml-10 {
-    margin-left: 10px;
-}
-
-.pipeline-notification {
-    color: #dede00;
-}
-
-.notification-icon {
-    width: 50px;
-}