帮洪庆提交 内容:网站域名统计详情
This commit is contained in:
@@ -706,6 +706,7 @@ public final class Constants {
|
|||||||
public static final String NTC_ACTION_ENTRANCE_REPORT=Configurations.getStringProperty("ntcActionEntranceReport","ntcActionEntranceReport");
|
public static final String NTC_ACTION_ENTRANCE_REPORT=Configurations.getStringProperty("ntcActionEntranceReport","ntcActionEntranceReport");
|
||||||
public static final String TRAFFIC_WEBSITELIST_NOTIME=Configurations.getStringProperty("trafficWebsiteListNoTime","trafficWebsiteListNoTime");
|
public static final String TRAFFIC_WEBSITELIST_NOTIME=Configurations.getStringProperty("trafficWebsiteListNoTime","trafficWebsiteListNoTime");
|
||||||
public static final String TRAFFIC_TOPICLIST=Configurations.getStringProperty("trafficTopicList","trafficTopicList");
|
public static final String TRAFFIC_TOPICLIST=Configurations.getStringProperty("trafficTopicList","trafficTopicList");
|
||||||
|
public static final String TRAFFIC_DOMAIN_TRANS=Configurations.getStringProperty("trafficDomainTrans","trafficDomainTrans");
|
||||||
/**
|
/**
|
||||||
* httpclient 工具超时时间设置
|
* httpclient 工具超时时间设置
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -698,92 +698,6 @@ public class DashboardController extends BaseController{
|
|||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value="webTypeList")
|
|
||||||
public String webTypeList( HttpServletRequest request, HttpServletResponse response, Model model){
|
|
||||||
PageLog<TrafficIpActiveStatistic> page = new PageLog<TrafficIpActiveStatistic>(request, response);
|
|
||||||
List list = new ArrayList();
|
|
||||||
for (int i = 1; i < 10; i++) {
|
|
||||||
TrafficIpActiveStatistic ip = new TrafficIpActiveStatistic();
|
|
||||||
ip.setId(i);
|
|
||||||
ip.setIpAddr(3+i+".1.1."+i);
|
|
||||||
ip.setAreaId("11");
|
|
||||||
ip.setLinkNum(1212l);
|
|
||||||
list.add(ip);
|
|
||||||
}
|
|
||||||
page.setList(list);
|
|
||||||
model.addAttribute("page", page);
|
|
||||||
return "/dashboard/trafficWebTypeList";
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////test
|
|
||||||
@RequestMapping(value="showChart")
|
|
||||||
public String showChart(@ModelAttribute("entry") TrafficIpActiveStatistic entry, Model model){
|
|
||||||
String ipAddr="1.1.1.1";
|
|
||||||
TrafficIpActiveStatistic ip=new TrafficIpActiveStatistic();
|
|
||||||
ArrayList list = new ArrayList();
|
|
||||||
// chartMap.put("ipAddr", ip.getIpAddr());
|
|
||||||
HashMap map1 = new HashMap();
|
|
||||||
HashMap map2 = new HashMap();
|
|
||||||
HashMap map3 = new HashMap();
|
|
||||||
HashMap map4 = new HashMap();
|
|
||||||
map1.put("name", "c2sPktNum");
|
|
||||||
map1.put("y", ip.getC2sPktNum());
|
|
||||||
map2.put("name", "s2cPktNum");
|
|
||||||
map2.put("y", ip.getS2cPktNum());
|
|
||||||
map3.put("name", "c2sByteLen");
|
|
||||||
map3.put("y", ip.getC2sByteLen());
|
|
||||||
map4.put("name", "s2cByteLen");
|
|
||||||
map4.put("y", ip.getS2cByteLen());
|
|
||||||
list.add(ip.getC2sPktNum());
|
|
||||||
list.add(ip.getS2cPktNum());
|
|
||||||
list.add(ip.getC2sByteLen());
|
|
||||||
list.add(ip.getS2cByteLen());
|
|
||||||
|
|
||||||
// String json = new Gson().toJson();
|
|
||||||
model.addAttribute("ipAddr",ipAddr);
|
|
||||||
model.addAttribute("chartMap",list);
|
|
||||||
return "/dashboard/trafficWebTypeList";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
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"));
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -256,34 +256,6 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 间隔5分钟数据
|
|
||||||
*/
|
|
||||||
@RequestMapping(value="bandwidthTransThree")
|
|
||||||
@ResponseBody
|
|
||||||
public Map bandwidthTransThree(String beginDate,String endDate){
|
|
||||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
|
||||||
Map map = new HashMap();
|
|
||||||
//String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_TWO;
|
|
||||||
//String url="http://192.168.11.78:8080/galaxy/service/log/v1/"+Constants.TRAFFIC_BANDWIDTH_TRANS_THREE;
|
|
||||||
//String url="http://192.168.11.78:8080/galaxy/service/log/v1/"+Constants.TRAFFIC_BANDWIDTH_TRANS_FOUR;
|
|
||||||
String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_THREE;
|
|
||||||
//String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_FOUR;
|
|
||||||
try {
|
|
||||||
url=urlAddDate(url,beginDate,endDate);
|
|
||||||
|
|
||||||
String string = HttpClientUtil.get(url);
|
|
||||||
Gson gson = new GsonBuilder().create();
|
|
||||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
|
||||||
logger.debug("bandwidthTransThree服务查询数据成功");
|
|
||||||
Map result = (Map)fromJsonList.get("data");
|
|
||||||
return result;
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
logger.error("带宽详情数据获取错误"+e);
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 协议类型详细列表
|
* 协议类型详细列表
|
||||||
*/
|
*/
|
||||||
@@ -427,24 +399,77 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
Calendar cal = Calendar. getInstance ();
|
Calendar cal = Calendar. getInstance ();
|
||||||
cal.setTime(new Date());
|
cal.setTime(new Date());
|
||||||
String now = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间
|
String now = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间
|
||||||
cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 1);
|
cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 12);
|
||||||
String oneHoursAgo = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());
|
String oneHoursAgo = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());
|
||||||
|
List<WebsiteDomainTopic> domainList = appCfgService.getDomainDict(new WebsiteDomainTopic());// domain 域名
|
||||||
|
model.addAttribute("domainList", domainList);
|
||||||
model.addAttribute("beginDate", oneHoursAgo);
|
model.addAttribute("beginDate", oneHoursAgo);
|
||||||
model.addAttribute("endDate", now);
|
model.addAttribute("endDate", now);
|
||||||
return "/dashboard/trafficWebTypeList";
|
return "/dashboard/trafficWebTypeList";
|
||||||
}
|
}
|
||||||
|
@RequestMapping("domainTrans")
|
||||||
|
public String domainTrans(Model model,Integer domain,Integer entranceId,String beginDate,String endDate,String domainName){
|
||||||
|
|
||||||
|
model.addAttribute("domainName", domainName);
|
||||||
|
model.addAttribute("domain", domain);
|
||||||
|
model.addAttribute("entranceId", entranceId);
|
||||||
|
model.addAttribute("beginDate", beginDate);
|
||||||
|
model.addAttribute("endDate", endDate);
|
||||||
|
return "/dashboard/trafficDomainTrans";
|
||||||
|
}
|
||||||
|
@RequestMapping("ajaxDomainTrans")
|
||||||
|
@ResponseBody
|
||||||
|
public List ajaxDomainTrans(String beginDate,String endDate,Integer domain,Integer entranceId,Model model){
|
||||||
|
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||||
|
List list = new ArrayList();
|
||||||
|
try {
|
||||||
|
// String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_IPACTIVE_ONEHOUR;
|
||||||
|
String url = "http://localhost:8088/galaxy-service/service/log/v1/trafficDomainTrans";
|
||||||
|
url=urlAddDate(url, beginDate, endDate);
|
||||||
|
if(domain!=null){
|
||||||
|
url=url+"&domain="+domain;
|
||||||
|
}
|
||||||
|
if(entranceId!=null){
|
||||||
|
url=url+"&entranceId="+entranceId;
|
||||||
|
}
|
||||||
|
String string = HttpClientUtil.get(url);
|
||||||
|
Gson gson = new GsonBuilder().create();
|
||||||
|
fromJsonList = gson.fromJson(string, new TypeToken<Map<String, Object>>(){}.getType());
|
||||||
|
logger.debug("活跃IP1小时"+fromJsonList);
|
||||||
|
list = (ArrayList) fromJsonList.get("data");
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
logger.error("活跃IP数据获取错误"+e);
|
||||||
|
list.add(Maps.newHashMap("error","request_service_failed"));
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 网站统计图跟表
|
* 网站统计图跟表
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="websiteList")
|
@RequestMapping(value="websiteList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public List websiteList(Model model,@RequestParam(required=false)String beginDate,@RequestParam(required=false)String endDate){
|
public List websiteList(Integer entranceId,Integer domain,Model model,@RequestParam(required=false)String beginDate,@RequestParam(required=false)String endDate){
|
||||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_WEBSITELIST;
|
String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_WEBSITELIST_NOTIME;
|
||||||
// String url = "http://192.168.11.87:8088/galaxy-service/service/log/v1/"+Constants.TRAFFIC_WEBSITELIST;
|
// String url = "http://192.168.11.87:8088/galaxy-service/service/log/v1/"+Constants.TRAFFIC_WEBSITELIST;
|
||||||
try {
|
try {
|
||||||
|
if(StringUtil.isBlank(beginDate)||StringUtil.isBlank(endDate)){
|
||||||
|
Calendar cal = Calendar. getInstance ();
|
||||||
|
cal.setTime(new Date());
|
||||||
|
endDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间
|
||||||
|
cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 12);
|
||||||
|
beginDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());
|
||||||
|
}
|
||||||
url=urlAddDate(url, beginDate, endDate);
|
url=urlAddDate(url, beginDate, endDate);
|
||||||
|
if(domain!=null){
|
||||||
|
url=url+"&domain="+domain;
|
||||||
|
}
|
||||||
|
if(entranceId!=null){
|
||||||
|
url=url+"&entranceId="+entranceId;
|
||||||
|
}
|
||||||
String string = HttpClientUtil.get(url);
|
String string = HttpClientUtil.get(url);
|
||||||
Gson gson = new GsonBuilder().create();
|
Gson gson = new GsonBuilder().create();
|
||||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||||
@@ -454,15 +479,15 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
DecimalFormat df = new DecimalFormat("0.00");
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
DecimalFormat dl = new DecimalFormat("0");
|
DecimalFormat dl = new DecimalFormat("0");
|
||||||
DecimalFormat pf = new DecimalFormat("0.00%");
|
DecimalFormat pf = new DecimalFormat("0.00%");
|
||||||
Double totalLink=0d;
|
// Double totalLink=0d;
|
||||||
Double totalGbyte=0d;
|
Double totalGbyte=0d;
|
||||||
Double totalPackets=0d;
|
Double totalPackets=0d;
|
||||||
for (Object object : list) {
|
for (Object object : list) {
|
||||||
Map m=(Map)object;
|
Map m=(Map)object;
|
||||||
Double count=(Double)m.get("count");
|
Double count=(Double)m.get("byteCount");
|
||||||
totalGbyte+=count;
|
totalGbyte+=count;
|
||||||
totalLink+=(Double)m.get("linkNum");
|
// totalLink+=(Double)m.get("linkNum");
|
||||||
totalPackets+=(Double)m.get("packets");
|
totalPackets+=(Double)m.get("pktCount");
|
||||||
String format = df.format(count/1024/1024/1024);
|
String format = df.format(count/1024/1024/1024);
|
||||||
m.put("Gbyte", format);
|
m.put("Gbyte", format);
|
||||||
}
|
}
|
||||||
@@ -475,14 +500,16 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
for (Object object : list) {
|
for (Object object : list) {
|
||||||
Map m=(Map)object;
|
Map m=(Map)object;
|
||||||
Double perLink = ((Double)m.get("linkNum"))/totalLink;
|
// Double perLink = ((Double)m.get("linkNum"))/totalLink;
|
||||||
m.put("perLink",pf.format(perLink));
|
// m.put("perLink",pf.format(perLink));
|
||||||
Double perPackets = ((Double)m.get("packets"))/totalPackets;
|
Double perPackets = ((Double)m.get("pktCount"))/totalPackets;
|
||||||
m.put("perPackets", pf.format(perPackets));
|
m.put("perPackets", pf.format(perPackets));
|
||||||
Double perGbyte = ((Double)m.get("count"))/totalGbyte;
|
Double perGbyte = ((Double)m.get("byteCount"))/totalGbyte;
|
||||||
m.put("perGbyte", pf.format(perGbyte));
|
m.put("perGbyte", pf.format(perGbyte));
|
||||||
if(map.containsKey(Long.parseLong(dl.format(m.get("webId"))))){
|
if(map.containsKey(Long.parseLong(dl.format(m.get("webId"))))){
|
||||||
m.put("website", map.get(Long.parseLong(dl.format(m.get("webId")))));
|
m.put("website", map.get(Long.parseLong(dl.format(m.get("webId")))));
|
||||||
|
}else{
|
||||||
|
m.put("website", dl.format(m.get("webId")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Collections.sort(list, new Comparator<Object>() {
|
Collections.sort(list, new Comparator<Object>() {
|
||||||
@@ -500,10 +527,10 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
Map m1=(Map)o1;
|
Map m1=(Map)o1;
|
||||||
Map m2=(Map)o2;
|
Map m2=(Map)o2;
|
||||||
if((Double)m1.get("count")==(Double)m2.get("count")){
|
if((Double)m1.get("byteCount")==(Double)m2.get("byteCount")){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int result=((Double)m1.get("count")-(Double)m2.get("count"))>0?-1:1;
|
int result=((Double)m1.get("byteCount")-(Double)m2.get("byteCount"))>0?-1:1;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -523,8 +550,9 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
public List statisticList(Model model,@RequestParam(required=false)String beginDate,@RequestParam(required=false)String endDate){
|
public List statisticList(Model model,@RequestParam(required=false)String beginDate,@RequestParam(required=false)String endDate){
|
||||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_TOPIC_AND_DOMAIN_CHART;
|
String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_TOPICLIST;
|
||||||
//String url = "http://192.168.11.87:8088/galaxy-service/service/log/v1/"+Constants.TRAFFIC_TOPIC_AND_DOMAIN_CHART;
|
//String url = "http://192.168.11.87:8088/galaxy-service/service/log/v1/"+Constants.TRAFFIC_TOPIC_AND_DOMAIN_CHART;
|
||||||
|
//String url = "http://192.168.11.87:8088/galaxy-service/service/log/v1/"+Constants.TRAFFIC_TOPICLIST;
|
||||||
Map map=new HashMap();
|
Map map=new HashMap();
|
||||||
try {
|
try {
|
||||||
url=urlAddDate(url,beginDate,endDate);
|
url=urlAddDate(url,beginDate,endDate);
|
||||||
@@ -557,11 +585,18 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(Object object2 : list) {
|
//将总数据赋值给每个实体 方便计算百分比 如果数据都为空 则不返回给页面展示
|
||||||
Map m2=(Map) object2;
|
for(int i=list.size()-1;i>=0;i--) {
|
||||||
|
Map m2=(Map) list.get(i);
|
||||||
m2.put("allLink", totalLink);
|
m2.put("allLink", totalLink);
|
||||||
m2.put("allPackets",totalPackets);
|
m2.put("allPackets",totalPackets);
|
||||||
m2.put("allGByte", totalGByte);
|
m2.put("allGByte", totalGByte);
|
||||||
|
long parseLong = Long.parseLong(lf.format(m2.get("linkNum")));
|
||||||
|
long parseLong2 = Long.parseLong(lf.format(m2.get("packets")));
|
||||||
|
double parseDouble = Double.parseDouble(lf.format(m2.get("count")));
|
||||||
|
if(parseLong==0&&parseLong2==0&&parseDouble==0) {
|
||||||
|
list.remove(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -597,3 +597,4 @@ ntcURLReport=ntcURLReport
|
|||||||
ntcIpRangeReport=ntcIpRangeReport
|
ntcIpRangeReport=ntcIpRangeReport
|
||||||
trafficWebsiteListNoTime=trafficWebsiteListNoTime
|
trafficWebsiteListNoTime=trafficWebsiteListNoTime
|
||||||
trafficTopicList=trafficTopicList
|
trafficTopicList=trafficTopicList
|
||||||
|
trafficDomainTrans=trafficDomainTrans
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<div class="data_info">
|
<div class="data_info">
|
||||||
<div class="info_1 fl_fc">
|
<div class="info_1 fl_fc">
|
||||||
<div class="text_1">
|
<div class="text_1">
|
||||||
<div class="fr_fc" style="width:55%">
|
<div class="fr_fc" style="width:60%">
|
||||||
<div class="fl_visual">
|
<div class="fl_visual">
|
||||||
<a href="${ctx}/dashboard/traffic/bandwidthList"><i class="fa fa-cloud-download"></i></a>
|
<a href="${ctx}/dashboard/traffic/bandwidthList"><i class="fa fa-cloud-download"></i></a>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,10 +45,7 @@
|
|||||||
<span class="numberRun4">0</span > <span class="numberRun4-unit">bps</span></a>
|
<span class="numberRun4">0</span > <span class="numberRun4-unit">bps</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="fr_fc" style="width:40%">
|
||||||
|
|
||||||
|
|
||||||
<div class="fr_fc" style="width:45%">
|
|
||||||
<div class="fl_visual">
|
<div class="fl_visual">
|
||||||
<a href="${ctx}/dashboard/traffic/trafficBlockList?searchAction=block"><i class="fa fa-ban"></i></a>
|
<a href="${ctx}/dashboard/traffic/trafficBlockList?searchAction=block"><i class="fa fa-ban"></i></a>
|
||||||
</div>
|
</div>
|
||||||
@@ -77,18 +74,6 @@
|
|||||||
<a href="${ctx}/dashboard/traffic/trafficBlockList?searchAction=monitor"><p class="numberRun2">0</p></a>
|
<a href="${ctx}/dashboard/traffic/trafficBlockList?searchAction=monitor"><p class="numberRun2">0</p></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fr_fc">
|
|
||||||
<div class="fl_visual">
|
|
||||||
<i class="fa fa-smile-o"> </i>
|
|
||||||
</div>
|
|
||||||
<div class="fl_fc">
|
|
||||||
<p data-original-title="<spring:message code="pass"/>"
|
|
||||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
|
||||||
<!-- pass --><spring:message code="pass"/></p>
|
|
||||||
<p class="numberRun7">0</p>
|
|
||||||
</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>
|
||||||
@@ -128,19 +113,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="fr_fc">
|
|
||||||
<div class="fl_visual">
|
|
||||||
<i class="fa fa-heartbeat"> </i>
|
|
||||||
</div>
|
|
||||||
<div class="fl_fc">
|
|
||||||
<p data-original-title="<spring:message code="live_link"/>"
|
|
||||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
|
||||||
<!-- live link--><spring:message code="live_link"/></p>
|
|
||||||
<p class="numberRun8">0</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="fr_fc">
|
<div class="fr_fc">
|
||||||
<div class="fl_visual">
|
<div class="fl_visual">
|
||||||
<i class="fa fa-unlink"> </i>
|
<i class="fa fa-unlink"> </i>
|
||||||
@@ -155,8 +127,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="fr_fc">
|
||||||
|
<div class="fl_visual">
|
||||||
|
<i class="fa fa-smile-o"> </i>
|
||||||
|
</div>
|
||||||
|
<div class="fl_fc">
|
||||||
|
<p data-original-title="<spring:message code="pass"/>"
|
||||||
|
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||||
|
<!-- pass --><spring:message code="pass"/></p>
|
||||||
|
<p class="numberRun7">0</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="fr_fc">
|
||||||
|
<div class="fl_visual">
|
||||||
|
<i class="fa fa-heartbeat"> </i>
|
||||||
|
</div>
|
||||||
|
<div class="fl_fc">
|
||||||
|
<p data-original-title="<spring:message code="live_link"/>"
|
||||||
|
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||||
|
<!-- live link--><spring:message code="live_link"/></p>
|
||||||
|
<p class="numberRun8">0</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -172,12 +164,6 @@
|
|||||||
<div class="main_title">
|
<div class="main_title">
|
||||||
<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>
|
<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>
|
||||||
<div style="margin-left:150px;margin-top:19px;position:absolute;z-index:1000;">
|
|
||||||
<input id="ipBeginDate" name="beginDate" type="text" readonly="readonly" class="Wdate" style="font-size:10px;width:125px;background-color: #424242;border:0;color:#fff"
|
|
||||||
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'ipEndDate\')}'});"/>
|
|
||||||
<input id="ipEndDate" name="endDate" type="text" readonly="readonly" class="Wdate" style="font-size:10px;width:125px;background-color: #424242;border:0;color:#fff""
|
|
||||||
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'ipBeginDate\')}'});"/>
|
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
@@ -235,7 +221,7 @@
|
|||||||
<div class="main_center1 fl">
|
<div class="main_center1 fl">
|
||||||
<div class="bottom_web fl">
|
<div class="bottom_web fl">
|
||||||
<div class="main_title_web">
|
<div class="main_title_web">
|
||||||
<spring:message code="traffic_website_list"/> <%-- <a href="${ctx}/dashboard/traffic/webTypeList"><i class="fa fa-line-chart"></i></a> --%>
|
<spring:message code="traffic_website_list"/> <a href="${ctx}/dashboard/traffic/webTypeList"><i class="fa fa-line-chart"></i></a>
|
||||||
<a href="javascipt:void(0)" onclick="websiteList();return false;"><i class="fa fa-refresh"></i></a>
|
<a href="javascipt:void(0)" onclick="websiteList();return false;"><i class="fa fa-refresh"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_table_web">
|
<div class="main_table_web">
|
||||||
@@ -587,14 +573,11 @@ function protocolList(){
|
|||||||
}
|
}
|
||||||
//活跃IP统计
|
//活跃IP统计
|
||||||
function ipActiveList(){
|
function ipActiveList(){
|
||||||
var begin=$("#ipBeginDate").val();
|
|
||||||
var end=$("#ipEndDate").val();
|
|
||||||
loading();
|
loading();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '${ctx}/dashboard/ipActive',
|
url: '${ctx}/dashboard/ipActive',
|
||||||
type : "get" ,
|
type : "get" ,
|
||||||
dataType:"json",
|
dataType:"json",
|
||||||
data:{"beginDate":begin,"endDate":end},
|
|
||||||
cache:false,
|
cache:false,
|
||||||
async:true,
|
async:true,
|
||||||
timeout:60000,//超时时间设置,查询接口时间过长超时
|
timeout:60000,//超时时间设置,查询接口时间过长超时
|
||||||
|
|||||||
130
src/main/webapp/WEB-INF/views/dashboard/trafficDomainTrans.jsp
Normal file
130
src/main/webapp/WEB-INF/views/dashboard/trafficDomainTrans.jsp
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||||
|
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>
|
||||||
|
<spring:message code="traffic_ip_active"></spring:message>
|
||||||
|
</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body >
|
||||||
|
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="theme-panel hidden-xs hidden-sm">
|
||||||
|
<%-- <button type="button" class="btn btn-default" onClick="javascript:window.location='${ctx}/dashboard/ipActiveList'"><i class="fa fa-refresh"></i></button> --%>
|
||||||
|
<%-- <button type="button" class="btn btn-default" onClick="javascript:window.location='${ctx}/dashboard/logChart'"><i class="fa fa-history"></i></button> --%>
|
||||||
|
</div>
|
||||||
|
<%-- <h3 class="page-title">
|
||||||
|
<spring:message code="domain_name"></spring:message>
|
||||||
|
</h3> --%>
|
||||||
|
<div class="row" >
|
||||||
|
<form:form id="searchForm" action="${ctx}/dashboard/traffic/ajaxDomainTrans" method="get" class="form-search">
|
||||||
|
<input id="beginDate" type="hidden" value="${beginDate}"/>
|
||||||
|
<input id="endDate" type="hidden" value="${endDate}"/>
|
||||||
|
<input id="domain" type="hidden" value="${domain}"/>
|
||||||
|
<input id="entranceId" type="hidden" value="${entranceId}"/>
|
||||||
|
<input id="domainName" type="hidden" value="${domainName}"/>
|
||||||
|
<!-- 搜索内容与操作按钮栏 -->
|
||||||
|
|
||||||
|
<!-- 搜索内容与操作按钮栏 -->
|
||||||
|
</form:form>
|
||||||
|
</div>
|
||||||
|
<div id="chart" style="width:95%;height:500px;"></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/exporting.js"></script>
|
||||||
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
||||||
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||||
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function(){
|
||||||
|
domainTrans();
|
||||||
|
});
|
||||||
|
//活跃IP一小时间隔五分钟统计
|
||||||
|
function domainTrans(){
|
||||||
|
var beginDate=$("#beginDate").val();
|
||||||
|
var endDate=$("#endDate").val();
|
||||||
|
var entranceId=$("#entranceId").val();
|
||||||
|
var domain=$("#domain").val();
|
||||||
|
loading();
|
||||||
|
$.ajax({
|
||||||
|
url: '${ctx}/dashboard/traffic/ajaxDomainTrans',
|
||||||
|
type : "get" ,
|
||||||
|
dataType:"json",
|
||||||
|
data:{"beginDate":beginDate,"endDate":endDate,"entranceId":entranceId,"domain":domain},
|
||||||
|
cache:false,
|
||||||
|
async:false,
|
||||||
|
timeout:40000,
|
||||||
|
success:function (rs) {
|
||||||
|
$("#tbodyData").html("");
|
||||||
|
if(rs!=null&&rs.length>0){
|
||||||
|
showDomainTrans(rs);
|
||||||
|
}
|
||||||
|
closeTip();
|
||||||
|
},
|
||||||
|
error: function(data, textStatus, errorThrown){
|
||||||
|
closeTip();
|
||||||
|
// warning_prompt("获取实时列表数据失败!",1500);
|
||||||
|
},
|
||||||
|
complete:function(XMLHttpRequest,status){//超时设置
|
||||||
|
closeTip();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
function showDomainTrans(rs){
|
||||||
|
var domainName= $("#domainName").val();
|
||||||
|
var data=new Array();
|
||||||
|
var xData=new Array();
|
||||||
|
xData=rs[0].statTime;
|
||||||
|
var series=new Array();
|
||||||
|
console.log(rs[0].statTime)
|
||||||
|
console.log(rs[0].count)
|
||||||
|
// $(rs).each(function(i, d) {
|
||||||
|
series.push({
|
||||||
|
name: ' ',
|
||||||
|
data: rs[0].count
|
||||||
|
});
|
||||||
|
// })
|
||||||
|
var chart = Highcharts.chart('chart', {
|
||||||
|
chart:{
|
||||||
|
// type: 'area',
|
||||||
|
zoomType: 'x'
|
||||||
|
},
|
||||||
|
exporting: {
|
||||||
|
filename:'Domain',
|
||||||
|
scale:1,
|
||||||
|
sourceWidth: 1280,
|
||||||
|
sourceHeight: 500,
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
text: domainName
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type:'category',
|
||||||
|
categories: xData,
|
||||||
|
title: {
|
||||||
|
text: 'time',
|
||||||
|
align:'high',
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
title: {
|
||||||
|
text: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
credits:{//是否有highcharts水印
|
||||||
|
enabled:false
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
enabled:false
|
||||||
|
},
|
||||||
|
series: series,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -3,27 +3,14 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>网站主题服务分类</title>
|
<title>网站主题服务分类</title>
|
||||||
<link rel="stylesheet"
|
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/pages/css/dashboard.css">
|
||||||
href="${pageContext.request.contextPath}/static/pages/css/dashboard.css">
|
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/pages/css/pagination.css">
|
||||||
<link rel="stylesheet"
|
|
||||||
href="${pageContext.request.contextPath}/static/pages/css/pagination.css">
|
<script src="${pageContext.request.contextPath}/static/pages/scripts/jquery.pagination.js"></script>
|
||||||
|
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/xlsx.core.js"></script>
|
||||||
|
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/FileSaver.js"></script>
|
||||||
|
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/tableexport.js"></script>
|
||||||
|
|
||||||
<script
|
|
||||||
src="${pageContext.request.contextPath}/static/pages/scripts/jquery.pagination.js"></script>
|
|
||||||
<script
|
|
||||||
src="${ctxStatic }/global/plugins/tableExport-3.3.13/xlsx.core.js"></script>
|
|
||||||
<script
|
|
||||||
src="${ctxStatic }/global/plugins/tableExport-3.3.13/FileSaver.js"></script>
|
|
||||||
<script
|
|
||||||
src="${ctxStatic }/global/plugins/tableExport-3.3.13/tableexport.js"></script>
|
|
||||||
<script
|
|
||||||
src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
|
||||||
<script
|
|
||||||
src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
|
||||||
<script
|
|
||||||
src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
|
||||||
<script
|
|
||||||
src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@@ -33,18 +20,19 @@
|
|||||||
<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"
|
<button type="button" class="btn btn-default"
|
||||||
onClick="javascript:window.location='${ctx}/dashboard/webTypeList'">
|
onClick="javascript:window.location='${ctx}/dashboard/traffic/webTypeList'">
|
||||||
<spring:message code="refresh" />
|
<i class="fa fa-refresh"></i>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-default"
|
<button type="button" class="btn btn-default"
|
||||||
onClick="javascript:window.location='${ctx}/dashboard/logChart'">
|
onClick="javascript:window.location='${ctx}/dashboard/logChart'">
|
||||||
<spring:message code="back" />
|
<i class="fa fa-history"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="page-title">
|
<h3 class="page-title">
|
||||||
<spring:message code="traffic_website_type_chart"></spring:message>
|
<spring:message code="domain_name"></spring:message>
|
||||||
</h3>
|
</h3>
|
||||||
<h5 class="page-header"></h5>
|
<h5 class="page-header"></h5>
|
||||||
|
<div class="row">
|
||||||
<form:form id="searchForm"
|
<form:form id="searchForm"
|
||||||
action="${ctx}/dashboard/traffic/websiteList" method="get"
|
action="${ctx}/dashboard/traffic/websiteList" method="get"
|
||||||
class="form-search">
|
class="form-search">
|
||||||
@@ -59,9 +47,9 @@
|
|||||||
code="begin_date" /></span>
|
code="begin_date" /></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="beginDate" name="beginDate" type="text"
|
<input id="beginDate" name="beginDate" type="text"
|
||||||
readonly="readonly" class="form-control Wdate input-medium"
|
readonly="readonly" class="form-control" style="width:200px"
|
||||||
value=""
|
value=""
|
||||||
onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'${beginDate}'});" />
|
onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -71,11 +59,37 @@
|
|||||||
code="end_date" /></span>
|
code="end_date" /></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="endDate" name="endDate" type="text" readonly="readonly"
|
<input id="endDate" name="endDate" type="text" readonly="readonly"
|
||||||
class="form-control Wdate input-medium" value=""
|
class="form-control" value="" style="width:200px"
|
||||||
onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'${endDate}'});" />
|
onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'${endDate}'});"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="pull-left">
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-btn">
|
||||||
|
<span class="selectpicker form-control" ><spring:message code="domain_name"/></span>
|
||||||
|
</div>
|
||||||
|
<select id="domain" name="domain" class="selectpicker form-control" width="100px" data-live-search="true" data-live-search-placeholder="search">
|
||||||
|
<option value=""><spring:message code="select"/></option>
|
||||||
|
<c:forEach items="${domainList}" var="dict" >
|
||||||
|
<option value="${dict.id}"><spring:message code="${dict.domain}"></spring:message></option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="pull-left">
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-btn">
|
||||||
|
<span class="selectpicker form-control" ><spring:message code="entrance_id"/></span>
|
||||||
|
</div>
|
||||||
|
<select id="entranceId" name="entranceId" class="selectpicker form-control" width="100px" data-live-search="true" data-live-search-placeholder="search">
|
||||||
|
<option value=""><spring:message code="select"/></option>
|
||||||
|
<c:forEach items="${fns:getDictList('AREA_NAME')}" var="dict" >
|
||||||
|
<option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"></spring:message></option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<button type="button" class="btn blue"
|
<button type="button" class="btn blue"
|
||||||
onClick="return searchList()">
|
onClick="return searchList()">
|
||||||
@@ -88,24 +102,20 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right">
|
|
||||||
<button type="button" class="btn btn-default" id="export-btn" >
|
|
||||||
<i class="fa fa-download"> <spring:message code="export" /></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 搜索内容与操作按钮栏 -->
|
<!-- 搜索内容与操作按钮栏 -->
|
||||||
</form:form>
|
</form:form>
|
||||||
|
</div>
|
||||||
|
<div class="row" >
|
||||||
|
<div id="chart" style="width:98%;height: 510px; -moz-user-select: none; position: relative;"></div>
|
||||||
|
</div>
|
||||||
<%-- <ul class="nav nav-tabs">
|
<%-- <ul class="nav nav-tabs">
|
||||||
<li class="active"><a href="#">网站</a></li>
|
<li class="active"><a href="#">网站</a></li>
|
||||||
<li><a href="${ctx}/dashboard/ipActiveList">主题</a></li>
|
<li><a href="${ctx}/dashboard/ipActiveList">主题</a></li>
|
||||||
<li><a href="${ctx}/dashboard/ipActiveList">服务</a></li>
|
<li><a href="${ctx}/dashboard/ipActiveList">服务</a></li>
|
||||||
</ul> --%>
|
</ul> --%>
|
||||||
<%--
|
|
||||||
<embed width="700px" height="500px" src="${pageContext.request.contextPath}/static/global/plugins/highcharts/svg.svg"></embed>
|
|
||||||
--%>
|
|
||||||
<!-- -->
|
|
||||||
<!-- <div id="chart" style="width:100%;height:400px;"></div> -->
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
@@ -155,19 +165,26 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<sys:message content="${message}" type="${messageType }" />
|
<sys:message content="${message}" type="${messageType }" />
|
||||||
|
<div class="row">
|
||||||
|
<div class="pull-right">
|
||||||
|
<button type="button" class="btn btn-default" id="export-btn" >
|
||||||
|
<i class="fa fa-download"> <spring:message code="export" /></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id="contentTable" style="width: 100%;"
|
<table id="contentTable" style="width: 100%;"
|
||||||
class="table table-hover table-striped table-bordered table-condensed text-nowrap">
|
class="table table-hover table-striped table-bordered table-condensed text-nowrap">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><spring:message code="Domain" /></th>
|
<th><spring:message code="domain_name"/></th>
|
||||||
<th><spring:message code="Link Times" /></th>
|
<th><spring:message code="unique_num"/></th>
|
||||||
<th><spring:message code="Percentage(Link Times)" /></th>
|
<th><spring:message code="entrance_id"/></th>
|
||||||
<th><spring:message code="Packets" /></th>
|
<th><spring:message code="packets"/></th>
|
||||||
<th><spring:message code="Percentage(Packets)" /></th>
|
<th><spring:message code="percentage"/> (<spring:message code="packets"/>)</th>
|
||||||
<th><spring:message code="Gbyte"/></th>
|
<th><spring:message code="Gbyte"/></th>
|
||||||
<th><spring:message code="Percentage(Gbyte)" /></th>
|
<th><spring:message code="percentage"/> (<spring:message code="Gbyte"/>)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="tableData"></tbody>
|
<tbody id="tableData"></tbody>
|
||||||
@@ -181,93 +198,32 @@
|
|||||||
<spring:message code="noneData" />
|
<spring:message code="noneData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%-- <div class="right-table" style="width: 30%;float: right;" >
|
|
||||||
<h3>
|
|
||||||
<span class="title-num"> 1 </span>
|
|
||||||
<label>分类流量统计</label>
|
|
||||||
</h3>
|
|
||||||
<table id="contentTable2" class="table table-striped table-bordered table-condensed text-nowrap">
|
|
||||||
<tbody>
|
|
||||||
<tr><td><spring:message code="新闻"/></td><td>12131</td></tr>
|
|
||||||
<tr><td><spring:message code="军事"/></td><td>241241</td></tr>
|
|
||||||
<tr><td><spring:message code="娱乐"/></td><td>31412</td></tr>
|
|
||||||
<tr><td><spring:message code="游戏"/></td><td>34655</td></tr>
|
|
||||||
<tr><td><spring:message code="科技"/></td><td>37457</td></tr>
|
|
||||||
<tr><td><spring:message code="。。"/></td><td>33457</td></tr>
|
|
||||||
<tr><td><spring:message code="。。"/></td><td>38468</td></tr>
|
|
||||||
<tr><td><spring:message code="。。"/></td><td>3367</td></tr>
|
|
||||||
<tr><td><spring:message code="。。"/></td><td>33456</td></tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div id="page"><div class="M-box" style="float: right"></div></div>
|
|
||||||
<div class="none-data"><i class="fa fa-warning font-red-flamingo"></i> <spring:message code="noneData"/></div>
|
|
||||||
</div> --%>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script
|
</div>
|
||||||
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/js/exporting.js"></script>
|
||||||
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
||||||
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
/* $(document).ready(function(){
|
$(document).ready(function(){
|
||||||
var chart = Highcharts.chart('chart', {
|
|
||||||
title: {
|
|
||||||
text: '网站分类'
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
title: {
|
|
||||||
text: 'bps'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
layout: 'vertical',
|
|
||||||
align: 'right',
|
|
||||||
verticalAlign: 'middle'
|
|
||||||
},
|
|
||||||
xAxis:{
|
|
||||||
type:'datetime',
|
|
||||||
dateTimeLabelFormats:{
|
|
||||||
day:'%Y-%m-%d %h'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
plotOptions: {
|
|
||||||
series: {
|
|
||||||
pointStart: Date.UTC(2018, 8, 16,1),
|
|
||||||
pointInterval: 3600*1000,
|
|
||||||
// pointIntervalUnit:'day'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
series: [{
|
|
||||||
name: 'Installation',
|
|
||||||
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
|
|
||||||
}],
|
|
||||||
|
|
||||||
responsive: {
|
|
||||||
rules: [{
|
|
||||||
condition: {
|
|
||||||
maxWidth: 500
|
|
||||||
},
|
|
||||||
chartOptions: {
|
|
||||||
legend: {
|
|
||||||
layout: 'horizontal',
|
|
||||||
align: 'center',
|
|
||||||
verticalAlign: 'bottom'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}); */
|
|
||||||
|
|
||||||
$(document).ready(
|
|
||||||
function() {
|
|
||||||
var starth = $("#beginDateh").val();
|
var starth = $("#beginDateh").val();
|
||||||
var endh = $("#endDateh").val();
|
var endh = $("#endDateh").val();
|
||||||
$("#beginDate").val(starth);
|
$("#beginDate").val(starth);
|
||||||
$("#endDate").val(endh);
|
$("#endDate").val(endh);
|
||||||
|
|
||||||
|
//筛选功能初始化
|
||||||
|
$("#resetBtn").on("click",function(){
|
||||||
|
$("select.selectpicker").each(function(){
|
||||||
|
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||||
|
$(this).find("option").attr("selected",false);
|
||||||
|
$(this).find("option:first").attr("selected",true);
|
||||||
|
});
|
||||||
|
$(".Wdate").attr("value",'');
|
||||||
|
$("#searchForm")[0].reset();
|
||||||
|
});
|
||||||
ajaxWebTypeList(starth, endh);
|
ajaxWebTypeList(starth, endh);
|
||||||
|
|
||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
@@ -286,18 +242,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function ajaxWebTypeList(start, end) {
|
function ajaxWebTypeList(start, end) {
|
||||||
|
var domain = $("#domain").val();
|
||||||
|
var entranceId = $("#entranceId").val();
|
||||||
loading();
|
loading();
|
||||||
$
|
$.ajax({
|
||||||
.ajax({
|
|
||||||
url : '${ctx}/dashboard/traffic/websiteList',
|
url : '${ctx}/dashboard/traffic/websiteList',
|
||||||
type : 'get',
|
type : 'get',
|
||||||
dataType : "json",
|
dataType : "json",
|
||||||
data : {
|
data : {
|
||||||
"beginDate" : start,
|
"beginDate" : start,
|
||||||
"endDate" : end
|
"endDate" : end,
|
||||||
|
"domain" : domain,
|
||||||
|
"entranceId" : entranceId
|
||||||
},
|
},
|
||||||
async : false,
|
async : false,
|
||||||
timeout : 10000,
|
timeout : 40000,
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
if (data != null && data.length > 0
|
if (data != null && data.length > 0
|
||||||
&& data[0].error != null) {
|
&& data[0].error != null) {
|
||||||
@@ -307,7 +266,7 @@
|
|||||||
"<spring:message code='info'/>");
|
"<spring:message code='info'/>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(JSON.stringify(data));
|
webTypeChart(data)
|
||||||
fileData = data;
|
fileData = data;
|
||||||
getPageData(1, 10);//初始化第一页的数据
|
getPageData(1, 10);//初始化第一页的数据
|
||||||
pageJuan(10);//初始化分页
|
pageJuan(10);//初始化分页
|
||||||
@@ -335,7 +294,7 @@
|
|||||||
headings : true,
|
headings : true,
|
||||||
footers : true,
|
footers : true,
|
||||||
formats : [ "xlsx" ],
|
formats : [ "xlsx" ],
|
||||||
fileName : "website",
|
fileName : "Domain",
|
||||||
bootstrap : false
|
bootstrap : false
|
||||||
});
|
});
|
||||||
$("#myexport").click();
|
$("#myexport").click();
|
||||||
@@ -379,12 +338,11 @@
|
|||||||
$.each(fileDataS, function(index, data) {
|
$.each(fileDataS, function(index, data) {
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
|
|
||||||
var html = "<tr>";
|
var html = '<tr onclick="searchByDomain(\''+data.webId+'\',\''+data.website+'\')">';
|
||||||
html += "<td class='tc'>"
|
html += "<td class='tc'>" + data.website + "</td>";
|
||||||
+ data.website + "</td>";
|
html += "<td class='tc'>" + data.uniqueNum + "</td>";
|
||||||
html += "<td class='tc'>" + data.linkNum + "</td>";
|
html += "<td class='tc'>" + data.entranceId + "</td>";
|
||||||
html += "<td class='tc'>" + data.perLink + "</td>";
|
html += "<td class='tc'>" + data.pktCount + "</td>";
|
||||||
html += "<td class='tc'>" + data.packets + "</td>";
|
|
||||||
html += "<td class='tc'>" + data.perPackets + "</td>";
|
html += "<td class='tc'>" + data.perPackets + "</td>";
|
||||||
html += "<td class='tc'>" + data.Gbyte + "</td>";
|
html += "<td class='tc'>" + data.Gbyte + "</td>";
|
||||||
html += "<td class='tc'>" + data.perGbyte + "</td>";
|
html += "<td class='tc'>" + data.perGbyte + "</td>";
|
||||||
@@ -395,35 +353,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function chartData(websiteId) {
|
function searchByDomain(domain,domainName){
|
||||||
loading();
|
var beginDate = $("#beginDate").val();
|
||||||
$
|
var endDate = $("#endDate").val();
|
||||||
.ajax({
|
var entranceId = $("#entranceId").val();
|
||||||
url : '${ctx}/dashboard/traffic/websiteChart',
|
var url= "${ctx}/dashboard/traffic/domainTrans?beginDate="+beginDate+"&endDate="+endDate+"&domain="+domain+"&domainName="+domainName+"&entranceId="+entranceId;
|
||||||
type : 'get',
|
openPicWindow(url);
|
||||||
dataType : "json",
|
|
||||||
data : {
|
|
||||||
"websiteId" : websiteId
|
|
||||||
},
|
|
||||||
async : false,
|
|
||||||
timeout : 10000,
|
|
||||||
success : function(data) {
|
|
||||||
if (data != null && data.length > 0
|
|
||||||
&& data[0].error != null) {
|
|
||||||
top.$.jBox
|
|
||||||
.tip(
|
|
||||||
"<spring:message code='request_service_failed'/>",
|
|
||||||
"<spring:message code='info'/>");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
webTypeChart(data);
|
|
||||||
},
|
|
||||||
error : function(data, textStatus, errorThrown) {
|
|
||||||
closeTip();
|
|
||||||
},
|
|
||||||
complete : function(XMLHttpRequest, status) {//超时设置
|
|
||||||
closeTip();
|
|
||||||
}
|
}
|
||||||
|
function openPicWindow(url){
|
||||||
|
$.jBox("iframe:"+url, {
|
||||||
|
title: "",
|
||||||
|
top: '1%',
|
||||||
|
draggable:false,
|
||||||
|
width: $(document).width()*0.9,
|
||||||
|
height:$(document).height()*0.9,
|
||||||
|
buttons: { 'close': true }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -447,14 +391,15 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 比例协议统计图
|
// 比例域名统计图
|
||||||
/* function webTypeChart(rs){
|
|
||||||
|
function webTypeChart(rs){
|
||||||
//终端用户 分操作系统与浏览器
|
//终端用户 分操作系统与浏览器
|
||||||
var data=new Array();
|
var data=new Array();
|
||||||
$(rs).each(function(i, d) {
|
$(rs).each(function(i, d) {
|
||||||
data.push({
|
data.push({
|
||||||
name: d.website,
|
name: d.website,
|
||||||
y: d.count,
|
y: parseFloat(d.Gbyte),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// 创建图例
|
// 创建图例
|
||||||
@@ -472,7 +417,7 @@
|
|||||||
},
|
},
|
||||||
exporting: {
|
exporting: {
|
||||||
allowHTML:true,
|
allowHTML:true,
|
||||||
filename:"Website",
|
filename:"Domain",
|
||||||
scale:1,
|
scale:1,
|
||||||
sourceWidth: 1280,
|
sourceWidth: 1280,
|
||||||
sourceHeight: 500,
|
sourceHeight: 500,
|
||||||
@@ -548,12 +493,12 @@
|
|||||||
pointFormat: '{point.name}: <b>{point.percentage:.2f}%</b>'
|
pointFormat: '{point.name}: <b>{point.percentage:.2f}%</b>'
|
||||||
},
|
},
|
||||||
series: [{
|
series: [{
|
||||||
name: "Website",
|
name: "Domain",
|
||||||
colorByPoint: true,
|
colorByPoint: true,
|
||||||
data: data
|
data: data
|
||||||
}],
|
}],
|
||||||
});
|
});
|
||||||
} */
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
// drilldown: d.protoType,
|
// drilldown: d.protoType,
|
||||||
});
|
});
|
||||||
|
|
||||||
pktNum[0]="pktNum";
|
/*pktNum[0]="pktNum";
|
||||||
pktNum[1]=parseInt(d.pktNum);
|
pktNum[1]=parseInt(d.pktNum);
|
||||||
byteLen[0]="byteLen";
|
byteLen[0]="byteLen";
|
||||||
byteLen[1]=parseInt(d.byteLen);
|
byteLen[1]=parseInt(d.byteLen);
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
type:'pie',
|
type:'pie',
|
||||||
innerSize: '70%',
|
innerSize: '70%',
|
||||||
data: [pktNum,byteLen],
|
data: [pktNum,byteLen],
|
||||||
});
|
});*/
|
||||||
|
|
||||||
});
|
});
|
||||||
var chart = Highcharts.chart('chart_1', {
|
var chart = Highcharts.chart('chart_1', {
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
mouseOver: function(e) { // 鼠标滑过时动态更新标题
|
mouseOver: function(e) { // 鼠标滑过时动态更新标题
|
||||||
// 标题更新函数,API 地址:https://api.hcharts.cn/highcharts#Chart.setTitle
|
// 标题更新函数,API 地址:https://api.hcharts.cn/highcharts#Chart.setTitle
|
||||||
chart.setTitle({
|
chart.setTitle({
|
||||||
text:e.target.name.length>10? this.percentage.toFixed(2)+"%<br><span>"+e.target.name.substring(0,10)+"...</span>":this.percentage.toFixed(2)+"%<br><span>"+e.target.name.substring(0,10)+"</span>",
|
text:e.target.name.length>10? this.percentage.toFixed(2)+"%<br><span>"+(e.target.name+"").substring(0,10)+"...</span>":this.percentage.toFixed(2)+"%<br><span>"+e.target.name+"</span>",
|
||||||
floating:true,
|
floating:true,
|
||||||
y:120,
|
y:120,
|
||||||
style: {//设置字体颜色
|
style: {//设置字体颜色
|
||||||
@@ -416,8 +416,8 @@
|
|||||||
var inoctetsNum=d.count;
|
var inoctetsNum=d.count;
|
||||||
unit=changeUnit(inoctetsNum);
|
unit=changeUnit(inoctetsNum);
|
||||||
inoctetsNum=changeNum(inoctetsNum);
|
inoctetsNum=changeNum(inoctetsNum);
|
||||||
var pktNum=new Array();
|
// var pktNum=new Array();
|
||||||
var byteLen=new Array();
|
// var byteLen=new Array();
|
||||||
xData.push(d.appType);
|
xData.push(d.appType);
|
||||||
data.push({
|
data.push({
|
||||||
name: d.appType,
|
name: d.appType,
|
||||||
@@ -1157,7 +1157,7 @@ function echart_topic_domain(rs){
|
|||||||
});
|
});
|
||||||
/****主题中的子域名*******/
|
/****主题中的子域名*******/
|
||||||
$(d.domainData).each(function(j,t){
|
$(d.domainData).each(function(j,t){
|
||||||
var domainNum=t.count;
|
var domainNum=t.byteCount;
|
||||||
unit=changeUnit(domainNum);
|
unit=changeUnit(domainNum);
|
||||||
domainNum=changeNum(domainNum);
|
domainNum=changeNum(domainNum);
|
||||||
data.push({
|
data.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user