活跃详情IP增加排序,界面图表园姐增加蓝色风格颜色
This commit is contained in:
@@ -6,6 +6,8 @@ import java.net.URLEncoder;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -94,6 +96,22 @@ public class DashboardController extends BaseController{
|
||||
}
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* 跳转活跃端口详情界面
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="portActiveList")
|
||||
public String portActiveList(Model model){
|
||||
// 默认当前时间一小时
|
||||
Calendar cal = Calendar. getInstance ();
|
||||
cal.setTime(new Date());
|
||||
String endDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间
|
||||
cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 1);
|
||||
String beginDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());
|
||||
model.addAttribute("beginDate", beginDate);
|
||||
model.addAttribute("endDate", endDate);
|
||||
return "/dashboard/trafficPortActiveList";
|
||||
}
|
||||
/**
|
||||
* 活跃IP TOP10
|
||||
*/
|
||||
@@ -194,7 +212,7 @@ public class DashboardController extends BaseController{
|
||||
return "/dashboard/trafficIpActiveList";
|
||||
}
|
||||
/**
|
||||
* 活跃IP TOP10 一小时 间隔5分钟数据
|
||||
* 活跃IP TOP10 一小时每个IP的最大值
|
||||
*/
|
||||
@RequestMapping(value="ajaxIpActiveList")
|
||||
@ResponseBody
|
||||
@@ -209,6 +227,24 @@ public class DashboardController extends BaseController{
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map<String, Object>>(){}.getType());
|
||||
logger.debug("活跃IP1小时"+fromJsonList);
|
||||
list = gson.fromJson(fromJsonList.get("data").toString(), new TypeToken<List<TrafficIpActiveStatistic>>() {}.getType()) ;
|
||||
Collections.sort(list, new Comparator<TrafficIpActiveStatistic>() {
|
||||
|
||||
@Override
|
||||
public int compare(TrafficIpActiveStatistic o1, TrafficIpActiveStatistic o2) {
|
||||
if(o1==null&&o2!=null){
|
||||
return 1;
|
||||
}
|
||||
if(o1!=null&&o2==null){
|
||||
return -1;
|
||||
}
|
||||
if(o1==o2&&o1==null){
|
||||
return 0;
|
||||
}
|
||||
Long ob1 = o1.getC2sByteLen()+o1.getS2cByteLen();
|
||||
Long ob2 = o2.getC2sByteLen()+o2.getS2cByteLen();
|
||||
return -(ob1).compareTo(ob2);
|
||||
}
|
||||
});
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -1199,23 +1199,19 @@ function echart_topic_domain(rs){
|
||||
var domainNum=t.byteCount;
|
||||
unit=changeUnit(domainNum);
|
||||
domainNum=changeNum(domainNum);
|
||||
data.push({
|
||||
'id': '2.'+t.webId,
|
||||
'parent': '1.'+d.topicId,
|
||||
'name': t.domain,
|
||||
'value':parseFloat(domainNum)
|
||||
});
|
||||
if(domainNum>0){
|
||||
data.push({
|
||||
'id': '2.'+t.webId,
|
||||
'parent': '1.'+d.topicId,
|
||||
'name': t.domain,
|
||||
'value':parseFloat(domainNum)
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Splice in transparent for the center circle
|
||||
Highcharts.getOptions().colors.splice(0, 0, 'transparent');
|
||||
|
||||
|
||||
var chart = Highcharts.chart('chart_topic', {
|
||||
|
||||
chart: {
|
||||
backgroundColor: 'rgba(255, 255, 255, 0)',
|
||||
plotBackgroundColor:null,
|
||||
@@ -1246,7 +1242,11 @@ function echart_topic_domain(rs){
|
||||
buttons: exportingButton('#6e6379')
|
||||
},
|
||||
//colors:[ '#44A9A8', '#f36f8a','#25f3e6','#ffff43','#964CEC','#32B0ED','#2b6ed7','#7278DD','#2DA9D8','#C66FE6','#0099cc','#cc0033','#ff6633','#99cccc','#d9f9d0'],
|
||||
colors:['#003078','#004bbc', '#015bb1', '#2f74b5', '#4186c1', '#0058e1','#066aff', '#5597cd', '#5c9dff', '#67a7de', '#77b5dc', '#98cde7','#89b9ff','#78adff'],
|
||||
// colors:['#003078','#004bbc', '#015bb1', '#2f74b5', '#4186c1', '#0058e1','#066aff', '#5597cd', '#5c9dff', '#67a7de', '#77b5dc', '#98cde7','#89b9ff','#78adff'],
|
||||
// colors:['#008ef9','#0594ff', '#002540', '#004679', '#025ba1', '#026fc0','#0279d5'],
|
||||
// colors:['#002540','#004679','#025ba1', '#026fc0', '#0279d5', '#0086e9', '#008ef9','#0594ff', '#25a2ff', '#63bbff', '#88cbff'],
|
||||
colors:[ '#1C4573','#275A9C', '#306EB9', '#3579CE', '#3C85E1', '#3E8EF1','#4294F7', '#4294F7', '#98CBFA'],
|
||||
// colors:colors,
|
||||
noData:{
|
||||
style: {//设置字体颜色
|
||||
color: '#fff',
|
||||
@@ -1293,13 +1293,13 @@ function echart_topic_domain(rs){
|
||||
colorByPoint: true,
|
||||
dataLabels: {
|
||||
rotationMode: 'parallel'
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
level: 3,
|
||||
colorVariation: {
|
||||
key: 'brightness',
|
||||
to: -0.5
|
||||
to: 0.5
|
||||
}
|
||||
}, {
|
||||
level: 4,
|
||||
|
||||
1376
src/main/webapp/static/pages/scripts/echart.js.blue
Normal file
1376
src/main/webapp/static/pages/scripts/echart.js.blue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user