1、交换机管理增加下架接口。
2、流量图改为有ipv6展示,没有就不展示。
This commit is contained in:
+20
-14
@@ -454,8 +454,10 @@ public class InitialBandwidthTrafficServiceImpl implements IInitialBandwidthTraf
|
||||
Map<String, String> showRealation = new HashMap<>();
|
||||
interfaceDataMap.put(name, mainList);
|
||||
String ipv4 = "";
|
||||
String ipv6 = "";
|
||||
if(mainList != null && !mainList.isEmpty()){
|
||||
ipv4 = mainList.get(0).getIpV4();
|
||||
ipv6 = mainList.get(0).getIpV6();
|
||||
}
|
||||
showRealation.put(name+"netInTraffic", name+"入站流量" + " IPv4: "+ipv4);
|
||||
showRealation.put(name+"netOutTraffic", name+"出站流量" + " IPv4: "+ipv4);
|
||||
@@ -490,8 +492,10 @@ public class InitialBandwidthTrafficServiceImpl implements IInitialBandwidthTraf
|
||||
needAddIpv4Ipv6 = true;
|
||||
showRealation.put(name+"netInTrafficIPv4", name+"IPv4入站流量" + " IPv4: "+ipv4);
|
||||
showRealation.put(name+"netOutTrafficIPv4", name+"IPv4出站流量" + " IPv4: "+ipv4);
|
||||
showRealation.put(name+"netInTrafficIPv6", name+"IPv6入站流量" + " IPv4: "+ipv4);
|
||||
showRealation.put(name+"netOutTrafficIPv6", name+"IPv6出站流量" + " IPv4: "+ipv4);
|
||||
if(!"N/A".equals(ipv6) && StringUtils.isNoneBlank(ipv6)){
|
||||
showRealation.put(name+"netInTrafficIPv6", name+"IPv6入站流量" + " IPv6: "+ipv6);
|
||||
showRealation.put(name+"netOutTrafficIPv6", name+"IPv6出站流量" + " IPv6: "+ipv6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -702,10 +706,12 @@ public class InitialBandwidthTrafficServiceImpl implements IInitialBandwidthTraf
|
||||
displayName + " IPv4入站流量");
|
||||
showRealation.put("business_" + businessPrefix + "_netIpv4OutSpeedData",
|
||||
displayName + " IPv4出站流量");
|
||||
showRealation.put("business_" + businessPrefix + "_netIpv6InSpeedData",
|
||||
displayName + " IPv6入站流量");
|
||||
showRealation.put("business_" + businessPrefix + "_netIpv6OutSpeedData",
|
||||
displayName + " IPv6出站流量");
|
||||
if(!"N/A".equals(ipv6) && StringUtils.isNoneBlank(ipv6)){
|
||||
showRealation.put("business_" + businessPrefix + "_netIpv6InSpeedData",
|
||||
displayName + " IPv6入站流量");
|
||||
showRealation.put("business_" + businessPrefix + "_netIpv6OutSpeedData",
|
||||
displayName + " IPv6出站流量");
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -860,12 +866,12 @@ public class InitialBandwidthTrafficServiceImpl implements IInitialBandwidthTraf
|
||||
// 展示关系
|
||||
Map<String, String> showRealation = new HashMap<>();
|
||||
interfaceDataMap.put(name, mainList);
|
||||
String ipv4 = "";
|
||||
String ipv6 = "";
|
||||
if(mainList != null && !mainList.isEmpty()){
|
||||
ipv4 = mainList.get(0).getIpV4();
|
||||
ipv6 = mainList.get(0).getIpV6();
|
||||
}
|
||||
showRealation.put(name + "netInTraffic", name + "IPv6入站流量" + " IPv4: "+ipv4);
|
||||
showRealation.put(name + "netOutTraffic", name + "IPv6出站流量" + " IPv4: "+ipv4);
|
||||
showRealation.put(name + "netInTraffic", name + "IPv6入站流量" + " ipv6: "+ipv6);
|
||||
showRealation.put(name + "netOutTraffic", name + "IPv6出站流量" + " ipv6: "+ipv6);
|
||||
boolean hasSubInterface = false;
|
||||
// 收集所有需要计算单位的流量数据
|
||||
List<InitialBandwidthTraffic> allTrafficData = new ArrayList<>();
|
||||
@@ -887,8 +893,8 @@ public class InitialBandwidthTrafficServiceImpl implements IInitialBandwidthTraf
|
||||
if (childTrafficList != null && !childTrafficList.isEmpty()) {
|
||||
allTrafficData.addAll(childTrafficList);
|
||||
interfaceDataMap.put(child.getInterfaceName(), childTrafficList);
|
||||
showRealation.put(child.getInterfaceName() + "netInTraffic", child.getInterfaceName() + "IPv6入站流量" + " IPv4: "+child.getIpv4Address());
|
||||
showRealation.put(child.getInterfaceName() + "netOutTraffic", child.getInterfaceName() + "IPv6出站流量" + " IPv4: "+child.getIpv4Address());
|
||||
showRealation.put(child.getInterfaceName() + "netInTraffic", child.getInterfaceName() + "IPv6入站流量" + " ipv6: "+child.getIpv6Address());
|
||||
showRealation.put(child.getInterfaceName() + "netOutTraffic", child.getInterfaceName() + "IPv6出站流量" + " ipv6: "+child.getIpv6Address());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -917,8 +923,8 @@ public class InitialBandwidthTrafficServiceImpl implements IInitialBandwidthTraf
|
||||
|
||||
resultMap.put("unit", unit);
|
||||
if (!showRealation.isEmpty() && hasSubInterface) {
|
||||
showRealation.put("totalNetInTraffic", name + "IPv6总入站流量" + " IPv4: "+ipv4);
|
||||
showRealation.put("totalNetOutTraffic", name + "IPv6总出站流量" + " IPv4: "+ipv4);
|
||||
showRealation.put("totalNetInTraffic", name + "IPv6总入站流量" + " ipv6: "+ipv6);
|
||||
showRealation.put("totalNetOutTraffic", name + "IPv6总出站流量" + " ipv6: "+ipv6);
|
||||
}
|
||||
Map<String, String> sortedShowRealation = EchartsMoreDataUtils.sortInterfaceMap(showRealation, name, hasSubInterface);
|
||||
resultMap.put("showRealation", sortedShowRealation);
|
||||
|
||||
Reference in New Issue
Block a user