mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
session command print tunnel client connect status. #1576
This commit is contained in:
@@ -35,6 +35,7 @@ public class SessionCommand extends AnnotatedCommand {
|
||||
result.setAgentId(id);
|
||||
}
|
||||
result.setTunnelServer(tunnelClient.getTunnelServerUrl());
|
||||
result.setTunnelConnected(tunnelClient.isConnected());
|
||||
}
|
||||
|
||||
//statUrl
|
||||
|
||||
@@ -13,6 +13,8 @@ public class SessionModel extends ResultModel {
|
||||
private String tunnelServer;
|
||||
private String statUrl;
|
||||
|
||||
private boolean tunnelConnected;
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "session";
|
||||
@@ -57,4 +59,12 @@ public class SessionModel extends ResultModel {
|
||||
public void setStatUrl(String statUrl) {
|
||||
this.statUrl = statUrl;
|
||||
}
|
||||
|
||||
public boolean isTunnelConnected() {
|
||||
return tunnelConnected;
|
||||
}
|
||||
|
||||
public void setTunnelConnected(boolean tunnelConnected) {
|
||||
this.tunnelConnected = tunnelConnected;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ public class SessionView extends ResultView<SessionModel> {
|
||||
}
|
||||
if (result.getTunnelServer() != null) {
|
||||
table.row("TUNNEL_SERVER", "" + result.getTunnelServer());
|
||||
table.row("TUNNEL_CONNECTED", "" + result.isTunnelConnected());
|
||||
}
|
||||
if (result.getStatUrl() != null) {
|
||||
table.row("STAT_URL", result.getStatUrl());
|
||||
|
||||
Reference in New Issue
Block a user