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

rickyma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git


The following commit(s) were added to refs/heads/master by this push:
     new 387590e2a [#1975][FOLLOWUP] feat(dashboard): Support displaying the 
start time of server in dashboard (#1986)
387590e2a is described below

commit 387590e2a36cc757b395a777b6367caf99a960be
Author: maobaolong <baoloong...@tencent.com>
AuthorDate: Fri Aug 2 11:08:51 2024 +0800

    [#1975][FOLLOWUP] feat(dashboard): Support displaying the start time of 
server in dashboard (#1986)
    
    ### What changes were proposed in this pull request?
    
    Display start time of servers within server page of dashboard.
    
    ### Why are the changes needed?
    
    Just show the start time. Let users know when the server has been restarted.
    
    ### Does this PR introduce _any_ user-facing change?
    
    Display start time of servers within server page of dashboard.
    
    ### How was this patch tested?
    
    <img width="2485" alt="image" 
src="https://github.com/user-attachments/assets/9ab8e0ac-360b-49d5-859b-0877944d075a";>
---
 .../java/org/apache/uniffle/coordinator/ServerNode.java    | 14 +++++++-------
 .../main/webapp/src/pages/serverstatus/NodeListPage.vue    |  7 +++++++
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
index 0e6c78385..ad992f0bc 100644
--- a/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
+++ b/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
@@ -43,7 +43,7 @@ public class ServerNode implements Comparable<ServerNode> {
   private Map<String, StorageInfo> storageInfo;
   private int nettyPort = -1;
   private int jettyPort = -1;
-  private long startTimeMs = -1;
+  private long startTime = -1;
   private String version;
   private String gitCommitId;
 
@@ -165,7 +165,7 @@ public class ServerNode implements Comparable<ServerNode> {
       Map<String, StorageInfo> storageInfoMap,
       int nettyPort,
       int jettyPort,
-      long startTimeMs) {
+      long startTime) {
     this(
         id,
         ip,
@@ -179,7 +179,7 @@ public class ServerNode implements Comparable<ServerNode> {
         storageInfoMap,
         nettyPort,
         jettyPort,
-        startTimeMs,
+        startTime,
         "",
         "");
   }
@@ -197,7 +197,7 @@ public class ServerNode implements Comparable<ServerNode> {
       Map<String, StorageInfo> storageInfoMap,
       int nettyPort,
       int jettyPort,
-      long startTimeMs,
+      long startTime,
       String version,
       String gitCommitId) {
     this.id = id;
@@ -218,7 +218,7 @@ public class ServerNode implements Comparable<ServerNode> {
     if (jettyPort > 0) {
       this.jettyPort = jettyPort;
     }
-    this.startTimeMs = startTimeMs;
+    this.startTime = startTime;
     this.version = version;
     this.gitCommitId = gitCommitId;
   }
@@ -364,8 +364,8 @@ public class ServerNode implements Comparable<ServerNode> {
     return jettyPort;
   }
 
-  public long getStartTimeMs() {
-    return startTimeMs;
+  public long getStartTime() {
+    return startTime;
   }
 
   public String getVersion() {
diff --git a/dashboard/src/main/webapp/src/pages/serverstatus/NodeListPage.vue 
b/dashboard/src/main/webapp/src/pages/serverstatus/NodeListPage.vue
index 5f898e36b..f0466903e 100644
--- a/dashboard/src/main/webapp/src/pages/serverstatus/NodeListPage.vue
+++ b/dashboard/src/main/webapp/src/pages/serverstatus/NodeListPage.vue
@@ -52,6 +52,13 @@
       />
       <el-table-column prop="eventNumInFlush" label="FlushNum" min-width="80" 
sortable />
       <el-table-column prop="status" label="Status" min-width="80" sortable />
+      <el-table-column
+        prop="startTime"
+        label="StartTime"
+        min-width="120"
+        :formatter="dateFormatter"
+        sortable
+      />
       <el-table-column
         prop="registrationTime"
         label="RegistrationTime"

Reply via email to