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);
|
||||
|
||||
// 增加收/发件人、邮件主题查询
|
||||
@@ -121,8 +162,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);
|
||||
|
||||
@@ -47,6 +47,27 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="direction"/></span>
|
||||
</div>
|
||||
<%-- <label class="control-label"><spring:message code="direction"/>:</label> --%>
|
||||
<select id="searchDirection" name="searchDirection" class="selectpicker select2 input-small">
|
||||
<c:forEach items="${fns:getDictList('LOG_DIRECTION')}" var="direction" >
|
||||
<c:choose>
|
||||
<c:when test="${direction.itemCode == searchDirection}">
|
||||
<option value="${direction.itemCode}" selected="true"><spring:message code="${direction.itemValue}"></spring:message></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="${direction.itemCode}"><spring:message code="${direction.itemValue}"></spring:message></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return searchList()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn" > <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
@@ -134,10 +155,11 @@ function searchList(){
|
||||
|
||||
// 根据单位切换数据
|
||||
function changeBandwidth(unitType,beginDate,endDate){
|
||||
var searchDirection=$("#searchDirection").val();
|
||||
$.ajax({
|
||||
url:"${ctx}/dashboard/traffic/bandwidthTransThree",
|
||||
type:"get",
|
||||
data:{"beginDate":beginDate,"endDate":endDate,"searchQuotaType":unitType},
|
||||
data:{"beginDate":beginDate,"endDate":endDate,"searchQuotaType":unitType,"searchDirection":searchDirection},
|
||||
dataType:"json",
|
||||
async:true,
|
||||
timeout:50000,
|
||||
|
||||
@@ -71,6 +71,28 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="direction"/></span>
|
||||
</div>
|
||||
<%-- <label class="control-label"><spring:message code="direction"/>:</label> --%>
|
||||
<select id="searchDirection" name="searchDirection" class="selectpicker select2 input-small">
|
||||
<c:forEach items="${fns:getDictList('LOG_DIRECTION')}" var="direction" >
|
||||
<c:choose>
|
||||
<c:when test="${direction.itemCode == searchDirection}">
|
||||
<option value="${direction.itemCode}" selected="true"><spring:message code="${direction.itemValue}"></spring:message></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="${direction.itemCode}"><spring:message code="${direction.itemValue}"></spring:message></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return searchList()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn" > <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
@@ -164,12 +186,13 @@ function searchList(){
|
||||
}
|
||||
function ajaxProtocolList(start,end,entranceId){
|
||||
var protoType=$("#protoType").val();
|
||||
var searchDirection=$("#searchDirection").val();
|
||||
loading();
|
||||
$.ajax({
|
||||
url: '${ctx}/dashboard/traffic/protocolList',
|
||||
type: 'get',
|
||||
dataType: "json",
|
||||
data:{"beginDate":start,"endDate":end,"protoType":protoType,"entranceId":entranceId},
|
||||
data:{"beginDate":start,"endDate":end,"protoType":protoType,"entranceId":entranceId,"searchDirection":searchDirection},
|
||||
async:true,
|
||||
timeout:50000,
|
||||
traditional:true,
|
||||
|
||||
Reference in New Issue
Block a user