|
@@ -60,6 +60,7 @@ public class SystemServiceImpl implements SystemService {
|
|
|
//赋值默认值
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("tray","");
|
|
|
+ jsonObject.put("ip","");
|
|
|
jsonObject.put("usableSpace",0);
|
|
|
jsonObject.put("databaseSpace",0);
|
|
|
|
|
@@ -104,9 +105,10 @@ public class SystemServiceImpl implements SystemService {
|
|
|
if(influxdbIp.equals(localIp)){
|
|
|
jsonObject.put("tray",engine_path);
|
|
|
}else{
|
|
|
- String spath = influxdbIp + "," + engine_path;//engine_path.substring(2,engine_path.length());
|
|
|
+ String spath = engine_path;//engine_path.substring(2,engine_path.length());
|
|
|
jsonObject.put("tray",spath);
|
|
|
}
|
|
|
+ jsonObject.put("ip",influxdbIp);
|
|
|
//获得磁盘可用空间和总空间
|
|
|
File[] files = File.listRoots();
|
|
|
for (File file : files) {
|
|
@@ -156,13 +158,13 @@ public class SystemServiceImpl implements SystemService {
|
|
|
//InetAddress inetAddress = InetAddress.getLocalHost();
|
|
|
//String localIp = inetAddress.getHostAddress();
|
|
|
|
|
|
-
|
|
|
+ jsonObject.put("ip", mysql_ip);
|
|
|
while ((resultSet1.next())) {
|
|
|
String value = resultSet1.getString("value");
|
|
|
jsonObject.put("path", value);
|
|
|
//path = value.split("\\\\")[0];
|
|
|
diskpath = value.split("\\\\")[0];
|
|
|
- path = mysql_ip + ","+ value;
|
|
|
+ path = value;
|
|
|
jsonObject.put("tray", path);
|
|
|
break;
|
|
|
}
|