|
@@ -1,5 +1,6 @@
|
|
|
package com.its.rota.utic.server.controller;
|
|
|
|
|
|
+import com.its.common.utils.TimeUtils;
|
|
|
import com.its.rota.utic.server.config.ApplicationConfig;
|
|
|
import com.its.rota.utic.server.dto.CenterDto;
|
|
|
import com.its.rota.utic.server.dto.NET;
|
|
@@ -29,17 +30,18 @@ public class RotaUticServerController {
|
|
|
CenterDto center = ApplicationRepository.center;
|
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
- sb.append(heading + sep);
|
|
|
- sb.append("ITS Rota Server Running Information" + sep);
|
|
|
- sb.append(heading + sep);
|
|
|
+ sb.append(heading).append(sep);
|
|
|
+ sb.append("ROTA UTIC Server Running Information").append(sep);
|
|
|
+ sb.append(heading).append(sep);
|
|
|
+ sb.append(String.format("Process Id: %s, %s, %s", this.config.getProcessId(), this.config.getBootingTime(), TimeUtils.now())).append(sep);
|
|
|
sb.append(String.format("%s, %s:%d, Traffic Time: %s",
|
|
|
- center.getCenterId(), center.getIpAddress(), center.getCommPort(), ApplicationRepository.checkTrafficTime) + sep);
|
|
|
- sb.append(heading + sep);
|
|
|
+ center.getCenterId(), center.getIpAddress(), center.getCommPort(), ApplicationRepository.checkTrafficTime)).append(sep);
|
|
|
+ sb.append(heading).append(sep);
|
|
|
sb.append(String.format("%s %-15.15s %-8.8s %-20.20s %-20.20s %-20.20s %7s %s",
|
|
|
"---", "IP Address", "Network",
|
|
|
"Connect Time", "Disconnect Time",
|
|
|
- "Last Send Time", "Count", "Center Name") + sep);
|
|
|
- sb.append(heading + sep);
|
|
|
+ "Last Send Time", "Count", "Center Name")).append(sep);
|
|
|
+ sb.append(heading).append(sep);
|
|
|
int total = 0;
|
|
|
int onLine = 0;
|
|
|
List<String> keySet = new ArrayList<>(this.repo.getCenterMap().keySet());
|
|
@@ -59,12 +61,12 @@ public class RotaUticServerController {
|
|
|
region.getCenterId(), region.getIpAddress(), commStatus,
|
|
|
region.getNetState().getConnectTimeString(), region.getNetState().getDisconnectTimeString(),
|
|
|
region.getTraffic().getLastSendTime(), region.getTraffic().getTotalSends(),
|
|
|
- region.getCenterInfo()) + sep);
|
|
|
+ region.getCenterInfo())).append(sep);
|
|
|
|
|
|
}
|
|
|
- sb.append(heading + sep);
|
|
|
- sb.append(String.format("Total : %d, OnLine(Connect): %d", total, onLine) + sep);
|
|
|
- sb.append(heading + sep);
|
|
|
+ sb.append(heading).append(sep);
|
|
|
+ sb.append(String.format("Total : %d, OnLine(Connect): %d", total, onLine)).append(sep);
|
|
|
+ sb.append(heading).append(sep);
|
|
|
return sb.toString();
|
|
|
}
|
|
|
|