1.日志检索->协议->邮箱 增加 动作 查询条件,选"动作"时传入监测和阻断对应的Service
2.实时报表->流量统计和协议统计 增加 方向 查询条件,out为0 in为1
(cherry picked from commit 3612bf09d9)
This commit is contained in:
@@ -262,7 +262,7 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value="bandwidthTransThree")
|
||||
@ResponseBody
|
||||
public Map bandwidthTransThree(String beginDate,String endDate,String searchQuotaType){
|
||||
public Map bandwidthTransThree(String beginDate,String endDate,String searchQuotaType,String searchDirection,Model model){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
Map map = new HashMap();
|
||||
//String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_TWO;
|
||||
@@ -271,11 +271,13 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
try {
|
||||
url=urlAddDate(url,beginDate,endDate);
|
||||
url=url+"&searchQuotaType="+searchQuotaType;
|
||||
url=url+"&searchDirection="+searchDirection;
|
||||
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");
|
||||
model.addAttribute("searchDirection", searchDirection);
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -302,7 +304,7 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value="protocolList")
|
||||
@ResponseBody
|
||||
public List protocolList(Model model,Integer entranceId,Integer[] protoType,@RequestParam(required=false)String beginDate,@RequestParam(required=false)String endDate){
|
||||
public List protocolList(Model model,Integer entranceId,Integer[] protoType,@RequestParam(required=false)String beginDate,@RequestParam(required=false)String endDate,@RequestParam(required=false)String searchDirection){
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
@@ -319,6 +321,7 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
if(entranceId!=null){
|
||||
url=url+"&entranceId="+entranceId;
|
||||
}
|
||||
url=url+"&searchDirection="+searchDirection;
|
||||
String string = HttpClientUtil.get(url);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||
@@ -363,7 +366,7 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
m.put("totalGByte", totalGByte);
|
||||
}
|
||||
}
|
||||
|
||||
model.addAttribute("searchDirection", searchDirection);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("协议详情数据获取错误"+e);
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.nis.domain.log.NtcMailLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
@@ -46,6 +47,28 @@ public class MailLogController extends BaseController {
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
if (StringUtil.isEmpty(log.getService())) {
|
||||
String searchService = "";
|
||||
for (int i = 0; i < serviceList.size(); i++) {
|
||||
if (i != 0) {
|
||||
searchService += ",";
|
||||
|
||||
}
|
||||
searchService += (serviceList.get(i).getServiceId() == null ? ""
|
||||
: serviceList.get(i).getServiceId());
|
||||
// log.setAction(serviceList.get(i).getAction());
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(searchService)) {
|
||||
params.put("searchService", searchService);
|
||||
}
|
||||
} else {
|
||||
log.setAction(serviceList.get(0).getAction());
|
||||
}
|
||||
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
// 增加收/发件人、邮件主题查询
|
||||
@@ -59,9 +82,6 @@ public class MailLogController extends BaseController {
|
||||
params.put("searchSubject", StringEscapeUtils.unescapeHtml(log.getSubject()));
|
||||
}
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_MAIL_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
|
||||
@@ -108,6 +128,27 @@ public class MailLogController extends BaseController {
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
if (StringUtil.isEmpty(log.getService())) {
|
||||
String searchService = "";
|
||||
for (int i = 0; i < serviceList.size(); i++) {
|
||||
if (i != 0) {
|
||||
searchService += ",";
|
||||
|
||||
}
|
||||
searchService += (serviceList.get(i).getServiceId() == null ? ""
|
||||
: serviceList.get(i).getServiceId());
|
||||
// log.setAction(serviceList.get(i).getAction());
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(searchService)) {
|
||||
params.put("searchService", searchService);
|
||||
}
|
||||
} else {
|
||||
log.setAction(serviceList.get(0).getAction());
|
||||
}
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
// 增加收/发件人、邮件主题查询
|
||||
@@ -120,9 +161,7 @@ public class MailLogController extends BaseController {
|
||||
if (StringUtils.isNotBlank(log.getSubject())) {
|
||||
params.put("searchSubject", StringEscapeUtils.unescapeHtml(log.getSubject()));
|
||||
}
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_MAIL_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
@@ -151,7 +190,7 @@ public class MailLogController extends BaseController {
|
||||
String cfgIndexInfoNoExport = "," + hColumns;
|
||||
noExportMap.put("mail_control", cfgIndexInfoNoExport);
|
||||
dataMap.put("mail_control", list);
|
||||
String timeRange= initLogMap(log,"mail_control");
|
||||
String timeRange = initLogMap(log, "mail_control");
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
/* } */
|
||||
if ("csv".equals(type)) {
|
||||
|
||||
Reference in New Issue
Block a user