流量统计增加活跃IPTOP10一个小时内的趋势,增加一个小时内TOP10最大值,增加接口错误处理
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
package com.nis.util.httpclient;
|
package com.nis.util.httpclient;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.ConnectException;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -67,7 +68,7 @@ public class HttpClientUtil {
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws ClientProtocolException
|
* @throws ClientProtocolException
|
||||||
*/
|
*/
|
||||||
public static String get(String url) throws ClientProtocolException, IOException{
|
public static String get(String url) throws Exception{
|
||||||
//实例化httpclient
|
//实例化httpclient
|
||||||
CloseableHttpClient httpclient = HttpClients.createDefault();
|
CloseableHttpClient httpclient = HttpClients.createDefault();
|
||||||
//实例化get方法
|
//实例化get方法
|
||||||
@@ -75,19 +76,16 @@ public class HttpClientUtil {
|
|||||||
//请求结果
|
//请求结果
|
||||||
CloseableHttpResponse response = null;
|
CloseableHttpResponse response = null;
|
||||||
String content ="";
|
String content ="";
|
||||||
try {
|
logger.info("流量统计数据请求路径:"+url);
|
||||||
//执行get方法
|
//执行get方法
|
||||||
response = httpclient.execute(httpget);
|
response = httpclient.execute(httpget);
|
||||||
if(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK){
|
if(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK){
|
||||||
content = EntityUtils.toString(response.getEntity(),"utf-8");
|
content = EntityUtils.toString(response.getEntity(),"utf-8");
|
||||||
logger.debug("获取消息成功,相应内容如下: " + content);
|
logger.info("获取流量统计数据成功,相应内容如下: " + content);
|
||||||
}
|
}else {
|
||||||
} catch (ClientProtocolException e) {
|
logger.error("获取消息失败,相应内容如下: " + content);
|
||||||
e.printStackTrace();
|
throw new ConnectException("流量统计服务接口连接错误"+content);
|
||||||
} catch (IOException e) {
|
}
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
logger.info("dashboard图表数据请求路径:"+url);
|
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,13 +320,13 @@ public class HttpClientUtil {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws ClientProtocolException, IOException {
|
// public static void main(String[] args) throws ClientProtocolException, IOException {
|
||||||
HttpClientUtil hd = new HttpClientUtil();
|
// HttpClientUtil hd = new HttpClientUtil();
|
||||||
hd.get("http://10.0.6.115:9200/_sql?sql=select * from dfipportlog-2016-09-07-15 limit 1 10");
|
//// hd.get("http://10.0.6.115:9200/_sql?sql=select * from dfipportlog-2016-09-07-15 limit 1 10");
|
||||||
Map<String,String> map = new HashMap();
|
// Map<String,String> map = new HashMap();
|
||||||
map.put("id","1");
|
// map.put("id","1");
|
||||||
hd.post("http://localhost:8080/springMVC/menu/getChildren.do",map);
|
// hd.post("http://localhost:8080/springMVC/menu/getChildren.do",map);
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package com.nis.web.controller.dashboard;
|
package com.nis.web.controller.dashboard;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@@ -14,12 +16,17 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.beust.jcommander.internal.Maps;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
|
import com.google.gson.JsonDeserializationContext;
|
||||||
|
import com.google.gson.JsonDeserializer;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.JsonParseException;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
import com.nis.domain.Page;
|
|
||||||
import com.nis.domain.PageLog;
|
import com.nis.domain.PageLog;
|
||||||
import com.nis.domain.SysDataDictionaryItem;
|
import com.nis.domain.SysDataDictionaryItem;
|
||||||
import com.nis.domain.configuration.WebsiteDomainTopic;
|
import com.nis.domain.configuration.WebsiteDomainTopic;
|
||||||
@@ -64,6 +71,7 @@ public class DashboardController extends BaseController{
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("活跃端口数据错误"+e);
|
logger.error("活跃端口数据错误"+e);
|
||||||
|
list.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -85,9 +93,88 @@ public class DashboardController extends BaseController{
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("活跃IP错误"+e);
|
logger.error("活跃IP错误"+e);
|
||||||
|
list.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 活跃IP TOP10 一小时 间隔5分钟数据
|
||||||
|
*/
|
||||||
|
@RequestMapping(value="ipActiveMinuteList")
|
||||||
|
@ResponseBody
|
||||||
|
public List ipActiveMinuteList(){
|
||||||
|
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||||
|
List list = new ArrayList();
|
||||||
|
try {
|
||||||
|
String string = HttpClientUtil.get("http://127.0.0.1:8082/galaxy/service/log/v1/trafficIpActiveFiveMinute");
|
||||||
|
// String string = HttpClientUtil.get(Constants.DASHBOARD_URL+Constants.TRAFFIC_IPACTIVE);
|
||||||
|
Gson gson = new GsonBuilder().create();
|
||||||
|
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||||
|
logger.info("活跃IP1小时,间隔5分钟数据"+fromJsonList);
|
||||||
|
list = (ArrayList) fromJsonList.get("data");
|
||||||
|
return list;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
logger.error("活跃IP数据获取错误"+e);
|
||||||
|
list.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 活跃IP详情
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @param model
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static Gson getIntGson() {
|
||||||
|
Gson gson = new GsonBuilder()
|
||||||
|
.registerTypeAdapter(
|
||||||
|
new TypeToken<Map<String, Object>>() {
|
||||||
|
}.getType(),
|
||||||
|
new JsonDeserializer<Map<String, Object>>() {
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> deserialize(
|
||||||
|
JsonElement json, Type typeOfT,
|
||||||
|
JsonDeserializationContext context) throws JsonParseException {
|
||||||
|
|
||||||
|
Map<String, Object> treeMap = new HashMap<String, Object>();
|
||||||
|
JsonObject jsonObject = json.getAsJsonObject();
|
||||||
|
Set<Map.Entry<String, JsonElement>> entrySet = jsonObject.entrySet();
|
||||||
|
for (Map.Entry<String, JsonElement> entry : entrySet) {
|
||||||
|
treeMap.put(entry.getKey(), entry.getValue());
|
||||||
|
}
|
||||||
|
return treeMap;
|
||||||
|
}
|
||||||
|
}).create();
|
||||||
|
return gson;
|
||||||
|
}
|
||||||
|
@RequestMapping(value="ipActiveList")
|
||||||
|
public String ipActiveList( HttpServletRequest request, HttpServletResponse response, Model model, RedirectAttributes redirectAttributes){
|
||||||
|
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||||
|
List<TrafficIpActiveStatistic> ipActiveList = new ArrayList<TrafficIpActiveStatistic>();
|
||||||
|
String string;
|
||||||
|
try {
|
||||||
|
string = HttpClientUtil.get("http://127.0.0.1:8082/galaxy/service/log/v1/trafficIpActiveOneHour");
|
||||||
|
// String string = HttpClientUtil.get(Constants.DASHBOARD_URL+Constants.TRAFFIC_IPACTIVE);
|
||||||
|
|
||||||
|
Gson gson = getIntGson();
|
||||||
|
fromJsonList = gson.fromJson(string, new TypeToken<Map<String, Object>>(){}.getType());
|
||||||
|
logger.info("活跃IP1小时"+fromJsonList);
|
||||||
|
ipActiveList = gson.fromJson(fromJsonList.get("data").toString(), new TypeToken<List<TrafficIpActiveStatistic>>() {}.getType()) ;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
logger.error("活跃IP统计错误"+e);
|
||||||
|
addMessage(redirectAttributes,"request_service_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
model.addAttribute("ipActiveList", ipActiveList);
|
||||||
|
return "/dashboard/trafficIpActiveList";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 协议统计
|
* 协议统计
|
||||||
*/
|
*/
|
||||||
@@ -123,6 +210,7 @@ public class DashboardController extends BaseController{
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("协议统计错误"+e);
|
logger.error("协议统计错误"+e);
|
||||||
|
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
@@ -161,6 +249,7 @@ public class DashboardController extends BaseController{
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("app流量分析错误"+e);
|
logger.error("app流量分析错误"+e);
|
||||||
|
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
@@ -199,6 +288,7 @@ public class DashboardController extends BaseController{
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("终端用户-获取操作系统列表错误"+e);
|
logger.error("终端用户-获取操作系统列表错误"+e);
|
||||||
|
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
@@ -250,6 +340,7 @@ public class DashboardController extends BaseController{
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("终端用户-获取操作系统下浏览器类型错误"+e);
|
logger.error("终端用户-获取操作系统下浏览器类型错误"+e);
|
||||||
|
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
@@ -288,6 +379,7 @@ public class DashboardController extends BaseController{
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("终端用户-获取浏览器列表错误"+e);
|
logger.error("终端用户-获取浏览器列表错误"+e);
|
||||||
|
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
@@ -339,6 +431,7 @@ public class DashboardController extends BaseController{
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("终端用户-获取浏览器下操作系统类型错误"+e);
|
logger.error("终端用户-获取浏览器下操作系统类型错误"+e);
|
||||||
|
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
@@ -383,6 +476,7 @@ public class DashboardController extends BaseController{
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("http网站流量分析数据错误:"+e);
|
logger.error("http网站流量分析数据错误:"+e);
|
||||||
|
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
@@ -432,6 +526,7 @@ public class DashboardController extends BaseController{
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("http某个网站子域名流量统计错误"+e);
|
logger.error("http某个网站子域名流量统计错误"+e);
|
||||||
|
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
@@ -498,13 +593,14 @@ public class DashboardController extends BaseController{
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("http网站主题流量分析数据错误:"+e);
|
logger.error("http网站主题流量分析数据错误:"+e);
|
||||||
|
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value="webTypeList")
|
@RequestMapping(value="webTypeList")
|
||||||
public String ipActiveList( HttpServletRequest request, HttpServletResponse response, Model model){
|
public String webTypeList( HttpServletRequest request, HttpServletResponse response, Model model){
|
||||||
PageLog<TrafficIpActiveStatistic> page = new PageLog<TrafficIpActiveStatistic>(request, response);
|
PageLog<TrafficIpActiveStatistic> page = new PageLog<TrafficIpActiveStatistic>(request, response);
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
for (int i = 1; i < 10; i++) {
|
for (int i = 1; i < 10; i++) {
|
||||||
@@ -516,7 +612,7 @@ public class DashboardController extends BaseController{
|
|||||||
list.add(ip);
|
list.add(ip);
|
||||||
}
|
}
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
return "/dashboard/trafficWebTypeList";
|
return "/dashboard/trafficWebTypeList";
|
||||||
}
|
}
|
||||||
@RequestMapping(value="bandwidthList")
|
@RequestMapping(value="bandwidthList")
|
||||||
@@ -637,4 +733,41 @@ public class DashboardController extends BaseController{
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
map.put("a", 10);
|
||||||
|
map.put("b", "10");
|
||||||
|
map.put("c", 10L);
|
||||||
|
map.put("d", "fsaf");
|
||||||
|
//Gson gson = new Gson();
|
||||||
|
Gson gson = new GsonBuilder()
|
||||||
|
/* .registerTypeAdapter(
|
||||||
|
new TypeToken<Map<String, Object>>() {
|
||||||
|
}.getType(),
|
||||||
|
new JsonDeserializer<Map<String, Object>>() {
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> deserialize(
|
||||||
|
JsonElement json, Type typeOfT,
|
||||||
|
JsonDeserializationContext context) throws JsonParseException {
|
||||||
|
|
||||||
|
Map<String, Object> treeMap = new HashMap<String, Object>();
|
||||||
|
JsonObject jsonObject = json.getAsJsonObject();
|
||||||
|
Set<Map.Entry<String, JsonElement>> entrySet = jsonObject.entrySet();
|
||||||
|
for (Map.Entry<String, JsonElement> entry : entrySet) {
|
||||||
|
treeMap.put(entry.getKey(), entry.getValue());
|
||||||
|
}
|
||||||
|
return treeMap;
|
||||||
|
}
|
||||||
|
})*/.create();
|
||||||
|
|
||||||
|
String json = gson.toJson(map);
|
||||||
|
System.out.println(json);
|
||||||
|
|
||||||
|
Map map1 = gson.fromJson(json, Map.class);
|
||||||
|
Map map2 = gson.fromJson(json, new TypeToken<Map<String, Object>>() {
|
||||||
|
}.getType());
|
||||||
|
|
||||||
|
System.out.println(map2.get("c"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
Double dropConnNum=0d;
|
Double dropConnNum=0d;
|
||||||
Double monitorNum=0d;
|
Double monitorNum=0d;
|
||||||
Double loopConnNum=0d;
|
Double loopConnNum=0d;
|
||||||
|
Double liveConnNum=0d;
|
||||||
|
Double newUniConnNum=0d;
|
||||||
Double inoctetsNum=0d;
|
Double inoctetsNum=0d;
|
||||||
Double outoctetsNum=0d;
|
Double outoctetsNum=0d;
|
||||||
Double bandwidth=0d;
|
Double bandwidth=0d;
|
||||||
@@ -76,6 +78,8 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
monitorNum = (Double) map.get("monitorNum");
|
monitorNum = (Double) map.get("monitorNum");
|
||||||
dropConnNum = (Double) map.get("dropConnNum");
|
dropConnNum = (Double) map.get("dropConnNum");
|
||||||
loopConnNum = (Double) map.get("loopConnNum");
|
loopConnNum = (Double) map.get("loopConnNum");
|
||||||
|
liveConnNum = (Double) map.get("liveConnNum");
|
||||||
|
newUniConnNum = (Double) map.get("newUniConnNum");
|
||||||
inoctetsNum = (Double) map.get("inoctets");
|
inoctetsNum = (Double) map.get("inoctets");
|
||||||
outoctetsNum = (Double) map.get("outoctets");
|
outoctetsNum = (Double) map.get("outoctets");
|
||||||
//单位换算 byte->bit/s
|
//单位换算 byte->bit/s
|
||||||
@@ -88,6 +92,8 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
m.put("monitorNum", monitorNum);
|
m.put("monitorNum", monitorNum);
|
||||||
m.put("loopConnNum", loopConnNum);
|
m.put("loopConnNum", loopConnNum);
|
||||||
m.put("dropConnNum", dropConnNum);
|
m.put("dropConnNum", dropConnNum);
|
||||||
|
m.put("liveConnNum", liveConnNum);
|
||||||
|
m.put("newUniConnNum", newUniConnNum);
|
||||||
|
|
||||||
m.put("bandwidth", bandwidth);
|
m.put("bandwidth", bandwidth);
|
||||||
m.put("inoctetsNum", inoctetsNum);
|
m.put("inoctetsNum", inoctetsNum);
|
||||||
|
|||||||
@@ -1220,3 +1220,11 @@ user_manage=Client Account Manage
|
|||||||
ip_reuse_policy_object=IP Reuse Policy Object
|
ip_reuse_policy_object=IP Reuse Policy Object
|
||||||
area_group_manage=Group Area Manage
|
area_group_manage=Group Area Manage
|
||||||
stream_media_protocol=Stream Media Protocol
|
stream_media_protocol=Stream Media Protocol
|
||||||
|
new_link=New Link
|
||||||
|
active_link=Active Link
|
||||||
|
traffic_ipactive_hour_trend=Active IPTOP10 Trend In Nearly One Hour
|
||||||
|
traffic_ipactive_hour_max=Active IPTOP10 Maximum In Nearly One Hour
|
||||||
|
ip_addr=IP
|
||||||
|
area_id=Area
|
||||||
|
link_num=Link Number
|
||||||
|
stat_time=Statistical Time
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1214,3 +1214,11 @@ user_manage=\u5BA2\u6237\u7AEF\u8D26\u53F7\u7BA1\u7406
|
|||||||
ip_reuse_policy_object=IP\u590D\u7528\u7B56\u7565\u5BF9\u8C61
|
ip_reuse_policy_object=IP\u590D\u7528\u7B56\u7565\u5BF9\u8C61
|
||||||
area_group_manage=\u5206\u7EC4\u5730\u7406\u4FE1\u606F\u7BA1\u7406
|
area_group_manage=\u5206\u7EC4\u5730\u7406\u4FE1\u606F\u7BA1\u7406
|
||||||
stream_media_protocol=\u6D41\u5A92\u4F53\u534F\u8BAE
|
stream_media_protocol=\u6D41\u5A92\u4F53\u534F\u8BAE
|
||||||
|
new_link=\u65B0\u5EFA
|
||||||
|
active_link=\u6D3B\u8DC3
|
||||||
|
traffic_ipactive_hour_trend=\u6D3B\u8DC3IPTOP10\u8FD1\u4E00\u5C0F\u65F6\u5185\u8D8B\u52BF
|
||||||
|
traffic_ipactive_hour_max=\u6D3B\u8DC3IPTOP10\u8FD1\u4E00\u5C0F\u65F6\u5185\u6700\u5927\u503C
|
||||||
|
ip_addr=IP\u5730\u5740
|
||||||
|
area_id=\u5730\u57DF
|
||||||
|
link_num=\u8FDE\u63A5\u6B21\u6570
|
||||||
|
stat_time=\u7EDF\u8BA1\u65F6\u95F4
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
<p class="numberRun2">0</p>
|
<p class="numberRun2">0</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fr_fc">
|
<div class="fr_fc">
|
||||||
<div class="fl_visual">
|
<div class="fl_visual">
|
||||||
<i class="fa fa-trash"> </i>
|
<i class="fa fa-trash"> </i>
|
||||||
</div>
|
</div>
|
||||||
@@ -104,6 +104,34 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="fr_fc">
|
||||||
|
<div class="fl_visual">
|
||||||
|
<i class="fa fa-link"> </i>
|
||||||
|
</div>
|
||||||
|
<div class="fl_fc">
|
||||||
|
<!-- <a href="javacript:;"> -->
|
||||||
|
<p data-original-title="<spring:message code="new_link"/>"
|
||||||
|
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||||
|
<!-- 新建链接数 --><spring:message code="new_link"/></p>
|
||||||
|
<p class="numberRun5">0</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="fr_fc">
|
||||||
|
<div class="fl_visual">
|
||||||
|
<i class="fa fa-heartbeat"> </i>
|
||||||
|
</div>
|
||||||
|
<div class="fl_fc">
|
||||||
|
<!-- <a href="javacript:;"> -->
|
||||||
|
<p data-original-title="<spring:message code="active_link"/>"
|
||||||
|
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||||
|
<!-- 活跃链接数 --><spring:message code="active_link"/></p>
|
||||||
|
<p class="numberRun6">0</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -114,7 +142,7 @@
|
|||||||
<div class="main_left fl">
|
<div class="main_left fl">
|
||||||
<div class="left_1">
|
<div class="left_1">
|
||||||
<div class="main_title">
|
<div class="main_title">
|
||||||
<spring:message code="traffic_ipactive_chart"/> <a href="javascipt:void(0)" onclick="ipActiveList();return false;"><i class="fa fa-refresh"></i></a>
|
<spring:message code="traffic_ipactive_chart"/> <a href="${ctx}/dashboard/ipActiveList"><i class="fa fa-line-chart"></i></a> <a href="javascipt:void(0)" onclick="ipActiveList();return false;"><i class="fa fa-refresh"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<!-- 活跃IP图 --> <div id="chart_main" style="width:100%;height:400px;"></div>
|
<!-- 活跃IP图 --> <div id="chart_main" style="width:100%;height:400px;"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -341,10 +369,10 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
//动态显示数据
|
//动态显示数据
|
||||||
ajaxinfo();
|
// ajaxinfo();
|
||||||
setInterval(function(){
|
// setInterval(function(){
|
||||||
ajaxinfo();
|
// ajaxinfo();
|
||||||
},20000);
|
// },20000);
|
||||||
|
|
||||||
protocolList();//协议统计
|
protocolList();//协议统计
|
||||||
ipActiveList();//活跃IP
|
ipActiveList();//活跃IP
|
||||||
@@ -377,6 +405,8 @@ function ajaxinfo(){
|
|||||||
dataScroll(".numberRun1",Math.floor(data.rejectNum));
|
dataScroll(".numberRun1",Math.floor(data.rejectNum));
|
||||||
dataScroll(".numberRun2",Math.floor(data.monitorNum));
|
dataScroll(".numberRun2",Math.floor(data.monitorNum));
|
||||||
dataScroll(".numberRun3",Math.floor(data.dropConnNum));
|
dataScroll(".numberRun3",Math.floor(data.dropConnNum));
|
||||||
|
dataScroll(".numberRun5",Math.floor(data.newUniConnNum));
|
||||||
|
dataScroll(".numberRun6",Math.floor(data.liveConnNum));
|
||||||
var bandwidth=data.bandwidth;
|
var bandwidth=data.bandwidth;
|
||||||
var bandwidthK=bandwidth/1024;
|
var bandwidthK=bandwidth/1024;
|
||||||
var bandwidthM=bandwidthK/1024;
|
var bandwidthM=bandwidthK/1024;
|
||||||
@@ -430,10 +460,6 @@ function ajaxinfo(){
|
|||||||
}
|
}
|
||||||
} */
|
} */
|
||||||
},
|
},
|
||||||
error: function(data, textStatus, errorThrown){
|
|
||||||
// warning_prompt("获取实时列表数据失败!",1500);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//动态显示数据
|
//动态显示数据
|
||||||
@@ -456,18 +482,19 @@ function uaSelectChange(){
|
|||||||
|
|
||||||
//协议类型统计
|
//协议类型统计
|
||||||
function protocolList(){
|
function protocolList(){
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '${ctx}/dashboard/protocol',
|
url: '${ctx}/dashboard/protocol',
|
||||||
type : "get" ,
|
type : "get" ,
|
||||||
dataType:"json",
|
dataType:"json",
|
||||||
cache:false,async:true,
|
cache:false,async:true,
|
||||||
success:function (rs) {
|
success:function (rs) {
|
||||||
echart_1(rs);
|
if(rs[0].error!=null){
|
||||||
|
top.$.jBox.tip("<spring:message code='request_service_failed'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
echart_1(rs);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function(data, textStatus, errorThrown){
|
|
||||||
// warning_prompt("获取实时列表数据失败!",1500);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -480,11 +507,13 @@ function ipActiveList(){
|
|||||||
dataType:"json",
|
dataType:"json",
|
||||||
cache:false,async:true,
|
cache:false,async:true,
|
||||||
success:function (rs) {
|
success:function (rs) {
|
||||||
echart_main(rs);
|
if(rs[0].error!=null){
|
||||||
|
top.$.jBox.tip("<spring:message code='request_service_failed'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
echart_main(rs);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function(data, textStatus, errorThrown){
|
|
||||||
// warning_prompt("获取实时列表数据失败!",1500);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -515,24 +544,25 @@ function portActiveList(){
|
|||||||
$("#tbodyDataPort").html("");
|
$("#tbodyDataPort").html("");
|
||||||
var n=rs.length;
|
var n=rs.length;
|
||||||
var total=0;
|
var total=0;
|
||||||
if(n>0){
|
if(rs[0].error!=null){
|
||||||
$(rs).each(function(i, itemObj) {
|
$("#tbodyDataPort").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'><spring:message code='request_service_failed'/></td><td></td></tr>");
|
||||||
total+=itemObj.sum;
|
|
||||||
});
|
|
||||||
$(rs).each(function(i, itemObj) {
|
|
||||||
var tr = "<tr class='frist rowData' >";
|
|
||||||
tr += "<td class='list_c1'>"+itemObj.port+"</td>";
|
|
||||||
tr += "<td class='list_c2'>"+itemObj.sum+"</td>";
|
|
||||||
tr += "<td class='list_c3'>"+((itemObj.sum/total)*100).toFixed(1)+" %</td></tr>";
|
|
||||||
$("#tbodyDataPort").prepend(tr);
|
|
||||||
})
|
|
||||||
}else{
|
}else{
|
||||||
$("#tbodyDataPort").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'>No Data</td><td></td></tr>");
|
if(n>0){
|
||||||
|
$(rs).each(function(i, itemObj) {
|
||||||
|
total+=itemObj.sum;
|
||||||
|
});
|
||||||
|
$(rs).each(function(i, itemObj) {
|
||||||
|
var tr = "<tr class='frist rowData' >";
|
||||||
|
tr += "<td class='list_c1'>"+itemObj.port+"</td>";
|
||||||
|
tr += "<td class='list_c2'>"+itemObj.sum+"</td>";
|
||||||
|
tr += "<td class='list_c3'>"+((itemObj.sum/total)*100).toFixed(1)+" %</td></tr>";
|
||||||
|
$("#tbodyDataPort").prepend(tr);
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
$("#tbodyDataPort").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'>No Data</td><td></td></tr>");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(data, textStatus, errorThrown){
|
|
||||||
// warning_prompt("获取实时列表数据失败!",1500);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -545,11 +575,13 @@ function appTypeList(){
|
|||||||
dataType:"json",
|
dataType:"json",
|
||||||
cache:false,async:true,
|
cache:false,async:true,
|
||||||
success:function (rs) {
|
success:function (rs) {
|
||||||
echart_3(rs);
|
if(rs[0].error!=null){
|
||||||
|
top.$.jBox.tip("<spring:message code='request_service_failed'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
echart_3(rs);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function(data, textStatus, errorThrown){
|
|
||||||
// warning_prompt("获取实时列表数据失败!",1500);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -580,33 +612,34 @@ function systemList(){
|
|||||||
$("#tbodyData1").html("");
|
$("#tbodyData1").html("");
|
||||||
rs.reverse();
|
rs.reverse();
|
||||||
var n=rs.length;
|
var n=rs.length;
|
||||||
if(n>0){
|
if(rs[0].error!=null){
|
||||||
|
$("#tbodyData1").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'><spring:message code='request_service_failed'/></td><td></td></tr>");
|
||||||
$(rs).each(function(i, itemObj) {
|
|
||||||
var count= itemObj.count;
|
|
||||||
var preCount = itemObj.preCount;
|
|
||||||
var tr = "<tr class='frist rowData select-row-tr' onclick='javascript:osClick(\""+itemObj.osType+"\",this);return false;'>";
|
|
||||||
tr += "<td class='list_c1' style='color:#fff'>"+n+"</td>";
|
|
||||||
tr += "<td class='list_c2' style='color:#fff' title='"+itemObj.osType+"'>"+itemObj.osType+"</td>";
|
|
||||||
if(preCount<count){
|
|
||||||
tr += "<td class='list_c3'>"+"<i class='fa fa-arrow-up' style='color:green'/>"+"</td></tr>";
|
|
||||||
}else if(preCount>count){
|
|
||||||
tr += "<td class='list_c3'>"+"<i class='fa fa-arrow-down' style='color:red'/>"+"</td></tr>";
|
|
||||||
}else{
|
|
||||||
tr += "<td class='list_c3'>"+""+"</td></tr>";
|
|
||||||
}
|
|
||||||
n=n-1;
|
|
||||||
$("#tbodyData1").prepend(tr);
|
|
||||||
})
|
|
||||||
}else{
|
}else{
|
||||||
$("#tbodyData1").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'>No Data</td><td></td></tr>");
|
if(n>0){
|
||||||
}
|
|
||||||
|
$(rs).each(function(i, itemObj) {
|
||||||
|
var count= itemObj.count;
|
||||||
|
var preCount = itemObj.preCount;
|
||||||
|
var tr = "<tr class='frist rowData select-row-tr' onclick='javascript:osClick(\""+itemObj.osType+"\",this);return false;'>";
|
||||||
|
tr += "<td class='list_c1' style='color:#fff'>"+n+"</td>";
|
||||||
|
tr += "<td class='list_c2' style='color:#fff' title='"+itemObj.osType+"'>"+itemObj.osType+"</td>";
|
||||||
|
if(preCount<count){
|
||||||
|
tr += "<td class='list_c3'>"+"<i class='fa fa-arrow-up' style='color:green'/>"+"</td></tr>";
|
||||||
|
}else if(preCount>count){
|
||||||
|
tr += "<td class='list_c3'>"+"<i class='fa fa-arrow-down' style='color:red'/>"+"</td></tr>";
|
||||||
|
}else{
|
||||||
|
tr += "<td class='list_c3'>"+""+"</td></tr>";
|
||||||
|
}
|
||||||
|
n=n-1;
|
||||||
|
$("#tbodyData1").prepend(tr);
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
$("#tbodyData1").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'>No Data</td><td></td></tr>");
|
||||||
|
}
|
||||||
//终端图-操作系统
|
//终端图-操作系统
|
||||||
echart_2(rs);
|
echart_2(rs);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function(data, textStatus, errorThrown){
|
|
||||||
// warning_prompt("获取实时列表数据失败!",1500);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 点击操作系统列表右侧显示 浏览器图
|
// 点击操作系统列表右侧显示 浏览器图
|
||||||
@@ -624,9 +657,6 @@ function osClick(osType,obj){
|
|||||||
success:function (rs) {
|
success:function (rs) {
|
||||||
echart_5(rs);
|
echart_5(rs);
|
||||||
},
|
},
|
||||||
error: function(data, textStatus, errorThrown){
|
|
||||||
// warning_prompt("获取实时列表数据失败!",1500);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//点击浏览器列表右侧显示 操作系统图
|
//点击浏览器列表右侧显示 操作系统图
|
||||||
@@ -642,9 +672,6 @@ function bsClick(bsType,obj){
|
|||||||
success:function (rs) {
|
success:function (rs) {
|
||||||
echart_2(rs);
|
echart_2(rs);
|
||||||
},
|
},
|
||||||
error: function(data, textStatus, errorThrown){
|
|
||||||
// warning_prompt("获取实时列表数据失败!",1500);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -677,33 +704,33 @@ function browserList() {
|
|||||||
$("#tbodyData1").html("");
|
$("#tbodyData1").html("");
|
||||||
rs.reverse();
|
rs.reverse();
|
||||||
var n=rs.length;
|
var n=rs.length;
|
||||||
if(n>0){
|
if(rs[0].error!=null){
|
||||||
|
$("#tbodyData1").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'><spring:message code='request_service_failed'/></td><td></td></tr>");
|
||||||
$(rs).each(function(i, itemObj) {
|
}else{
|
||||||
var count= itemObj.count;
|
if(n>0){
|
||||||
var preCount = itemObj.preCount;
|
$(rs).each(function(i, itemObj) {
|
||||||
var tr = "<tr class='frist rowData select-row-tr' onclick='javascript:bsClick(\""+itemObj.bsType+"\",this);return false;'>";
|
var count= itemObj.count;
|
||||||
tr += "<td class='list_c1' style='color:#fff'>"+n+"</td>";
|
var preCount = itemObj.preCount;
|
||||||
tr += "<td class='list_c2' style='color:#fff' title='"+itemObj.bsType+"'>"+itemObj.bsType.substring(0,18)+"</td>";
|
var tr = "<tr class='frist rowData select-row-tr' onclick='javascript:bsClick(\""+itemObj.bsType+"\",this);return false;'>";
|
||||||
if(preCount<count){
|
tr += "<td class='list_c1' style='color:#fff'>"+n+"</td>";
|
||||||
tr += "<td class='list_c3'>"+"<i class='fa fa-arrow-up' style='color:green'/>"+"</td></tr>";
|
tr += "<td class='list_c2' style='color:#fff' title='"+itemObj.bsType+"'>"+itemObj.bsType.substring(0,18)+"</td>";
|
||||||
}else if(preCount>count){
|
if(preCount<count){
|
||||||
tr += "<td class='list_c3'>"+"<i class='fa fa-arrow-down' style='color:red'/>"+"</td></tr>";
|
tr += "<td class='list_c3'>"+"<i class='fa fa-arrow-up' style='color:green'/>"+"</td></tr>";
|
||||||
}else{
|
}else if(preCount>count){
|
||||||
tr += "<td class='list_c3'>"+""+"</td></tr>";
|
tr += "<td class='list_c3'>"+"<i class='fa fa-arrow-down' style='color:red'/>"+"</td></tr>";
|
||||||
}
|
}else{
|
||||||
$("#tbodyData1").prepend(tr);
|
tr += "<td class='list_c3'>"+""+"</td></tr>";
|
||||||
n=n-1;
|
}
|
||||||
})
|
$("#tbodyData1").prepend(tr);
|
||||||
}else{
|
n=n-1;
|
||||||
$("#tbodyData1").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'>No Data</td><td></td></tr>");
|
})
|
||||||
}
|
}else{
|
||||||
//终端图-浏览器
|
$("#tbodyData1").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'>No Data</td><td></td></tr>");
|
||||||
echart_5(rs);
|
}
|
||||||
|
//终端图-浏览器
|
||||||
|
echart_5(rs);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function(data, textStatus, errorThrown){
|
|
||||||
// warning_prompt("获取实时列表数据失败!",1500);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -732,31 +759,32 @@ function websiteList() {
|
|||||||
success:function (rs) {
|
success:function (rs) {
|
||||||
$("#tbodyData2").html("");
|
$("#tbodyData2").html("");
|
||||||
var n=rs.length;
|
var n=rs.length;
|
||||||
if(n>0){
|
if(rs[0].error!=null){
|
||||||
$(rs).each(function(i, itemObj) {
|
$("#tbodyData2").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'><spring:message code='request_service_failed'/></td><td></td></tr>");
|
||||||
var tr = "<tr class='frist rowData select-row-tr' onclick='javascript:webClick(\""+itemObj.websiteServiceId+"\",this);return false;'>";
|
}else{
|
||||||
tr += "<td class='list_c1' style='color:#fff'>"+n+"</td>";
|
if(n>0){
|
||||||
tr += "<td class='list_c2' style='color:#fff' title="+itemObj.websiteService+">"+itemObj.websiteService.substring(0,18)+"</td>";
|
$(rs).each(function(i, itemObj) {
|
||||||
if(itemObj.preCount<itemObj.count){
|
var tr = "<tr class='frist rowData select-row-tr' onclick='javascript:webClick(\""+itemObj.websiteServiceId+"\",this);return false;'>";
|
||||||
tr += "<td class='list_c3'>"+"<i class='fa fa-arrow-up' style='color:green'/>"+"</td></tr>";
|
tr += "<td class='list_c1' style='color:#fff'>"+n+"</td>";
|
||||||
}else if(itemObj.preCount>itemObj.count){
|
tr += "<td class='list_c2' style='color:#fff' title="+itemObj.websiteService+">"+itemObj.websiteService.substring(0,18)+"</td>";
|
||||||
tr += "<td class='list_c3'>"+"<i class='fa fa-arrow-down' style='color:red'/>"+"</td></tr>";
|
if(itemObj.preCount<itemObj.count){
|
||||||
}else{
|
tr += "<td class='list_c3'>"+"<i class='fa fa-arrow-up' style='color:green'/>"+"</td></tr>";
|
||||||
tr += "<td class='list_c3'>"+""+"</td></tr>";
|
}else if(itemObj.preCount>itemObj.count){
|
||||||
}
|
tr += "<td class='list_c3'>"+"<i class='fa fa-arrow-down' style='color:red'/>"+"</td></tr>";
|
||||||
|
}else{
|
||||||
|
tr += "<td class='list_c3'>"+""+"</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
$("#tbodyData2").prepend(tr);
|
$("#tbodyData2").prepend(tr);
|
||||||
n=n-1;
|
n=n-1;
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
$("#tbodyData2").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'>No Data</td><td></td></tr>");
|
$("#tbodyData2").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'>No Data</td><td></td></tr>");
|
||||||
}
|
}
|
||||||
//网站统计图
|
//网站统计图
|
||||||
echart_4(rs);
|
echart_4(rs);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function(data, textStatus, errorThrown){
|
|
||||||
// warning_prompt("获取实时列表数据失败!",1500);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//点击http网站列表-显示域名图
|
//点击http网站列表-显示域名图
|
||||||
@@ -774,9 +802,6 @@ function webClick(websiteServiceId,obj){
|
|||||||
success:function (rs) {
|
success:function (rs) {
|
||||||
echart_6(rs);
|
echart_6(rs);
|
||||||
},
|
},
|
||||||
error: function(data, textStatus, errorThrown){
|
|
||||||
// warning_prompt("获取实时列表数据失败!",1500);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//点击http网站列表-显示域名图
|
//点击http网站列表-显示域名图
|
||||||
@@ -790,9 +815,6 @@ function topicAndDomainList(){
|
|||||||
//主题域名流量统计图
|
//主题域名流量统计图
|
||||||
echart_topic_domain(rs);
|
echart_topic_domain(rs);
|
||||||
},
|
},
|
||||||
error: function(data, textStatus, errorThrown){
|
|
||||||
// warning_prompt("获取实时列表数据失败!",1500);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<div class="theme-panel hidden-xs hidden-sm">
|
<div class="theme-panel hidden-xs hidden-sm">
|
||||||
|
<button type="button" class="btn btn-default" onClick="javascript:window.location='${ctx}/dashboard/ipActiveList'"><spring:message code="refresh"/></button>
|
||||||
<button type="button" class="btn btn-default" onClick="javascript:window.location='${ctx}/dashboard/logChart'"><spring:message code="back"/></button>
|
<button type="button" class="btn btn-default" onClick="javascript:window.location='${ctx}/dashboard/logChart'"><spring:message code="back"/></button>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="page-title">
|
<h3 class="page-title">
|
||||||
<spring:message code="活跃IP实时统计TOP100"></spring:message>
|
<spring:message code="traffic_ipactive_hour_trend"></spring:message>
|
||||||
</h3>
|
</h3>
|
||||||
<h5 class="page-header"></h5>
|
|
||||||
|
|
||||||
<div id="chart" style="width:100%;height:400px;"></div>
|
<div id="chart" style="width:95%;height:350px;"></div>
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
@@ -30,25 +30,26 @@
|
|||||||
</form:form>
|
</form:form>
|
||||||
</div>
|
</div>
|
||||||
<sys:message content="${message}"/>
|
<sys:message content="${message}"/>
|
||||||
<div class="table-responsive">
|
<h3 class="page-title">
|
||||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
<spring:message code="traffic_ipactive_hour_max"></spring:message>
|
||||||
|
</h3>
|
||||||
|
<div class="" align="center">
|
||||||
|
<table id="contentTable"class="table table-striped table-bordered table-condensed text-nowrap">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><spring:message code="chart"/></th>
|
|
||||||
<th><spring:message code="ip_addr"/></th>
|
<th><spring:message code="ip_addr"/></th>
|
||||||
<th><spring:message code="area_id"/></th>
|
<th><spring:message code="area_id"/></th>
|
||||||
<th><spring:message code="link_num"/></th>
|
<th><spring:message code="link_num"/></th>
|
||||||
<th><spring:message code="c2s_pkt_num"/></th>
|
<th><spring:message code="c2s_pkt_num"/></th>
|
||||||
<th><spring:message code="s2c_pkt_num"/></th>
|
<th><spring:message code="s2c_pkt_num"/></th>
|
||||||
<th><spring:message code="c2s_byte_len"/></th>
|
<th><spring:message code="c2s_byte_num"/></th>
|
||||||
<th><spring:message code="s2c_byte_len"/></th>
|
<th><spring:message code="s2c_byte_num"/></th>
|
||||||
<th><spring:message code="stat_time"/></th>
|
<th><spring:message code="stat_time"/></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<c:forEach var="entry" items="${page.list }" varStatus="status">
|
<c:forEach var="entry" items="${ipActiveList }" varStatus="status">
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="#" onclick="openChart();return false"><i class="fa fa-bar-chart"></i></a></td>
|
|
||||||
<td>${entry.ipAddr }</td>
|
<td>${entry.ipAddr }</td>
|
||||||
<td>${entry.areaId }</td>
|
<td>${entry.areaId }</td>
|
||||||
<td>${entry.linkNum }</td>
|
<td>${entry.linkNum }</td>
|
||||||
@@ -56,7 +57,8 @@
|
|||||||
<td>${entry.s2cPktNum }</td>
|
<td>${entry.s2cPktNum }</td>
|
||||||
<td>${entry.c2sByteLen }</td>
|
<td>${entry.c2sByteLen }</td>
|
||||||
<td>${entry.s2cByteLen }</td>
|
<td>${entry.s2cByteLen }</td>
|
||||||
<td><fmt:formatDate value="${entry.statTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
<td>${entry.statTime }</td>
|
||||||
|
<%-- <td><fmt:formatDate value="${entry.statTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td> --%>
|
||||||
</tr>
|
</tr>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -68,48 +70,61 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
||||||
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
ipActiveMinuteList()
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function showIpActiveChart(rs){
|
||||||
|
console.log(rs)
|
||||||
|
var data=new Array();
|
||||||
|
var xData=new Array();
|
||||||
|
xData=rs[0].statTime;
|
||||||
|
var series=new Array();
|
||||||
|
$(rs).each(function(i, d) {
|
||||||
|
series.push({
|
||||||
|
name: d.ipAddr,
|
||||||
|
data: d.linkNum
|
||||||
|
});
|
||||||
|
})
|
||||||
var chart = Highcharts.chart('chart', {
|
var chart = Highcharts.chart('chart', {
|
||||||
title: {
|
title: {
|
||||||
text: 'Traffic IP Active Total'
|
text: null
|
||||||
},
|
},
|
||||||
|
xAxis: {
|
||||||
|
type:'category',
|
||||||
|
categories: xData,
|
||||||
|
title: {
|
||||||
|
text: 'time',
|
||||||
|
align:'high',
|
||||||
|
},
|
||||||
|
// labels:{
|
||||||
|
// formatter:function(){
|
||||||
|
// if(this.value.length>15){
|
||||||
|
// return '<span>'+this.value.substring(10,20)+"..."+'</span>'
|
||||||
|
// }else{
|
||||||
|
// return this.value
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
|
||||||
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
title: {
|
title: {
|
||||||
text: 'IP'
|
text: 'linkNumber'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
credits:{//是否有highcharts水印
|
||||||
|
enabled:false
|
||||||
|
},
|
||||||
legend: {
|
legend: {
|
||||||
layout: 'vertical',
|
layout: 'vertical',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
verticalAlign: 'middle'
|
verticalAlign: 'middle'
|
||||||
},
|
},
|
||||||
|
series: series,
|
||||||
plotOptions: {
|
|
||||||
series: {
|
|
||||||
label: {
|
|
||||||
connectorAllowed: false
|
|
||||||
},
|
|
||||||
pointStart: 2010
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
series: [{
|
|
||||||
name: 'Installation',
|
|
||||||
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
|
|
||||||
}, {
|
|
||||||
name: 'Manufacturing',
|
|
||||||
data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
|
|
||||||
}, {
|
|
||||||
name: 'Sales & Distribution',
|
|
||||||
data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
|
|
||||||
}, {
|
|
||||||
name: 'Project Development',
|
|
||||||
data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227]
|
|
||||||
}, {
|
|
||||||
name: 'Other',
|
|
||||||
data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
|
|
||||||
}],
|
|
||||||
|
|
||||||
responsive: {
|
responsive: {
|
||||||
rules: [{
|
rules: [{
|
||||||
@@ -127,22 +142,24 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
function showIpActiveChart(){
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//活跃IP一小时间隔五分钟统计
|
||||||
|
function ipActiveMinuteList(){
|
||||||
|
|
||||||
function openChart(){
|
$.ajax({
|
||||||
var url = "${ctx}/traffic/showChart";
|
url: '${ctx}/dashboard/ipActiveMinuteList',
|
||||||
windowOpen(url, "", 900, 600);
|
type : "get" ,
|
||||||
// lay.open({
|
dataType:"json",
|
||||||
// type:1,
|
cache:false,async:true,
|
||||||
// area:['420px','240px'],
|
success:function (rs) {
|
||||||
// content:''
|
showIpActiveChart(rs);
|
||||||
// })
|
},
|
||||||
}
|
error: function(data, textStatus, errorThrown){
|
||||||
|
// warning_prompt("获取实时列表数据失败!",1500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -21,12 +21,12 @@ p{
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.data_content .data_info .info_2{
|
.data_content .data_info .info_2{
|
||||||
width: 60%;
|
width: 70%;
|
||||||
height: 110px;
|
height: 110px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data_content .data_info .fr_fc{
|
.data_content .data_info .fr_fc{
|
||||||
width: 155%;
|
width: 100%;
|
||||||
height: 110px;
|
height: 110px;
|
||||||
border: 1px solid #303030;
|
border: 1px solid #303030;
|
||||||
border-width: 0 1px;
|
border-width: 0 1px;
|
||||||
@@ -55,7 +55,7 @@ p{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.data_content .data_info .info_1{
|
.data_content .data_info .info_1{
|
||||||
width: 40%;
|
width: 30%;
|
||||||
height: 110px;
|
height: 110px;
|
||||||
}
|
}
|
||||||
.data_content .data_info .info_2 .fr_fc:first-child{
|
.data_content .data_info .info_2 .fr_fc:first-child{
|
||||||
@@ -82,7 +82,7 @@ p{
|
|||||||
} */
|
} */
|
||||||
|
|
||||||
.data_content .data_info>div.info_2>.text_2>div{
|
.data_content .data_info>div.info_2>.text_2>div{
|
||||||
width: 33.333%;
|
width: 20%;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.data_content .data_info>div.info_1>div>div,
|
.data_content .data_info>div.info_1>div>div,
|
||||||
@@ -134,6 +134,18 @@ p{
|
|||||||
color:#288dce;
|
color:#288dce;
|
||||||
margin-top: 2.1em;
|
margin-top: 2.1em;
|
||||||
}
|
}
|
||||||
|
.data_content .data_info .info_2 .fr_fc .numberRun5{
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 16px;
|
||||||
|
color:#288dce;
|
||||||
|
margin-top: 2.1em;
|
||||||
|
}
|
||||||
|
.data_content .data_info .info_2 .fr_fc .numberRun6{
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 16px;
|
||||||
|
color:#288dce;
|
||||||
|
margin-top: 2.1em;
|
||||||
|
}
|
||||||
.data_content .data_info .info_2 .fr_fc .numberRun{
|
.data_content .data_info .info_2 .fr_fc .numberRun{
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@@ -153,9 +165,11 @@ p{
|
|||||||
margin-top: 0.6px;
|
margin-top: 0.6px;
|
||||||
}
|
}
|
||||||
.data_content .data_info>div.info_1 .fl_fc .csNum{
|
.data_content .data_info>div.info_1 .fl_fc .csNum{
|
||||||
font-size: 12px;
|
font-size: 11px;
|
||||||
color:#337ab7 !important;
|
color:#337ab7 !important;
|
||||||
margin-top: 1px;
|
margin-top: -6px;
|
||||||
|
text-align: center;
|
||||||
|
margin-left: 1.3px;
|
||||||
}
|
}
|
||||||
/* .data_info{
|
/* .data_info{
|
||||||
float: right;
|
float: right;
|
||||||
|
|||||||
Reference in New Issue
Block a user