Skip to content

Commit

Permalink
[#1975][FOLLOWUP] feat(dashboard): Support displaying the start time …
Browse files Browse the repository at this point in the history
…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">
  • Loading branch information
maobaolong authored Aug 2, 2024
1 parent bf0ca87 commit 387590e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -165,7 +165,7 @@ public ServerNode(
Map<String, StorageInfo> storageInfoMap,
int nettyPort,
int jettyPort,
long startTimeMs) {
long startTime) {
this(
id,
ip,
Expand All @@ -179,7 +179,7 @@ public ServerNode(
storageInfoMap,
nettyPort,
jettyPort,
startTimeMs,
startTime,
"",
"");
}
Expand All @@ -197,7 +197,7 @@ public ServerNode(
Map<String, StorageInfo> storageInfoMap,
int nettyPort,
int jettyPort,
long startTimeMs,
long startTime,
String version,
String gitCommitId) {
this.id = id;
Expand All @@ -218,7 +218,7 @@ public ServerNode(
if (jettyPort > 0) {
this.jettyPort = jettyPort;
}
this.startTimeMs = startTimeMs;
this.startTime = startTime;
this.version = version;
this.gitCommitId = gitCommitId;
}
Expand Down Expand Up @@ -364,8 +364,8 @@ public int getJettyPort() {
return jettyPort;
}

public long getStartTimeMs() {
return startTimeMs;
public long getStartTime() {
return startTime;
}

public String getVersion() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 387590e

Please sign in to comment.