You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by wi...@apache.org on 2021/01/08 08:41:48 UTC

[incubator-streampipes] branch edge-extensions updated: [WIP] add placeholder for healthcheck contact to node in ui

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

wiener pushed a commit to branch edge-extensions
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


The following commit(s) were added to refs/heads/edge-extensions by this push:
     new 9664ecd  [WIP] add placeholder for healthcheck contact to node in ui
9664ecd is described below

commit 9664ecd3ff6e7e62c552c4f22d381967cee048d6
Author: Patrick Wiener <wi...@fzi.de>
AuthorDate: Fri Jan 8 09:41:24 2021 +0100

    [WIP] add placeholder for healthcheck contact to node in ui
---
 .../node-configuration/node-configuration.component.html         | 9 ++++++---
 .../node-configuration/node-configuration.component.ts           | 7 +++++++
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ui/src/app/configuration/node-configuration/node-configuration.component.html b/ui/src/app/configuration/node-configuration/node-configuration.component.html
index 4a98d19..5104446 100644
--- a/ui/src/app/configuration/node-configuration/node-configuration.component.html
+++ b/ui/src/app/configuration/node-configuration/node-configuration.component.html
@@ -74,7 +74,6 @@
                                     </mat-icon>
                                 </button>
                             </div>
-<!--                            <div mat-card-avatar class="node-header-avatar"><i class="fas fa-server fa-2x"></i></div>-->
                             <div mat-card-avatar class="node-header-avatar">
                                 <button mat-icon-button class="node-mat-icon-button" disabled>
                                     <mat-icon [ngClass]="'node-inactive'">
@@ -84,8 +83,12 @@
                             </div>
                             <mat-card-title
                                     style="font-size: 12pt">{{node.nodeControllerId}}</mat-card-title>
-                            <mat-card-subtitle style="font-size: 10pt">{{node.hostname}} |
-                                <b>{{node.nodeResources.softwareResource.os}}</b></mat-card-subtitle>
+                            <mat-card-subtitle style="font-size: 10pt">
+                                {{node.hostname}} | <b>{{node.nodeResources.softwareResource.os}}</b>
+                                <div style="color: lightgrey;">
+                                    last contact: {{currentTimestamp}}
+                                </div>
+                            </mat-card-subtitle>
                         </mat-card-header>
                         <mat-card-content>
                             <div class="div-node-tag" *ngFor="let tag of node.staticNodeMetadata.locationTags">
diff --git a/ui/src/app/configuration/node-configuration/node-configuration.component.ts b/ui/src/app/configuration/node-configuration/node-configuration.component.ts
index 1728124..7f295c6 100644
--- a/ui/src/app/configuration/node-configuration/node-configuration.component.ts
+++ b/ui/src/app/configuration/node-configuration/node-configuration.component.ts
@@ -53,6 +53,7 @@ export class NodeConfigurationComponent implements OnInit{
     gpuType: string;
     locationTags: String[];
     fieldDevices: FieldDeviceAccessResource[];
+    currentTimestamp: string;
 
     constructor(private nodeService: NodeService,
                 private dataMarketplaceService: DataMarketplaceService,
@@ -62,6 +63,7 @@ export class NodeConfigurationComponent implements OnInit{
 
     ngOnInit() {
         this.getNodes();
+        this.getDate();
     }
 
     getNodes() {
@@ -166,4 +168,9 @@ export class NodeConfigurationComponent implements OnInit{
             }
         });
     }
+
+    getDate() {
+        this.currentTimestamp = new Date().toLocaleTimeString(['en-US'],
+            { hour: '2-digit', minute: "2-digit", second: "2-digit" });
+    }
 }
\ No newline at end of file