通联关系增加右上角bps pps的占比
This commit is contained in:
@@ -768,4 +768,5 @@ public final class Constants {
|
||||
public static final String DNS_SPOOFING_IP_IP = Configurations.getStringProperty("dns_spoofing_ip_ip","");
|
||||
public static final String NTC_COLLECT_RADIUS_LOG =Configurations.getStringProperty("ntcCollectRadiusLog","");
|
||||
public static final String NTC_CONN_RECORD_LOG =Configurations.getStringProperty("ntcConnRecordLog","");
|
||||
public static final String NTC_CONN_RECORD_PERCENT =Configurations.getStringProperty("ntcConnRecordPercent","");
|
||||
}
|
||||
|
||||
@@ -1,20 +1,27 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.httpclient.HttpClient;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.jetty.util.ajax.JSON;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
@@ -23,14 +30,21 @@ import com.nis.domain.log.IrDnatLog;
|
||||
import com.nis.domain.log.IrSnatLog;
|
||||
import com.nis.domain.log.NtcCollectRadiusLog;
|
||||
import com.nis.domain.log.NtcConnRecordLog;
|
||||
import com.nis.domain.log.SearchReport;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.domain.report.NtcServiceReport;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.CodeDicUtils;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
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.dao.dashboard.codedic.CodeResult;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/log/ntc/connRecordLogs")
|
||||
public class NtcConnRecordLogController extends BaseController {
|
||||
@@ -76,4 +90,37 @@ public class NtcConnRecordLogController extends BaseController {
|
||||
return "/log/ntc/connRecordLogList";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/ajaxConnRecordPercent")
|
||||
@ResponseBody
|
||||
public JSONObject ajaxConnRecordPercent(String searchFoundStartTime,
|
||||
String searchFoundEndTime,
|
||||
String searchStreamDir,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
JSONObject resultAllJson=new JSONObject();
|
||||
JSONObject result=new JSONObject();
|
||||
Map<String, Object> params=new HashMap<>();
|
||||
try {
|
||||
params.put("searchFoundStartTime", searchFoundStartTime);
|
||||
params.put("searchFoundEndTime", searchFoundEndTime);
|
||||
StringBuffer url=new StringBuffer(Constants.LOG_BASE_URL+Constants.NTC_CONN_RECORD_PERCENT);
|
||||
String json=HttpClientUtil.getMsg(url.toString(), params,request);
|
||||
if(!StringUtil.isEmpty(json)) {
|
||||
resultAllJson=JSONObject.fromObject(json);
|
||||
if(!StringUtil.isEmpty(resultAllJson)) {
|
||||
result=(JSONObject) resultAllJson.get("data");
|
||||
}
|
||||
}
|
||||
result.put("success","success");
|
||||
} catch (MaatConvertException e) {
|
||||
logger.error("ajaxConnRecordPercent检索失败",e);
|
||||
result.put("error",getMsgProp().get("request_service_failed"));
|
||||
}catch (Exception e) {
|
||||
logger.error("ajaxConnRecordPercent检索失败",e);
|
||||
result.put("error",getMsgProp().get("search_error"));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1368,3 +1368,7 @@ av_tips=The system does not support the index information of audio and video cod
|
||||
asn_ip_group_delete=\uFF08IP configuration under this ASN group will also be deleted.)
|
||||
keyword_log_tips=Deduplicate http body keywords log,for the control status of http body keywords is not ideal, configure the http url of the hit keyword as URL control configuration.
|
||||
conn_record=Connection Records
|
||||
bps=Bps
|
||||
bps_percent=Bps Percent
|
||||
pps=pps
|
||||
pps_percent=pps Percent
|
||||
@@ -1372,3 +1372,7 @@ av_tips=\u041A\u043E\u0433\u0434\u0430 \u0438\u043D\u0444\u043E\u0440\u043C\u043
|
||||
asn_ip_group_delete=\uFF08IP configuration under this ASN group will also be deleted.)
|
||||
keyword_log_tips=\u041A\u043E\u0433\u0434\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u043A\u043B\u044E\u0447\u0435\u0432\u044B\u043C\u0438 \u0441\u043B\u043E\u0432\u0430\u043C\u0438 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043F\u043B\u043E\u0445\u0438\u043C, \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0434\u0435\u0434\u0443\u043F\u043B\u0438\u043A\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u0433\u043E \u0436\u0443\u0440\u043D\u0430\u043B\u0430 \u0434\u0430\u043D\u043D\u043E\u0439 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044E <20>\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 URL<52> \u0434\u043B\u044F \u043F\u043E\u0434\u0430\u0432\u0448\u0435\u0433\u043E \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430.
|
||||
conn_record=Connection Records
|
||||
bps=Bps
|
||||
bps_percent=Bps Percent
|
||||
pps=pps
|
||||
pps_percent=pps Percent
|
||||
@@ -1368,3 +1368,7 @@ av_tips=\u5BF9\u4E8E\u97F3\u89C6\u9891\u7F16\u7801\u7684\u7D22\u5F15\u4FE1\u606F
|
||||
asn_ip_group_delete=(\u8BE5ASN\u7EC4\u4E0B\u7684IP\u914D\u7F6E\u4E5F\u4F1A\u88AB\u5220\u9664)
|
||||
keyword_log_tips=\u6E05\u6D17\u540E\u7F51\u9875\u5173\u952E\u5B57\u65E5\u5FD7\uFF0C\u7F51\u9875\u5173\u952E\u5B57\u7BA1\u63A7\u72B6\u51B5\u4E0D\u7406\u60F3\u65F6\uFF0C\u53EF\u5C06\u6E05\u6D17\u540E\u5EFA\u8BAE\u7ED9\u51FA\u7684\u547D\u4E2D\u5173\u952E\u5B57\u7F51\u9875\u914D\u7F6E\u4E3AURL\u7BA1\u63A7
|
||||
conn_record=\u901A\u8054\u5173\u7CFB
|
||||
bps=Bps
|
||||
bps_percent=Bps Percent
|
||||
pps=pps
|
||||
pps_percent=pps Percent
|
||||
@@ -585,3 +585,4 @@ dns_spoofing_ip_ip=1.1.1.1
|
||||
trafficBandwidthTransTwo=trafficBandwidthTransTwo
|
||||
ntcCollectRadiusLog=ntcCollectRadiusLogs
|
||||
ntcConnRecordLog=ntcConnRecordLogs
|
||||
ntcConnRecordPercent=ntcConnRecordPercent
|
||||
@@ -7,6 +7,7 @@
|
||||
</title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
@@ -31,14 +32,60 @@
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
ajaxConnPercent();
|
||||
});
|
||||
|
||||
var ajaxConnPercent=function(){
|
||||
$.ajax({
|
||||
type:'get',
|
||||
url:'${ctx}/log/ntc/connRecordLogs/ajaxConnRecordPercent',
|
||||
data:{
|
||||
"searchFoundStartTime":$("input[name=searchFoundStartTime]").val(),
|
||||
"searchFoundEndTime":$("input[name=searchFoundEndTime]").val(),
|
||||
"searchStreamDir":1
|
||||
},
|
||||
async:true,
|
||||
success:function(data,textStatus){//处理返回结果
|
||||
if(textStatus=="success"){
|
||||
if(data != ""){
|
||||
if(data.success == 'success'){
|
||||
$(".bps").html(data.bps);
|
||||
$(".bpsp").html(data.bpsPercent);
|
||||
$(".pps").html(data.pps);
|
||||
$(".ppsp").html(data.ppsPercent);
|
||||
}else{
|
||||
console.log(data.error);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
</div>
|
||||
<div data-service="bps" class="service btn blue" >
|
||||
<span><spring:message code="bps"/></span>
|
||||
(<span class="bps">0</span>)
|
||||
</div>
|
||||
<div data-service="bpsp" class="service btn blue">
|
||||
<span><spring:message code="bps_percent"/></span>
|
||||
(<span class="bpsp">0</span>)
|
||||
</div>
|
||||
<div data-service="pps" class="service btn blue">
|
||||
<span><spring:message code="pps_percent"/></span>
|
||||
(<span class="pps">0</span>)
|
||||
</div>
|
||||
<div data-service="ppsp" class="service btn blue">
|
||||
<span><spring:message code="pps_percent"/></span>
|
||||
(<span class="ppsp">0</span>)
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="conn_record"/>
|
||||
</h3>
|
||||
@@ -190,8 +237,10 @@
|
||||
<th class="sort-column app_label"><spring:message code='social_app'/></th>
|
||||
<th class="sort-column c2s_pkt_num"><spring:message code="c2s_pkt_num"/></th>
|
||||
<th class="sort-column s2c_pkt_num"><spring:message code='s2c_pkt_num'/></th>
|
||||
<th class="total_pkt_num">Total Pkt</th>
|
||||
<th class="sort-column c2s_byte_num"><spring:message code="c2s_byte_num"/></th>
|
||||
<th class="sort-column s2c_byte_num"><spring:message code="s2c_byte_num"/></th>
|
||||
<th class="Total_byte_num">Total Byte</th>
|
||||
<th class="sort-column cap_ip" isVisible="false"><spring:message code="clj_ip"/></th>
|
||||
<th class="sort-column trans_proto"><spring:message code="transport_layer_protocol"/></th>
|
||||
<th class="sort-column addr_type"><spring:message code='addr_type'/></th>
|
||||
@@ -258,8 +307,10 @@
|
||||
</td>
|
||||
<td>${log.c2sPktNum }</td>
|
||||
<td>${log.s2cPktNum }</td>
|
||||
<td>${log.s2cPktNum+log.c2sPktNum }</td>
|
||||
<td>${log.c2sByteNum }</td>
|
||||
<td>${log.s2cByteNum }</td>
|
||||
<td>${log.s2cByteNum+log.c2sByteNum }</td>
|
||||
|
||||
<td title="${log.capIp }">${fns:abbr(log.capIp, 42)}</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user