diff --git a/src/main/java/com/nis/util/Constants.java b/src/main/java/com/nis/util/Constants.java index 67d2c945a..eafbae1f5 100644 --- a/src/main/java/com/nis/util/Constants.java +++ b/src/main/java/com/nis/util/Constants.java @@ -384,7 +384,9 @@ public final class Constants { public static final String NTC_MMAVURL_LOG = Configurations.getStringProperty("mmAvUrlLog", ""); public static final String NTC_MMPICIP_LOG = Configurations.getStringProperty("mmPicIpLog", ""); public static final String NTC_MMPICURL_LOG = Configurations.getStringProperty("mmPicUrlLog", ""); - + public static final String NTC_MMVOIP_IP_LOG = Configurations.getStringProperty("mmVoipIpLog", ""); + public static final String NTC_MMVOIP_ACCOUNT_LOG = Configurations.getStringProperty("mmVoipAccountLog", ""); + //报表类型,1- 配置命中总量业务 public static final Integer BUSINESSTYPE_CONFIG=Configurations.getIntProperty("businesstype_config", 1); //报表类型,2- 配置报表业务 diff --git a/src/main/java/com/nis/web/controller/log/ntc/MmVoipAccountLogController.java b/src/main/java/com/nis/web/controller/log/ntc/MmVoipAccountLogController.java new file mode 100644 index 000000000..2ad4de5f4 --- /dev/null +++ b/src/main/java/com/nis/web/controller/log/ntc/MmVoipAccountLogController.java @@ -0,0 +1,79 @@ +package com.nis.web.controller.log.ntc; + +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.http.client.ClientProtocolException; +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.reflect.TypeToken; +import com.nis.domain.Page; +import com.nis.domain.PageLog; +import com.nis.domain.log.MmVoipLog; +import com.nis.domain.maat.LogRecvData; +import com.nis.util.Constants; +import com.nis.util.httpclient.HttpClientUtil; +import com.nis.web.controller.BaseController; + +@Controller +@RequestMapping(value = "${adminPath}/log/ntc/mmAvVoipAccountLogs") +public class MmVoipAccountLogController extends BaseController{ + + /** + * @param model + * @param entry + * @param request + * @param response + * @return + * @throws ClientProtocolException + * @throws IOException + */ + @RequestMapping(value={"list",""}) + public String list(Model model,@ModelAttribute("log")MmVoipLog entry,HttpServletRequest request, HttpServletResponse response) throws ClientProtocolException, IOException { + + try { + + PageLog page = new PageLog(request, response); + Map params=new HashMap<>(); + params.put("pageSize", page.getPageSize()); + params.put("pageNo", page.getPageNo()); + //查询值判断 + initLogSearchValue(entry,params); + + String url = ""; + url = Constants.LOG_BASE_URL+Constants.NTC_MMVOIP_ACCOUNT_LOG; + String jsonString = HttpClientUtil.getMsg(url,params,request); + + Gson gson = new GsonBuilder().create(); + //gson泛型支持 + LogRecvData fromJson = gson.fromJson(jsonString, new TypeToken>(){}.getType()); + + if (fromJson.getStatus().intValue() == 200) { + Page data = fromJson.getData(); + page.setList(data.getList()); + List list = page.getList(); + for (MmVoipLog l : list) { + l.setFunctionId(entry.getFunctionId()); + setLogAction(l); + } + model.addAttribute("page", page); + logger.info("查询mmVoipAccount日志成功"); + } + } catch (Exception e) { + logger.info("查询mmVoipAccount日志失败", e); + addMessage(model, e.getMessage()); + } + return "/log/ntc/mmVoipAccountList"; + } + +} diff --git a/src/main/java/com/nis/web/controller/log/ntc/MmVoipIpLogController.java b/src/main/java/com/nis/web/controller/log/ntc/MmVoipIpLogController.java new file mode 100644 index 000000000..ac56131eb --- /dev/null +++ b/src/main/java/com/nis/web/controller/log/ntc/MmVoipIpLogController.java @@ -0,0 +1,79 @@ +package com.nis.web.controller.log.ntc; + +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.http.client.ClientProtocolException; +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.reflect.TypeToken; +import com.nis.domain.Page; +import com.nis.domain.PageLog; +import com.nis.domain.log.MmVoipLog; +import com.nis.domain.maat.LogRecvData; +import com.nis.util.Constants; +import com.nis.util.httpclient.HttpClientUtil; +import com.nis.web.controller.BaseController; + +@Controller +@RequestMapping(value = "${adminPath}/log/ntc/mmVoipIpLogs") +public class MmVoipIpLogController extends BaseController{ + + /** + * @param model + * @param entry + * @param request + * @param response + * @return + * @throws ClientProtocolException + * @throws IOException + */ + @RequestMapping(value={"list",""}) + public String list(Model model,@ModelAttribute("log")MmVoipLog entry,HttpServletRequest request, HttpServletResponse response) throws ClientProtocolException, IOException { + + try { + + PageLog page = new PageLog(request, response); + Map params=new HashMap<>(); + params.put("pageSize", page.getPageSize()); + params.put("pageNo", page.getPageNo()); + //查询值判断 + initLogSearchValue(entry,params); + + String url = ""; + url = Constants.LOG_BASE_URL+Constants.NTC_MMVOIP_IP_LOG; + String jsonString = HttpClientUtil.getMsg(url,params,request); + + Gson gson = new GsonBuilder().create(); + //gson泛型支持 + LogRecvData fromJson = gson.fromJson(jsonString, new TypeToken>(){}.getType()); + + if (fromJson.getStatus().intValue() == 200) { + Page data = fromJson.getData(); + page.setList(data.getList()); + List list = page.getList(); + for (MmVoipLog l : list) { + l.setFunctionId(entry.getFunctionId()); + setLogAction(l); + } + model.addAttribute("page", page); + logger.info("查询VoipIp日志成功"); + } + } catch (Exception e) { + logger.info("查询VoipIp日志失败", e); + addMessage(model, e.getMessage()); + } + return "/log/ntc/mmVoipIpList"; + } + +} diff --git a/src/main/resources/nis.properties b/src/main/resources/nis.properties index 8055627b4..b75ee7c63 100644 --- a/src/main/resources/nis.properties +++ b/src/main/resources/nis.properties @@ -226,7 +226,7 @@ callbackCfg=commonSources fileDigestCfg=fileDigestSources configIdSources=configPzIdSources #logBaseUrl=http://10.0.6.242:8080/galaxy/service/log/v1/ -logBaseUrl=http://10.0.6.242:8080/galaxy/service/log/v1/ +logBaseUrl=http://10.0.6.104:8080/galaxy/service/log/v1/ ntcPzReport=ntcPzReport ntcServiceReport=ntcServiceReport ntcTagReport=ntcTagReport @@ -254,6 +254,8 @@ mmAvIpLog=mmAvIpLogs mmAvUrlLog=mmAvUrlLogs mmPicIpLog=mmPicIpLogs mmPicUrlLog=mmPicUrlLogs +mmVoipIpLog=mmVoipIpLogs +mmVoipAccountLog=mmVoipAccountLogs ######################################## #大屏图表展示服务接口 dashboardUrl=http://10.0.6.101:8080/galaxy/service/log/v1/ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp index 3447cbe69..8767a7871 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp @@ -61,6 +61,7 @@ $(document).ready(function(){
+ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp index 095a63cef..d128c41ec 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp @@ -61,6 +61,7 @@ $(document).ready(function(){
+ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp index 173c76665..34c184961 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp @@ -61,6 +61,7 @@ $(document).ready(function(){
+ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp index 009064dde..1a0dd7c50 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp @@ -61,6 +61,7 @@ $(document).ready(function(){
+ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp new file mode 100644 index 000000000..d647f578a --- /dev/null +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp @@ -0,0 +1,273 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + + + + + + +
+

+ VOIP ACCOUNT + +

+ + +
+
+
+
+
+ + + + + + + + + + +
+
+ + + + + +
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+ +
+ + + +
+ + +
+ + +
+
+
+
+ + + + + + + + +
+
+ +
+
+ + + + + + + +
+
+
+
+ + +
+
+
+
+ + + + + + + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
${log.cfgId}${log.entranceId} + + + + + + + ${log.foundTime}${log.recvTime}${log.transProto}${log.duation}${log.protocol}${log.callingAccount}${log.calledAccount}${log.callingNumber}${log.calledNumber}${log.fromToStoreIp}${log.fromToStoreUrl}${log.toFromStoreIp}${log.toFromStoreUrl}${log.pid}${log.logUri}${log.level} + + + + + + + + ${log.dIp}${log.sIp}${log.dPort}${log.sPort}${log.deviceId} + + + + ${log.capIp}${log.addrList}${log.userRegion}
+
${page}
+
+
+
+
+
+
+ + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp new file mode 100644 index 000000000..c0be5e9ac --- /dev/null +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp @@ -0,0 +1,273 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + + + + + + +
+

+ VOIP IP + +

+ + +
+
+
+
+
+ + + + + + + + + + +
+
+ + + + + +
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+ +
+ + + +
+ + +
+ + +
+
+
+
+ + + + + + + + +
+
+ +
+
+ + + + + + + +
+
+
+
+ + +
+
+
+
+ + + + + + + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
${log.cfgId}${log.entranceId} + + + + + + + ${log.foundTime}${log.recvTime}${log.transProto}${log.duation}${log.protocol}${log.callingAccount}${log.calledAccount}${log.callingNumber}${log.calledNumber}${log.fromToStoreIp}${log.fromToStoreUrl}${log.toFromStoreIp}${log.toFromStoreUrl}${log.pid}${log.logUri}${log.level} + + + + + + + + ${log.dIp}${log.sIp}${log.dPort}${log.sPort}${log.deviceId} + + + + ${log.capIp}${log.addrList}${log.userRegion}
+
${page}
+
+
+
+
+
+
+ +