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")
|
@RequestMapping(value="bandwidthTransThree")
|
||||||
@ResponseBody
|
@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<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||||
Map map = new HashMap();
|
Map map = new HashMap();
|
||||||
//String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_TWO;
|
//String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_TWO;
|
||||||
@@ -271,11 +271,13 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
try {
|
try {
|
||||||
url=urlAddDate(url,beginDate,endDate);
|
url=urlAddDate(url,beginDate,endDate);
|
||||||
url=url+"&searchQuotaType="+searchQuotaType;
|
url=url+"&searchQuotaType="+searchQuotaType;
|
||||||
|
url=url+"&searchDirection="+searchDirection;
|
||||||
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());
|
||||||
logger.debug("bandwidthTransThree服务查询数据成功");
|
logger.debug("bandwidthTransThree服务查询数据成功");
|
||||||
Map result = (Map)fromJsonList.get("data");
|
Map result = (Map)fromJsonList.get("data");
|
||||||
|
model.addAttribute("searchDirection", searchDirection);
|
||||||
return result;
|
return result;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -302,7 +304,7 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value="protocolList")
|
@RequestMapping(value="protocolList")
|
||||||
@ResponseBody
|
@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");
|
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
@@ -319,6 +321,7 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
if(entranceId!=null){
|
if(entranceId!=null){
|
||||||
url=url+"&entranceId="+entranceId;
|
url=url+"&entranceId="+entranceId;
|
||||||
}
|
}
|
||||||
|
url=url+"&searchDirection="+searchDirection;
|
||||||
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());
|
||||||
@@ -363,7 +366,7 @@ public class TrafficStatisticsInfoController extends BaseController {
|
|||||||
m.put("totalGByte", totalGByte);
|
m.put("totalGByte", totalGByte);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
model.addAttribute("searchDirection", searchDirection);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("协议详情数据获取错误"+e);
|
logger.error("协议详情数据获取错误"+e);
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import com.nis.domain.log.NtcMailLog;
|
|||||||
import com.nis.domain.maat.LogRecvData;
|
import com.nis.domain.maat.LogRecvData;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.DictUtils;
|
import com.nis.util.DictUtils;
|
||||||
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.util.httpclient.HttpClientUtil;
|
import com.nis.util.httpclient.HttpClientUtil;
|
||||||
import com.nis.web.controller.BaseController;
|
import com.nis.web.controller.BaseController;
|
||||||
import com.nis.web.security.UserUtils;
|
import com.nis.web.security.UserUtils;
|
||||||
@@ -46,6 +47,28 @@ public class MailLogController extends BaseController {
|
|||||||
Map<String, Object> params = new HashMap<String, Object>();
|
Map<String, Object> params = new HashMap<String, Object>();
|
||||||
params.put("pageSize", page.getPageSize());
|
params.put("pageSize", page.getPageSize());
|
||||||
params.put("pageNo", page.getPageNo());
|
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);
|
initLogSearchValue(log, params);
|
||||||
|
|
||||||
// 增加收/发件人、邮件主题查询
|
// 增加收/发件人、邮件主题查询
|
||||||
@@ -59,9 +82,6 @@ public class MailLogController extends BaseController {
|
|||||||
params.put("searchSubject", StringEscapeUtils.unescapeHtml(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 url = Constants.LOG_BASE_URL + Constants.NTC_MAIL_LOG;
|
||||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||||
|
|
||||||
@@ -108,6 +128,27 @@ public class MailLogController extends BaseController {
|
|||||||
Map<String, Object> params = new HashMap<String, Object>();
|
Map<String, Object> params = new HashMap<String, Object>();
|
||||||
params.put("pageSize", page.getPageSize());
|
params.put("pageSize", page.getPageSize());
|
||||||
params.put("pageNo", page.getPageNo());
|
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);
|
initLogSearchValue(log, params);
|
||||||
|
|
||||||
// 增加收/发件人、邮件主题查询
|
// 增加收/发件人、邮件主题查询
|
||||||
@@ -120,9 +161,7 @@ public class MailLogController extends BaseController {
|
|||||||
if (StringUtils.isNotBlank(log.getSubject())) {
|
if (StringUtils.isNotBlank(log.getSubject())) {
|
||||||
params.put("searchSubject", StringEscapeUtils.unescapeHtml(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 url = Constants.LOG_BASE_URL + Constants.NTC_MAIL_LOG;
|
||||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||||
@@ -151,7 +190,7 @@ public class MailLogController extends BaseController {
|
|||||||
String cfgIndexInfoNoExport = "," + hColumns;
|
String cfgIndexInfoNoExport = "," + hColumns;
|
||||||
noExportMap.put("mail_control", cfgIndexInfoNoExport);
|
noExportMap.put("mail_control", cfgIndexInfoNoExport);
|
||||||
dataMap.put("mail_control", list);
|
dataMap.put("mail_control", list);
|
||||||
String timeRange= initLogMap(log,"mail_control");
|
String timeRange = initLogMap(log, "mail_control");
|
||||||
noExportMap.put("timeRange", timeRange);
|
noExportMap.put("timeRange", timeRange);
|
||||||
/* } */
|
/* } */
|
||||||
if ("csv".equals(type)) {
|
if ("csv".equals(type)) {
|
||||||
|
|||||||
@@ -38,15 +38,36 @@
|
|||||||
value="" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setStartTime('#beginDate','#endDate',1,'d','yyyy-MM-dd hh:mm:ss',false)"/> </div>
|
value="" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setStartTime('#beginDate','#endDate',1,'d','yyyy-MM-dd hh:mm:ss',false)"/> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
<input name="endDate" id="endDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
<input name="endDate" id="endDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||||
value="" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setEndTime('#beginDate','#endDate',1,'d','yyyy-MM-dd hh:mm:ss',false)"/>
|
value="" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setEndTime('#beginDate','#endDate',1,'d','yyyy-MM-dd hh:mm:ss',false)"/>
|
||||||
</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="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">
|
<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 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>
|
<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){
|
function changeBandwidth(unitType,beginDate,endDate){
|
||||||
|
var searchDirection=$("#searchDirection").val();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"${ctx}/dashboard/traffic/bandwidthTransThree",
|
url:"${ctx}/dashboard/traffic/bandwidthTransThree",
|
||||||
type:"get",
|
type:"get",
|
||||||
data:{"beginDate":beginDate,"endDate":endDate,"searchQuotaType":unitType},
|
data:{"beginDate":beginDate,"endDate":endDate,"searchQuotaType":unitType,"searchDirection":searchDirection},
|
||||||
dataType:"json",
|
dataType:"json",
|
||||||
async:true,
|
async:true,
|
||||||
timeout:50000,
|
timeout:50000,
|
||||||
|
|||||||
@@ -71,10 +71,32 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
<div class="pull-left">
|
||||||
<button type="button" class="btn btn-default" id="resetBtn" > <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
<div class="input-group">
|
||||||
</div>
|
<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>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 搜索内容与操作按钮栏 -->
|
<!-- 搜索内容与操作按钮栏 -->
|
||||||
</form:form>
|
</form:form>
|
||||||
@@ -164,12 +186,13 @@ function searchList(){
|
|||||||
}
|
}
|
||||||
function ajaxProtocolList(start,end,entranceId){
|
function ajaxProtocolList(start,end,entranceId){
|
||||||
var protoType=$("#protoType").val();
|
var protoType=$("#protoType").val();
|
||||||
|
var searchDirection=$("#searchDirection").val();
|
||||||
loading();
|
loading();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '${ctx}/dashboard/traffic/protocolList',
|
url: '${ctx}/dashboard/traffic/protocolList',
|
||||||
type: 'get',
|
type: 'get',
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data:{"beginDate":start,"endDate":end,"protoType":protoType,"entranceId":entranceId},
|
data:{"beginDate":start,"endDate":end,"protoType":protoType,"entranceId":entranceId,"searchDirection":searchDirection},
|
||||||
async:true,
|
async:true,
|
||||||
timeout:50000,
|
timeout:50000,
|
||||||
traditional:true,
|
traditional:true,
|
||||||
|
|||||||
Reference in New Issue
Block a user