配置文件增加流量统计活跃IP近一小时的趋势接口路径

增加活跃IPtop10的近一小时最大数据接口路径
This commit is contained in:
zhanghongqing
2018-10-12 20:10:58 +08:00
parent c91086c2d1
commit 7c3d7c75c3
3 changed files with 111 additions and 110 deletions

View File

@@ -106,8 +106,7 @@ public class DashboardController extends BaseController{
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);
String string = HttpClientUtil.get(Constants.DASHBOARD_URL+Constants.TRAFFIC_IPACTIVE_FIVEMINUTE);
Gson gson = new GsonBuilder().create();
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
logger.info("活跃IP1小时,间隔5分钟数据"+fromJsonList);
@@ -154,10 +153,8 @@ public class DashboardController extends BaseController{
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);
String string = HttpClientUtil.get(Constants.DASHBOARD_URL+Constants.TRAFFIC_IPACTIVE_ONEHOUR);
Gson gson = getIntGson();
fromJsonList = gson.fromJson(string, new TypeToken<Map<String, Object>>(){}.getType());