Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
Conflicts: src/main/java/com/nis/util/Constants.java src/main/resources/messages/message_en.properties src/main/resources/messages/message_ru.properties src/main/resources/messages/message_zh_CN.properties src/main/resources/nis.properties
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
@@ -38,17 +40,20 @@ public class AppPolicyCfg extends BaseCfg<AppPolicyCfg> {
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
private Integer exprType ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
private Integer matchMethod ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
private Integer isHexbin;
|
||||
|
||||
private List<IpPortCfg> ipPortList;
|
||||
private IpPortCfg ipPort;
|
||||
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
@@ -135,4 +140,20 @@ public class AppPolicyCfg extends BaseCfg<AppPolicyCfg> {
|
||||
this.behavCode = behavCode;
|
||||
}
|
||||
|
||||
public List<IpPortCfg> getIpPortList() {
|
||||
return ipPortList;
|
||||
}
|
||||
|
||||
public void setIpPortList(List<IpPortCfg> ipPortList) {
|
||||
this.ipPortList = ipPortList;
|
||||
}
|
||||
|
||||
public IpPortCfg getIpPort() {
|
||||
return ipPort;
|
||||
}
|
||||
|
||||
public void setIpPort(IpPortCfg ipPort) {
|
||||
this.ipPort = ipPort;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,16 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
protected String showName;//表在界面上展示的名称
|
||||
protected String seltype;//选中类型,页面搜索用
|
||||
protected String tableName;
|
||||
@ExcelField(title="userregion1")
|
||||
protected String userRegion1;
|
||||
@ExcelField(title="userregion2")
|
||||
protected String userRegion2;
|
||||
@ExcelField(title="userregion3")
|
||||
protected String userRegion3;
|
||||
@ExcelField(title="userregion4")
|
||||
protected String userRegion4;
|
||||
@ExcelField(title="userregion5")
|
||||
protected String userRegion5;
|
||||
/**
|
||||
* 编译id
|
||||
*/
|
||||
@@ -786,4 +796,35 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
public void setAreaType(Integer areaType) {
|
||||
this.areaType = areaType;
|
||||
}
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
public String getUserRegion3() {
|
||||
return userRegion3;
|
||||
}
|
||||
public void setUserRegion3(String userRegion3) {
|
||||
this.userRegion3 = userRegion3;
|
||||
}
|
||||
public String getUserRegion4() {
|
||||
return userRegion4;
|
||||
}
|
||||
public void setUserRegion4(String userRegion4) {
|
||||
this.userRegion4 = userRegion4;
|
||||
}
|
||||
public String getUserRegion5() {
|
||||
return userRegion5;
|
||||
}
|
||||
public void setUserRegion5(String userRegion5) {
|
||||
this.userRegion5 = userRegion5;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,12 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
@@ -53,7 +47,82 @@ public class IpCfgTemplate {
|
||||
private Integer ratelimit;//21
|
||||
private Integer dnsStrategyId;//22
|
||||
private Integer irType;//23
|
||||
private String userRegion1;//77
|
||||
private String userRegion2;//78
|
||||
private String userRegion3;//79
|
||||
private String userRegion4;//80
|
||||
private String userRegion5;//81
|
||||
|
||||
/**
|
||||
* userRegion1
|
||||
* @return userRegion1
|
||||
*/
|
||||
@ExcelField(title="userregion1",align=2,sort=77)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
/**
|
||||
* @param userRegion1 the userRegion1 to set
|
||||
*/
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
/**
|
||||
* userRegion2
|
||||
* @return userRegion2
|
||||
*/
|
||||
@ExcelField(title="userregion2",align=2,sort=78)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
/**
|
||||
* @param userRegion2 the userRegion2 to set
|
||||
*/
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
/**
|
||||
* userRegion3
|
||||
* @return userRegion3
|
||||
*/
|
||||
@ExcelField(title="userregion3",align=2,sort=79)
|
||||
public String getUserRegion3() {
|
||||
return userRegion3;
|
||||
}
|
||||
/**
|
||||
* @param userRegion3 the userRegion3 to set
|
||||
*/
|
||||
public void setUserRegion3(String userRegion3) {
|
||||
this.userRegion3 = userRegion3;
|
||||
}
|
||||
/**
|
||||
* userRegion4
|
||||
* @return userRegion4
|
||||
*/
|
||||
@ExcelField(title="userregion4",align=2,sort=80)
|
||||
public String getUserRegion4() {
|
||||
return userRegion4;
|
||||
}
|
||||
/**
|
||||
* @param userRegion4 the userRegion4 to set
|
||||
*/
|
||||
public void setUserRegion4(String userRegion4) {
|
||||
this.userRegion4 = userRegion4;
|
||||
}
|
||||
/**
|
||||
* userRegion5
|
||||
* @return userRegion5
|
||||
*/
|
||||
@ExcelField(title="userregion5",align=2,sort=81)
|
||||
public String getUserRegion5() {
|
||||
return userRegion5;
|
||||
}
|
||||
/**
|
||||
* @param userRegion5 the userRegion5 to set
|
||||
*/
|
||||
public void setUserRegion5(String userRegion5) {
|
||||
this.userRegion5 = userRegion5;
|
||||
}
|
||||
/**
|
||||
* ratelimit
|
||||
* @return ratelimit
|
||||
|
||||
75
src/main/java/com/nis/domain/log/BaseReportLog.java
Normal file
75
src/main/java/com/nis/domain/log/BaseReportLog.java
Normal file
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
*@Title: BaseReportLog.java
|
||||
*@Package com.nis.domain.log
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年7月5日 上午11:12:48
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.log;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.nis.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* @ClassName: BaseReportLog.java
|
||||
* @Description: 报表接口返回的公共字段
|
||||
* @author (wx)
|
||||
* @date 2018年7月5日 上午11:12:48
|
||||
* @version V1.0
|
||||
*/
|
||||
public class BaseReportLog<T> extends BaseEntity<T> {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -6190203013788730697L;
|
||||
protected Long sum;
|
||||
protected Integer service;
|
||||
protected Date reportTime;
|
||||
/**
|
||||
* sum
|
||||
* @return sum
|
||||
*/
|
||||
|
||||
public Long getSum() {
|
||||
return sum;
|
||||
}
|
||||
/**
|
||||
* @param sum the sum to set
|
||||
*/
|
||||
public void setSum(Long sum) {
|
||||
this.sum = sum;
|
||||
}
|
||||
/**
|
||||
* service
|
||||
* @return service
|
||||
*/
|
||||
|
||||
public Integer getService() {
|
||||
return service;
|
||||
}
|
||||
/**
|
||||
* @param service the service to set
|
||||
*/
|
||||
public void setService(Integer service) {
|
||||
this.service = service;
|
||||
}
|
||||
/**
|
||||
* reportTime
|
||||
* @return reportTime
|
||||
*/
|
||||
|
||||
public Date getReportTime() {
|
||||
return reportTime;
|
||||
}
|
||||
/**
|
||||
* @param reportTime the reportTime to set
|
||||
*/
|
||||
public void setReportTime(Date reportTime) {
|
||||
this.reportTime = reportTime;
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,6 @@ package com.nis.domain.log;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.nis.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* @ClassName: ReportLog.java
|
||||
* @Description: TODO
|
||||
@@ -19,7 +17,7 @@ import com.nis.domain.BaseEntity;
|
||||
* @date 2018年6月13日 下午2:21:04
|
||||
* @version V1.0
|
||||
*/
|
||||
public class ReportLog extends BaseEntity<ReportLog>{
|
||||
public class ReportLog extends BaseReportLog<ReportLog>{
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
|
||||
@@ -8,12 +8,21 @@
|
||||
*/
|
||||
package com.nis.domain.log;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.nis.domain.BaseEntity;
|
||||
import javax.ws.rs.client.WebTarget;
|
||||
import javax.ws.rs.client.Invocation.Builder;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import com.google.common.reflect.TypeToken;
|
||||
import com.google.gson.Gson;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.RestfulResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.util.httpclient.ClientUtil;
|
||||
|
||||
/**
|
||||
* @ClassName: ReportResultLog.java
|
||||
@@ -22,9 +31,9 @@ import com.nis.domain.RestfulResult;
|
||||
* @date 2018年6月11日 下午2:04:09
|
||||
* @version V1.0
|
||||
*/
|
||||
public class ReportResultLog extends RestfulResult{
|
||||
public class ReportResultLog<T extends BaseReportLog> extends RestfulResult{
|
||||
private Integer logSource;
|
||||
private Page<ReportLog> data;
|
||||
private Page<T> data;
|
||||
/**
|
||||
* logSource
|
||||
* @return logSource
|
||||
@@ -44,14 +53,50 @@ public class ReportResultLog extends RestfulResult{
|
||||
* @return data
|
||||
*/
|
||||
|
||||
public Page<ReportLog> getData() {
|
||||
public Page<T> getData() {
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
* @param data the data to set
|
||||
*/
|
||||
public void setData(Page<ReportLog> data) {
|
||||
public void setData(Page<T> data) {
|
||||
this.data = data;
|
||||
}
|
||||
public ReportResultLog<T> getReport(String reportUrl,SearchReport searchCondition) throws MaatConvertException{
|
||||
if(StringUtils.isBlank(searchCondition.getSearchService())){
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
String result = null;
|
||||
ReportResultLog<T> bean = null;
|
||||
StringBuffer url=new StringBuffer(reportUrl+"?");
|
||||
url.append("searchBusinessType=").append(searchCondition.getSearchBusinessType())
|
||||
.append("&searchService=").append(searchCondition.getSearchService());
|
||||
if(searchCondition.getSearchCondition()!=null){
|
||||
for(Entry<String, Object> e:searchCondition.getSearchCondition().entrySet()){
|
||||
url.append("&").append(e.getKey()).append("=").append((String)e.getValue());
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(searchCondition.getSearchReportStartTime())){
|
||||
url.append("&searchReportStartTime=").append(searchCondition.getSearchReportStartTime());
|
||||
}
|
||||
if(StringUtils.isNotBlank(searchCondition.getSearchReportEndTime())){
|
||||
url.append("&searchReportEndTime=").append(searchCondition.getSearchReportEndTime());
|
||||
}
|
||||
//创建连接
|
||||
WebTarget wt = ClientUtil.getWebTarger(url.toString());
|
||||
Builder header = wt.request(MediaType.APPLICATION_JSON);
|
||||
Response response= header.get();
|
||||
if( response.getStatus() == 200){
|
||||
result= response.readEntity(String.class);
|
||||
Gson gson=Constants.gsonbuilder.create();
|
||||
bean = gson.fromJson(result, new TypeToken<ReportResultLog<T>>(){
|
||||
private static final long serialVersionUID = 7963055764864141968L;}.getType());
|
||||
}else{
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+response.readEntity(String.class));
|
||||
}
|
||||
return bean;
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
}
|
||||
191
src/main/java/com/nis/domain/log/SearchReport.java
Normal file
191
src/main/java/com/nis/domain/log/SearchReport.java
Normal file
@@ -0,0 +1,191 @@
|
||||
/**
|
||||
*@Title: SearchReport.java
|
||||
*@Package com.nis.domain.log
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年7月5日 下午12:30:44
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.log;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.nis.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* @ClassName: SearchReport.java
|
||||
* @Description: TODO
|
||||
* @author (wx)
|
||||
* @date 2018年7月5日 下午12:30:44
|
||||
* @version V1.0
|
||||
*/
|
||||
public class SearchReport extends BaseEntity<SearchReport>{
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Integer functionId;
|
||||
private String cfgName;
|
||||
private Integer action;
|
||||
private Integer reportType;
|
||||
private String searchBusinessType;
|
||||
private String searchReportStartTime;
|
||||
private String searchReportEndTime;
|
||||
private String searchService;
|
||||
private HashMap<String,Object> searchCondition;
|
||||
public static final String searchConditionSplitor=",";
|
||||
public int searchConditionLimit;
|
||||
|
||||
/**
|
||||
* reportType
|
||||
* @return reportType
|
||||
*/
|
||||
|
||||
public Integer getReportType() {
|
||||
return reportType;
|
||||
}
|
||||
/**
|
||||
* @param reportType the reportType to set
|
||||
*/
|
||||
public void setReportType(Integer reportType) {
|
||||
this.reportType = reportType;
|
||||
}
|
||||
/**
|
||||
* functionId
|
||||
* @return functionId
|
||||
*/
|
||||
|
||||
public Integer getFunctionId() {
|
||||
return functionId;
|
||||
}
|
||||
/**
|
||||
* @param functionId the functionId to set
|
||||
*/
|
||||
public void setFunctionId(Integer functionId) {
|
||||
this.functionId = functionId;
|
||||
}
|
||||
/**
|
||||
* cfgName
|
||||
* @return cfgName
|
||||
*/
|
||||
|
||||
public String getCfgName() {
|
||||
return cfgName;
|
||||
}
|
||||
/**
|
||||
* @param cfgName the cfgName to set
|
||||
*/
|
||||
public void setCfgName(String cfgName) {
|
||||
this.cfgName = cfgName;
|
||||
}
|
||||
/**
|
||||
* action
|
||||
* @return action
|
||||
*/
|
||||
|
||||
public Integer getAction() {
|
||||
return action;
|
||||
}
|
||||
/**
|
||||
* @param action the action to set
|
||||
*/
|
||||
public void setAction(Integer action) {
|
||||
this.action = action;
|
||||
}
|
||||
/**
|
||||
* searchBusinessType
|
||||
* @return searchBusinessType
|
||||
*/
|
||||
|
||||
public String getSearchBusinessType() {
|
||||
return searchBusinessType;
|
||||
}
|
||||
/**
|
||||
* @param searchBusinessType the searchBusinessType to set
|
||||
*/
|
||||
public void setSearchBusinessType(String searchBusinessType) {
|
||||
this.searchBusinessType = searchBusinessType;
|
||||
}
|
||||
/**
|
||||
* searchReportStartTime
|
||||
* @return searchReportStartTime
|
||||
*/
|
||||
|
||||
public String getSearchReportStartTime() {
|
||||
return searchReportStartTime;
|
||||
}
|
||||
/**
|
||||
* @param searchReportStartTime the searchReportStartTime to set
|
||||
*/
|
||||
public void setSearchReportStartTime(String searchReportStartTime) {
|
||||
this.searchReportStartTime = searchReportStartTime;
|
||||
}
|
||||
/**
|
||||
* searchReportEndTime
|
||||
* @return searchReportEndTime
|
||||
*/
|
||||
|
||||
public String getSearchReportEndTime() {
|
||||
return searchReportEndTime;
|
||||
}
|
||||
/**
|
||||
* @param searchReportEndTime the searchReportEndTime to set
|
||||
*/
|
||||
public void setSearchReportEndTime(String searchReportEndTime) {
|
||||
this.searchReportEndTime = searchReportEndTime;
|
||||
}
|
||||
/**
|
||||
* searchService
|
||||
* @return searchService
|
||||
*/
|
||||
|
||||
public String getSearchService() {
|
||||
return searchService;
|
||||
}
|
||||
/**
|
||||
* @param searchService the searchService to set
|
||||
*/
|
||||
public void setSearchService(String searchService) {
|
||||
this.searchService = searchService;
|
||||
}
|
||||
/**
|
||||
* searchCondition
|
||||
* @return searchCondition
|
||||
*/
|
||||
|
||||
public HashMap<String, Object> getSearchCondition() {
|
||||
return searchCondition;
|
||||
}
|
||||
/**
|
||||
* @param searchCondition the searchCondition to set
|
||||
*/
|
||||
public void setSearchCondition(HashMap<String, Object> searchCondition) {
|
||||
this.searchCondition = searchCondition;
|
||||
}
|
||||
/**
|
||||
* searchConditionLimit
|
||||
* @return searchConditionLimit
|
||||
*/
|
||||
|
||||
public int getSearchConditionLimit() {
|
||||
return searchConditionLimit;
|
||||
}
|
||||
/**
|
||||
* @param searchConditionLimit the searchConditionLimit to set
|
||||
*/
|
||||
public void setSearchConditionLimit(int searchConditionLimit) {
|
||||
this.searchConditionLimit = searchConditionLimit;
|
||||
}
|
||||
/**
|
||||
* searchconditionsplitor
|
||||
* @return searchconditionsplitor
|
||||
*/
|
||||
|
||||
public static String getSearchconditionsplitor() {
|
||||
return searchConditionSplitor;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,32 +1,31 @@
|
||||
package com.nis.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.ws.rs.client.Invocation.Builder;
|
||||
import javax.ws.rs.client.Entity;
|
||||
import javax.ws.rs.client.Invocation.Builder;
|
||||
import javax.ws.rs.client.WebTarget;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
import net.sf.json.JsonConfig;
|
||||
|
||||
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
|
||||
import org.glassfish.jersey.media.multipart.file.FileDataBodyPart;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.common.reflect.TypeToken;
|
||||
import com.google.gson.Gson;
|
||||
import com.nis.domain.log.ReportLog;
|
||||
import com.nis.domain.log.ReportResultLog;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.ToMaatResult.ResponseData;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.httpclient.ClientUtil;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
import net.sf.json.JsonConfig;
|
||||
|
||||
public class ConfigServiceUtil {
|
||||
private static Logger logger = LoggerFactory.getLogger(ConfigServiceUtil.class);
|
||||
/*public static class MapTypeAdapter extends TypeAdapter<Object> {
|
||||
@@ -310,12 +309,12 @@ public class ConfigServiceUtil {
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static ReportResultLog getReport(int type,String ids,String serviceIds,String searchReportStartTime,String searchReportEndTime) throws MaatConvertException{
|
||||
public static ReportResultLog<ReportLog> getReport(int type,String ids,String serviceIds,String searchReportStartTime,String searchReportEndTime) throws MaatConvertException{
|
||||
if(StringUtils.isBlank(ids)||StringUtils.isBlank(serviceIds)){
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
String result = null;
|
||||
ReportResultLog bean = null;
|
||||
ReportResultLog<ReportLog> bean = null;
|
||||
StringBuffer url=new StringBuffer(Constants.SERVICE_URL+Constants.NTC_PZ_REPORT+"?");
|
||||
url.append("searchBusinessType=").append(type)
|
||||
.append("&searchService=").append(serviceIds).append("&searchCfgId=").append(ids);
|
||||
@@ -331,8 +330,9 @@ public class ConfigServiceUtil {
|
||||
Response response= header.get();
|
||||
if( response.getStatus() == 200){
|
||||
result= response.readEntity(String.class);
|
||||
JSONObject resObject = JSONObject.fromObject(result);
|
||||
bean = (ReportResultLog) JSONObject.toBean(resObject,ReportResultLog.class);
|
||||
Gson gson=Constants.gsonbuilder.create();
|
||||
bean = gson.fromJson(result, new TypeToken<ReportResultLog<ReportLog>>(){
|
||||
private static final long serialVersionUID = 7963055764864141968L;}.getType());
|
||||
}else{
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+response.readEntity(String.class));
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.nis.domain.configuration.IpCfgTemplate;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.domain.configuration.StringCfgTemplate;
|
||||
import com.nis.domain.log.BaseLogEntity;
|
||||
import com.nis.domain.log.SearchReport;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Configurations;
|
||||
//import com.nis.main.ConvertTool;
|
||||
@@ -329,6 +330,20 @@ public class BaseController {
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(cfg.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
}
|
||||
protected void initReportCondition(Model model,SearchReport report){
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(report.getFunctionId());
|
||||
model.addAttribute("regionList", regionList);
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(report.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
}
|
||||
protected void initFormCondition(Model model){
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -19,6 +21,9 @@ import com.nis.domain.configuration.AppDomainCfg;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.web.controller.BaseController;
|
||||
@@ -52,6 +57,31 @@ public class AppCfgController extends BaseController {
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/app/appPolicyCfgList";
|
||||
}
|
||||
/**
|
||||
* 查询APP策略IP子配置
|
||||
* @param model
|
||||
* @param cfgId
|
||||
* @param index
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"ajaxAppPolicyIpList"})
|
||||
public String ajaxSslSubList(Model model,Long cfgId,Integer index) {
|
||||
AppPolicyCfg cfg = appCfgService.getAppPolicyCfg(cfgId);
|
||||
List<String[]> tabList = new ArrayList();
|
||||
if(cfg.getIpPortList()!=null){
|
||||
String cfgType = null;
|
||||
for(IpPortCfg ip:cfg.getIpPortList()){
|
||||
if(!ip.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"1",ip.getCfgType()});
|
||||
cfgType = ip.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/app/appPolicyIpList";
|
||||
}
|
||||
/**
|
||||
* 策略配置表单
|
||||
* @param model
|
||||
|
||||
@@ -11,7 +11,6 @@ package com.nis.web.controller.configuration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
@@ -20,16 +19,12 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.datanucleus.store.types.wrappers.backed.Set;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
@@ -223,7 +218,7 @@ public class CommonController extends BaseController {
|
||||
try {
|
||||
ImportExcel ei = new ImportExcel(file, 0, 0);
|
||||
List<IpCfgTemplate> list = ei.getDataList(IpCfgTemplate.class);
|
||||
this.checkIpCfg(list);
|
||||
this.checkIpCfg(ipCfg.getFunctionId(),list);
|
||||
List<BaseIpCfg> ipList = new ArrayList<>();
|
||||
Date date=new Date();
|
||||
for(IpCfgTemplate cfg : list){
|
||||
@@ -251,7 +246,7 @@ public class CommonController extends BaseController {
|
||||
}
|
||||
//ip配置导出
|
||||
public void _exportIp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")IpPortCfg entity,String ids,RedirectAttributes redirectAttributes){
|
||||
IpPortCfg entity,String ids,RedirectAttributes redirectAttributes){
|
||||
try {
|
||||
//获取国际化配置
|
||||
Properties msgProp = getMsgProp();
|
||||
|
||||
@@ -35,7 +35,7 @@ import com.nis.web.security.UserUtils;
|
||||
public class BgpCfgController extends BaseController{
|
||||
|
||||
@RequestMapping(value = {"bgpList"})
|
||||
@RequiresPermissions(value={"other:bgp:config"})
|
||||
// @RequiresPermissions(value={"other:bgp:config"})
|
||||
public String httpList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg
|
||||
,HttpServletRequest request,HttpServletResponse response
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
|
||||
@@ -47,7 +47,7 @@ import com.nis.web.security.UserUtils;
|
||||
@RequestMapping("${adminPath}/ntc/fileTransfer/")
|
||||
public class FileTransferCfgController extends BaseController{
|
||||
@RequestMapping(value = {"ftpList"})
|
||||
@RequiresPermissions(value={"fileTransfer:ftp:config"})
|
||||
// @RequiresPermissions(value={"fileTransfer:ftp:config"})
|
||||
public String ftpList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
|
||||
Page<CfgIndexInfo> page = fileTransferCfgService.getFtpList(searchPage, cfg);
|
||||
@@ -131,7 +131,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"fileDigestList"})
|
||||
@RequiresPermissions(value={"fileTransfer:fileDigest:config"})
|
||||
// @RequiresPermissions(value={"fileTransfer:fileDigest:config"})
|
||||
public String fileDigestList(Model model,@ModelAttribute("cfg")FileDigestCfg cfg
|
||||
,HttpServletRequest request,HttpServletResponse response
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
|
||||
@@ -45,7 +45,7 @@ import com.nis.web.security.UserUtils;
|
||||
@RequestMapping("${adminPath}/ntc/mail/")
|
||||
public class MailCfgController extends BaseController{
|
||||
@RequestMapping(value = {"mailList"})
|
||||
@RequiresPermissions(value={"mail:config"})
|
||||
// @RequiresPermissions(value={"mail:config"})
|
||||
public String mailList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
|
||||
Page<CfgIndexInfo> page = mailCfgService.getMailList(searchPage, cfg);
|
||||
|
||||
@@ -48,7 +48,7 @@ import com.nis.web.security.UserUtils;
|
||||
public class WebsiteController extends BaseController{
|
||||
|
||||
@RequestMapping(value = {"httpList"})
|
||||
@RequiresPermissions(value={"website:http:config"})
|
||||
// @RequiresPermissions(value={"website:http:config"})
|
||||
public String httpList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
|
||||
Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(searchPage, cfg);
|
||||
@@ -57,7 +57,7 @@ public class WebsiteController extends BaseController{
|
||||
return "/cfg/website/httpList";
|
||||
}
|
||||
@RequestMapping(value = {"dnsList"})
|
||||
@RequiresPermissions(value={"website:dns:config"})
|
||||
// @RequiresPermissions(value={"website:dns:config"})
|
||||
public String dnsList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
|
||||
Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(searchPage, cfg);
|
||||
@@ -207,7 +207,7 @@ public class WebsiteController extends BaseController{
|
||||
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+functionId;
|
||||
}
|
||||
@RequestMapping(value = {"sslList"})
|
||||
@RequiresPermissions(value={"website:ssl:config"})
|
||||
// @RequiresPermissions(value={"website:ssl:config"})
|
||||
public String sslList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
|
||||
Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(searchPage, cfg);
|
||||
|
||||
@@ -14,6 +14,9 @@ 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.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
@@ -22,7 +25,7 @@ import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.controller.configuration.CommonController;
|
||||
|
||||
/**
|
||||
* 白名单
|
||||
@@ -31,9 +34,9 @@ import com.nis.web.controller.BaseController;
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/ntc/whitelist")
|
||||
public class WhiteListController extends BaseController{
|
||||
public class WhiteListController extends CommonController{
|
||||
|
||||
@RequestMapping(value = {"ipList"})
|
||||
@RequestMapping(value = {"ip/list"})
|
||||
@RequiresPermissions(value={"whitelist:ip:config","whitelist:ip:audit"},logical=Logical.OR)
|
||||
public String ipList(Model model,@ModelAttribute("cfg")IpPortCfg cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
cfg.setTableName(IpPortCfg.getTablename());
|
||||
@@ -43,7 +46,7 @@ public class WhiteListController extends BaseController{
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/whitelist/ipList";
|
||||
}
|
||||
@RequestMapping(value = {"domainList"})
|
||||
@RequestMapping(value = {"domain/list"})
|
||||
@RequiresPermissions(value={"whitelist:domain:config","whitelist:domain:audit"},logical=Logical.OR)
|
||||
public String domainList(Model model,@ModelAttribute("cfg")HttpUrlCfg cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
cfg.setTableName(HttpUrlCfg.getTablename());
|
||||
@@ -53,7 +56,7 @@ public class WhiteListController extends BaseController{
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/whitelist/domainList";
|
||||
}
|
||||
@RequestMapping(value = {"ipForm"})
|
||||
@RequestMapping(value = {"ip/form"})
|
||||
@RequiresPermissions(value={"whitelist:ip:config"})
|
||||
public String ipForm(Model model,String ids,BaseIpCfg entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
@@ -72,7 +75,7 @@ public class WhiteListController extends BaseController{
|
||||
|
||||
return "/cfg/whitelist/ipForm";
|
||||
}
|
||||
@RequestMapping(value = {"domainForm"})
|
||||
@RequestMapping(value = {"domain/form"})
|
||||
@RequiresPermissions(value={"whitelist:domain:config"})
|
||||
public String domainForm(Model model,String ids,HttpUrlCfg entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
@@ -90,7 +93,7 @@ public class WhiteListController extends BaseController{
|
||||
|
||||
return "/cfg/whitelist/domainForm";
|
||||
}
|
||||
@RequestMapping(value = {"saveOrUpdateIp"})
|
||||
@RequestMapping(value = {"ip/saveOrUpdate"})
|
||||
public String saveOrUpdateIp(RedirectAttributes model, IpPortCfg cfg) {
|
||||
cfg.setTableName(IpPortCfg.getTablename());
|
||||
logger.info("saveOrUpdateIp loaded");
|
||||
@@ -112,9 +115,9 @@ public class WhiteListController extends BaseController{
|
||||
logger.error("保存失败",e);
|
||||
addMessage(model,"save_failed");
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/ipList?functionId="+cfg.getFunctionId();
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
@RequestMapping(value = {"saveOrUpdateDomain"})
|
||||
@RequestMapping(value = {"domain/saveOrUpdate"})
|
||||
public String saveOrUpdateDomain(RedirectAttributes model, HttpUrlCfg cfg) {
|
||||
cfg.setTableName(HttpUrlCfg.getTablename());
|
||||
logger.info("saveOrUpdateIp loaded");
|
||||
@@ -136,10 +139,10 @@ public class WhiteListController extends BaseController{
|
||||
logger.error("保存失败",e);
|
||||
addMessage(model,"save_failed");
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/domainList?functionId="+cfg.getFunctionId();
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/domain/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"deleteIp"})
|
||||
@RequestMapping(value = {"ip/delete"})
|
||||
@RequiresPermissions("whitelist:ip:config")
|
||||
public String deleteIp(String ids,Integer functionId,RedirectAttributes model) {
|
||||
try{
|
||||
@@ -149,9 +152,9 @@ public class WhiteListController extends BaseController{
|
||||
logger.error("删除失败", e);
|
||||
addMessage(model,"delete_failed");
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/ipList?functionId="+functionId;
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+functionId;
|
||||
}
|
||||
@RequestMapping(value = {"deleteDomain"})
|
||||
@RequestMapping(value = {"domain/delete"})
|
||||
@RequiresPermissions("whitelist:domain:config")
|
||||
public String deleteDomain(String ids,Integer functionId,RedirectAttributes model) {
|
||||
try{
|
||||
@@ -161,10 +164,10 @@ public class WhiteListController extends BaseController{
|
||||
logger.error("删除失败", e);
|
||||
addMessage(model,"delete_failed");
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/domainList?functionId="+functionId;
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/domain/list?functionId="+functionId;
|
||||
}
|
||||
@RequestMapping(value = {"auditIp"})
|
||||
@RequiresPermissions("whitelist:ip:aduit")
|
||||
@RequestMapping(value = {"ip/audit"})
|
||||
@RequiresPermissions("whitelist:ip:audit")
|
||||
public String auditIp(String ids,IpPortCfg cfg,RedirectAttributes redirectAttributes) {
|
||||
try{
|
||||
for(String id:ids.split(",")){
|
||||
@@ -183,15 +186,15 @@ public class WhiteListController extends BaseController{
|
||||
addMessage(redirectAttributes,"audit_success");
|
||||
}catch(MaatConvertException e){
|
||||
logger.error("审核失败", e);
|
||||
addMessage(redirectAttributes, e.getPrefix()+e.getResult().getReason());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}catch(Exception e){
|
||||
logger.error("审核失败", e);
|
||||
addMessage(redirectAttributes, "audit_failed");
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/ipList?functionId="+cfg.getFunctionId();
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
@RequestMapping(value = {"auditDomain"})
|
||||
@RequiresPermissions("whitelist:domain:aduit")
|
||||
@RequestMapping(value = {"domain/audit"})
|
||||
@RequiresPermissions("whitelist:domain:audit")
|
||||
public String auditDomain(String ids,HttpUrlCfg cfg,RedirectAttributes redirectAttributes) {
|
||||
try{
|
||||
List<HttpUrlCfg> beans=domainService.getListByCfgId(ids);
|
||||
@@ -209,11 +212,30 @@ public class WhiteListController extends BaseController{
|
||||
addMessage(redirectAttributes,"audit_success");
|
||||
}catch(MaatConvertException e){
|
||||
logger.error("审核失败", e);
|
||||
addMessage(redirectAttributes, e.getPrefix()+e.getResult().getReason());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}catch(Exception e){
|
||||
logger.error("审核失败", e);
|
||||
addMessage(redirectAttributes, "audit_failed");
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/domainList?functionId="+cfg.getFunctionId();
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/domain/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
//ip配置导入
|
||||
@RequestMapping(value = "ip/import", method=RequestMethod.POST)
|
||||
public String importIp(String cfgName,RedirectAttributes redirectAttributes,
|
||||
@RequestParam("file") MultipartFile file,IpPortCfg cfg) {
|
||||
this._importIp(cfgName,redirectAttributes, file,cfg);
|
||||
return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
//ip模板下载
|
||||
@RequestMapping(value = "ip/import/template")
|
||||
public void importFileTemplate(HttpServletRequest request,HttpServletResponse response,
|
||||
RedirectAttributes redirectAttributes,Integer functionId,Integer cfgRegionCode) {
|
||||
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode);
|
||||
}
|
||||
//ip配置导出
|
||||
@RequestMapping(value = "ip/export")
|
||||
public void exportIp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")IpPortCfg entity,String ids,RedirectAttributes redirectAttributes){
|
||||
this._exportIp(model, request, response, entity, ids, redirectAttributes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
@@ -17,18 +16,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
import com.nis.domain.configuration.HttpReqHeadCfg;
|
||||
import com.nis.domain.configuration.HttpResHeadCfg;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.nis.web.controller.report;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.nis.domain.log.SearchReport;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/report")
|
||||
public class ReportController extends BaseController {
|
||||
@RequestMapping("/list")
|
||||
public String list(@ModelAttribute("bean") SearchReport bean,Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
initReportCondition(model, bean);
|
||||
return "/report/list";
|
||||
}
|
||||
}
|
||||
29
src/main/java/com/nis/web/controller/report/TestBean.java
Normal file
29
src/main/java/com/nis/web/controller/report/TestBean.java
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
*@Title: TestBean.java
|
||||
*@Package com.nis.web.controller.report
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年7月6日 上午9:20:48
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.web.controller.report;
|
||||
|
||||
import com.nis.domain.log.BaseReportLog;
|
||||
|
||||
/**
|
||||
* @ClassName: TestBean.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年7月6日 上午9:20:48
|
||||
* @version V1.0
|
||||
*/
|
||||
public class TestBean extends BaseReportLog<TestBean> {
|
||||
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -8794587413327741665L;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.nis.web.controller.report;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.nis.domain.Page;
|
||||
import com.nis.domain.log.SearchReport;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/report/test")
|
||||
public class TestController extends BaseController {
|
||||
|
||||
@RequestMapping("list")
|
||||
public String list(@ModelAttribute("bean") SearchReport bean,Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
Page<TestBean> page=new Page<TestBean>(request, response);
|
||||
List<TestBean> list=new ArrayList<>();
|
||||
list.add(new TestBean());
|
||||
page.setList(list);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("bean", bean);
|
||||
return "/report/test";
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import com.nis.domain.configuration.AppStringCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@@ -32,8 +33,13 @@ public interface AppCfgDao {
|
||||
//app策略配置增删改查
|
||||
public List<AppPolicyCfg> findAppPolicyList(AppPolicyCfg entity) ;
|
||||
public AppPolicyCfg getAppPolicyCfg(Long cfgId) ;
|
||||
public IpPortCfg getAppPolicyIpCfg(AppPolicyCfg entity) ;
|
||||
public List<IpPortCfg> getAppPolicyIpList(AppPolicyCfg entity);
|
||||
public int insertAppPolicyCfg(AppPolicyCfg entity);
|
||||
public int updateAppPolicyCfg(AppPolicyCfg entity);
|
||||
public int insertAppPolicyIpCfg(IpPortCfg entity);
|
||||
public int deleteAppPolicyIpCfg(AppPolicyCfg entity);
|
||||
|
||||
//app协议IP配置增删改查
|
||||
public List<AppIpCfg> findAppIpList(AppIpCfg entity) ;
|
||||
public AppIpCfg getAppIpCfg(Long cfgId) ;
|
||||
|
||||
@@ -189,6 +189,41 @@
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ipPortMap" type="com.nis.domain.configuration.IpPortCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
|
||||
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
||||
<result column="direction" property="direction" jdbcType="INTEGER" />
|
||||
<result column="protocol" property="protocol" jdbcType="INTEGER" />
|
||||
<result column="protocol_id" property="protocolId" jdbcType="INTEGER" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="AppPolicyCfg_Column" >
|
||||
r.CFG_ID, r.APP_CODE,r.BEHAV_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT,
|
||||
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
||||
@@ -248,6 +283,15 @@
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},#{ratelimit,jdbcType=INTEGER},#{functionId,jdbcType=INTEGER},
|
||||
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER}
|
||||
</sql>
|
||||
|
||||
<sql id="IpCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||
a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable
|
||||
,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
<!-- <sql id="AppCfg_Column_List_with_id_alias" >
|
||||
<choose>
|
||||
<when test="page !=null and page.alias != null and page.alias != ''">
|
||||
@@ -397,7 +441,25 @@
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
<if test="ipPort!=null">
|
||||
AND r.compile_id in (select t.compile_id from ip_port_cfg t
|
||||
<where>
|
||||
and t.protocol_id=21
|
||||
<if test="ipPort.srcIpAddress != null and ipPort.srcIpAddress != ''">
|
||||
and t.src_ip_address =#{(ipPort.srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipPort.srcPort != null and ipPort.srcPort != ''">
|
||||
and t.src_port =#{ipPort.srcPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipPort.destIpAddress != null and ipPort.destIpAddress != ''">
|
||||
and t.dest_ip_address =#{(ipPort.destIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipPort.destPort != null and ipPort.destPort != ''">
|
||||
and t.dest_port =#{ipPort.destPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
@@ -1011,6 +1073,78 @@
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- insert ip_port_cfg表信息 -->
|
||||
<insert id="insertAppPolicyIpCfg" parameterType="com.nis.domain.configuration.IpPortCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ip_port_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
ip_type,
|
||||
src_ip_address,
|
||||
ip_pattern,
|
||||
port_pattern,
|
||||
src_port,
|
||||
protocol,
|
||||
protocol_id,
|
||||
direction,
|
||||
dest_port,
|
||||
dest_ip_address,
|
||||
cfg_type,
|
||||
cfg_region_code
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{ipType,jdbcType=INTEGER},
|
||||
#{srcIpAddress,jdbcType=VARCHAR},
|
||||
#{ipPattern,jdbcType=INTEGER},
|
||||
#{portPattern,jdbcType=INTEGER},
|
||||
#{srcPort,jdbcType=VARCHAR},
|
||||
#{protocol,jdbcType=INTEGER},
|
||||
#{protocolId,jdbcType=INTEGER},
|
||||
#{direction,jdbcType=INTEGER},
|
||||
#{destPort,jdbcType=VARCHAR},
|
||||
#{destIpAddress,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateAppPolicyCfg" parameterType="com.nis.domain.configuration.AppPolicyCfg" >
|
||||
update app_policy_cfg
|
||||
<set >
|
||||
@@ -1525,4 +1659,15 @@
|
||||
</trim>
|
||||
|
||||
</update>
|
||||
|
||||
<!-- 删除APP策略IP子配置 -->
|
||||
<delete id="deleteAppPolicyIpCfg" >
|
||||
delete from ip_port_cfg where compile_id=#{compileId} and protocol_id=21 and function_id=#{functionId}
|
||||
</delete>
|
||||
<!-- 查询APP策略IP子配置 -->
|
||||
<select id="getAppPolicyIpList" resultMap="ipPortMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="IpCfg_Column" />
|
||||
FROM ip_port_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -37,6 +37,11 @@
|
||||
<result column="ratelimit" property="ratelimit" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="INTEGER" />
|
||||
<result column="ir_type" property="irType" jdbcType="INTEGER" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="BaseIpMapWithUser" type="com.nis.domain.configuration.BaseIpCfg" extends="BaseIpMap" >
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
||||
@@ -50,14 +55,14 @@
|
||||
DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT,
|
||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT,DNS_STRATEGY_ID,IR_TYPE
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT,DNS_STRATEGY_ID,IR_TYPE,USER_REGION1,USER_REGION2,USER_REGION3,USER_REGION4,USER_REGION5
|
||||
</sql>
|
||||
<sql id="BaseIpCfg_Column_List_with_id_name" >
|
||||
CFG_ID, CFG_DESC,CFG_REGION_CODE,CFG_TYPE, IP_TYPE, IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS, PORT_PATTERN,SRC_PORT,DEST_PORT,
|
||||
DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT,
|
||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT,DNS_STRATEGY_ID,IR_TYPE
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT,DNS_STRATEGY_ID,IR_TYPE,USER_REGION1,USER_REGION2,USER_REGION3,USER_REGION4,USER_REGION5
|
||||
</sql>
|
||||
<sql id="BaseIpCfg_Column_List_with_id_alias" >
|
||||
<choose>
|
||||
@@ -68,7 +73,12 @@
|
||||
${page.alias}.CREATOR_ID as creatorId,${page.alias}.CREATE_TIME AS createTime,${page.alias}.EDITOR_ID as editorId,${page.alias}.EDIT_TIME AS editTime,${page.alias}.AUDITOR_ID as auditorId,${page.alias}.AUDIT_TIME AS auditTime,
|
||||
${page.alias}.SERVICE_ID as serviceId,${page.alias}.REQUEST_ID AS requestId,${page.alias}.COMPILE_ID AS compileId,${page.alias}.IS_AREA_EFFECTIVE as isAreaEffective,${page.alias}.classify,
|
||||
${page.alias}.ATTRIBUTE AS attribute,${page.alias}.LABLE AS lable,${page.alias}.AREA_EFFECTIVE_IDS AS areaEffectiveIds,${page.alias}.FUNCTION_ID AS functionId,${page.alias}.RATELIMIT AS ratelimit,
|
||||
${page.alias}.DNS_STRATEGY_ID AS dnsStrategyId,${page.alias}.IR_TYPE AS irType
|
||||
${page.alias}.DNS_STRATEGY_ID AS dnsStrategyId,${page.alias}.IR_TYPE AS irType,
|
||||
${page.alias}.USER_REGION1 AS userRegion1,
|
||||
${page.alias}.USER_REGION2 AS userRegion2,
|
||||
${page.alias}.USER_REGION3 AS userRegion3,
|
||||
${page.alias}.USER_REGION4 AS userRegion4,
|
||||
${page.alias}.USER_REGION5 AS userRegion5
|
||||
</when>
|
||||
<otherwise>
|
||||
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc,r.CFG_REGION_CODE as cfgRegionCode,r.CFG_TYPE as cfgType, r.IP_TYPE as ipType,
|
||||
@@ -77,7 +87,12 @@
|
||||
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
|
||||
r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify,
|
||||
r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.AREA_EFFECTIVE_IDS AS areaEffectiveIds,r.FUNCTION_ID as functionId,r.RATELIMIT AS ratelimit,
|
||||
r.DNS_STRATEGY_ID AS dnsStrategyId,r.IR_TYPE AS irType
|
||||
r.DNS_STRATEGY_ID AS dnsStrategyId,r.IR_TYPE AS irType,
|
||||
r.USER_REGION1 AS userRegion1,
|
||||
r.USER_REGION2 AS userRegion2,
|
||||
r.USER_REGION3 AS userRegion3,
|
||||
r.USER_REGION4 AS userRegion4,
|
||||
r.USER_REGION5 AS userRegion5
|
||||
</otherwise>
|
||||
</choose>
|
||||
</sql>
|
||||
@@ -92,7 +107,7 @@
|
||||
REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,ATTRIBUTE,LABLE,
|
||||
AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT,
|
||||
DNS_STRATEGY_ID,IR_TYPE
|
||||
DNS_STRATEGY_ID,IR_TYPE,USER_REGION1,USER_REGION2,USER_REGION3,USER_REGION4,USER_REGION5
|
||||
</sql>
|
||||
<sql id="BaseIpCfg_Value_List" >
|
||||
#{cfgDesc,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{cfgType,jdbcType=VARCHAR},
|
||||
@@ -105,7 +120,12 @@
|
||||
#{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR}, #{functionId,jdbcType=INTEGER}, #{ratelimit,jdbcType=INTEGER},
|
||||
#{dnsStrategyId,jdbcType=INTEGER},#{irType,jdbcType=INTEGER}
|
||||
#{dnsStrategyId,jdbcType=INTEGER},#{irType,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR},
|
||||
#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR}
|
||||
</sql>
|
||||
<select id="getById" resultMap="BaseIpMap" parameterType="java.lang.Long" >
|
||||
SELECT
|
||||
@@ -282,6 +302,21 @@
|
||||
<if test="irType != null">
|
||||
AND ${page.alias}.IR_TYPE=#{irType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="userRegion1 != null">
|
||||
AND ${page.alias}.USER_REGION1=#{userRegion1,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userRegion2 != null">
|
||||
AND ${page.alias}.USER_REGION2=#{userRegion2,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userRegion3 != null">
|
||||
AND ${page.alias}.USER_REGION3=#{userRegion3,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userRegion4 != null">
|
||||
AND ${page.alias}.USER_REGION4=#{userRegion4,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userRegion5 != null">
|
||||
AND ${page.alias}.USER_REGION5=#{userRegion5,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="cfgId != null">
|
||||
@@ -392,6 +427,21 @@
|
||||
<if test="irType != null">
|
||||
AND r.IR_TYPE=#{irType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="userRegion1 != null">
|
||||
AND r.USER_REGION1=#{userRegion1,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userRegion2 != null">
|
||||
AND r.USER_REGION2=#{userRegion2,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userRegion3 != null">
|
||||
AND r.USER_REGION3=#{userRegion3,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userRegion4 != null">
|
||||
AND r.USER_REGION4=#{userRegion4,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userRegion5 != null">
|
||||
AND r.USER_REGION5=#{userRegion5,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<!-- 数据范围过滤 -->
|
||||
@@ -547,6 +597,21 @@
|
||||
<if test="irType != null">
|
||||
IR_TYPE=#{irType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userRegion1 != null">
|
||||
USER_REGION1=#{userRegion1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion2 != null">
|
||||
USER_REGION2=#{userRegion2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion3 != null">
|
||||
USER_REGION3=#{userRegion3,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion4 != null">
|
||||
USER_REGION4=#{userRegion4,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion5 != null">
|
||||
USER_REGION5=#{userRegion5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
@@ -595,7 +660,7 @@
|
||||
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
|
||||
r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify,
|
||||
r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.AREA_EFFECTIVE_IDS AS areaEffectiveIds,r.FUNCTION_ID as functionId,r.RATELIMIT AS ratelimit,
|
||||
r.DNS_STRATEGY_ID AS dnsStrategyId,r.IR_TYPE AS irType
|
||||
r.DNS_STRATEGY_ID AS dnsStrategyId,r.IR_TYPE AS irType,r.USER_REGION1 AS userRegion1,r.USER_REGION2 AS userRegion2,r.USER_REGION3 AS userRegion3,r.USER_REGION4 AS userRegion4,r.USER_REGION5 AS userRegion5
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName,po.group_name as group_name
|
||||
from ${tableName} r
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_name" property="dnsStrategyName" jdbcType="VARCHAR" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="ipPortMap" type="com.nis.domain.configuration.IpPortCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -123,7 +128,8 @@
|
||||
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.dns_strategy_id
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.dns_strategy_id,a.user_region1,
|
||||
a.user_region2,a.user_region3,a.user_region4,a.user_region5
|
||||
</sql>
|
||||
<sql id="IpCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
@@ -392,7 +398,12 @@
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
dns_strategy_id
|
||||
dns_strategy_id,
|
||||
user_region1,
|
||||
user_region2,
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -413,7 +424,12 @@
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{dnsStrategyId,jdbcType=INTEGER}
|
||||
#{dnsStrategyId,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR},
|
||||
#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert ip_port_cfg表信息 -->
|
||||
@@ -518,7 +534,12 @@
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
is_hexbin,
|
||||
user_region1,
|
||||
user_region2,
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -545,7 +566,12 @@
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
#{isHexbin,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR},
|
||||
#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -580,7 +606,12 @@
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
is_hexbin,
|
||||
user_region1,
|
||||
user_region2,
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -607,7 +638,12 @@
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
#{isHexbin,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR},
|
||||
#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -641,7 +677,12 @@
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
is_hexbin,
|
||||
user_region1,
|
||||
user_region2,
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -667,7 +708,12 @@
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
#{isHexbin,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR},
|
||||
#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert http_url_cfg表信息 -->
|
||||
@@ -700,7 +746,12 @@
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
is_hexbin,
|
||||
user_region1,
|
||||
user_region2,
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -726,7 +777,12 @@
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
#{isHexbin,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR},
|
||||
#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<update id="updateCfgIndex" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
@@ -778,6 +834,21 @@
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userRegion1 != null and userRegion1 != ''" >
|
||||
user_region1 = #{userRegion1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion2 != null and userRegion2 != ''" >
|
||||
user_region2 = #{userRegion2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion3 != null and userRegion3 != ''" >
|
||||
user_region3 = #{userRegion3,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion4 != null and userRegion4 != ''" >
|
||||
user_region4 = #{userRegion4,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion5 != null and userRegion5 != ''" >
|
||||
user_region5 = #{userRegion5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
dns_strategy_id = #{dnsStrategyId,jdbcType=INTEGER},
|
||||
</trim>
|
||||
|
||||
@@ -390,7 +390,12 @@ public abstract class BaseService {
|
||||
if(srcIp.getSrcIpAddress().indexOf("/")!=-1){
|
||||
if(srcIp.getIpType()==4 || srcIp.getIpType()==46){//46表示源ip为ipv4,目的ip为ipv6
|
||||
Integer srcMaskNum = Integer.parseInt(srcIp.getSrcIpAddress().split("/")[1]);
|
||||
dstIp.setSrcIpMask(IpUtil.convertMask(srcMaskNum));
|
||||
if(srcMaskNum==0){
|
||||
dstIp.setSrcIpMask("0.0.0.0");
|
||||
}else{
|
||||
dstIp.setSrcIpMask(IpUtil.convertMask(srcMaskNum));
|
||||
}
|
||||
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
||||
}else if(srcIp.getIpType()==6|| srcIp.getIpType()==64){//64表示源ip为ipv6,目的ip为ipv4
|
||||
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getSrcIpAddress());
|
||||
@@ -413,27 +418,31 @@ public abstract class BaseService {
|
||||
}else{
|
||||
if(srcIp.getIpType()==4|| srcIp.getIpType()==46){//46表示源ip为ipv4,目的ip为ipv6
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||
dstIp.setSrcIpMask("0.0.0.0");
|
||||
dstIp.setSrcIpMask("255.255.255.255");
|
||||
}else if(srcIp.getIpType()==6|| srcIp.getIpType()==64){//64表示源ip为ipv6,目的ip为ipv4
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||
dstIp.setSrcIpMask("::");
|
||||
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
if(srcIp.getIpType()==4|| srcIp.getIpType()==46){//46表示源ip为ipv4,目的ip为ipv6
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||
dstIp.setSrcIpMask("0.0.0.0");
|
||||
dstIp.setSrcIpMask("255.255.255.255");
|
||||
}else if(srcIp.getIpType()==6|| srcIp.getIpType()==64){//64表示源ip为ipv6,目的ip为ipv4
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||
dstIp.setSrcIpMask("::");
|
||||
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||
}
|
||||
}
|
||||
if(srcIp.getDestIpAddress()!=null){
|
||||
if(srcIp.getDestIpAddress().indexOf("/")!=-1){
|
||||
if(srcIp.getIpType()==4|| srcIp.getIpType()==64){//64表示源ip为ipv6,目的ip为ipv4
|
||||
Integer dstMaskNum = Integer.parseInt(srcIp.getDestIpAddress().split("/")[1]);
|
||||
dstIp.setDstIpMask(IpUtil.convertMask(dstMaskNum));
|
||||
if(dstMaskNum==0){
|
||||
dstIp.setDstIpMask("0.0.0.0");
|
||||
}else{
|
||||
dstIp.setDstIpMask(IpUtil.convertMask(dstMaskNum));;
|
||||
}
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
||||
}else if(srcIp.getIpType()==6|| srcIp.getIpType()==46){//46表示源ip为ipv4,目的ip为ipv6
|
||||
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getDestIpAddress());
|
||||
@@ -456,20 +465,20 @@ public abstract class BaseService {
|
||||
}else{
|
||||
if(srcIp.getIpType()==4|| srcIp.getIpType()==64){//64表示源ip为ipv6,目的ip为ipv4
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
||||
dstIp.setDstIpMask("0.0.0.0");
|
||||
dstIp.setDstIpMask("255.255.255.255");
|
||||
}else if(srcIp.getIpType()==6|| srcIp.getIpType()==46){//46表示源ip为ipv4,目的ip为ipv6
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
||||
dstIp.setDstIpMask("::");
|
||||
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
if(srcIp.getIpType()==4|| srcIp.getIpType()==64){//64表示源ip为ipv6,目的ip为ipv4
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
||||
dstIp.setDstIpMask("0.0.0.0");
|
||||
dstIp.setDstIpMask("255.255.255.255");
|
||||
}else if(srcIp.getIpType()==6|| srcIp.getIpType()==46){//46表示源ip为ipv4,目的ip为ipv6
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
||||
dstIp.setDstIpMask("::");
|
||||
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||
}
|
||||
}
|
||||
if(srcIp.getSrcPort()!=null){
|
||||
@@ -479,11 +488,11 @@ public abstract class BaseService {
|
||||
dstIp.setSrcPort(srcIp.getSrcPort().split("/")[0]);
|
||||
}else{
|
||||
dstIp.setSrcPort(srcIp.getSrcPort());
|
||||
dstIp.setSrcPortMask("0");
|
||||
dstIp.setSrcPortMask("65535");
|
||||
}
|
||||
}else{
|
||||
dstIp.setSrcPort("0");
|
||||
dstIp.setSrcPortMask("0");
|
||||
dstIp.setSrcPortMask("65535");
|
||||
}
|
||||
if(srcIp.getDestPort()!=null){
|
||||
if(srcIp.getDestPort().indexOf("/")!=-1){
|
||||
@@ -492,11 +501,11 @@ public abstract class BaseService {
|
||||
dstIp.setDstPort(srcIp.getDestPort().split("/")[0]);
|
||||
}else{
|
||||
dstIp.setDstPort(srcIp.getDestPort());
|
||||
dstIp.setDstPortMask("0");
|
||||
dstIp.setDstPortMask("65535");
|
||||
}
|
||||
}else{
|
||||
dstIp.setDstPort("0");
|
||||
dstIp.setDstPortMask("0");
|
||||
dstIp.setDstPortMask("65535");
|
||||
}
|
||||
return dstIp;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
@@ -84,7 +85,10 @@ public class AppCfgService extends BaseService {
|
||||
return page;
|
||||
}
|
||||
public AppPolicyCfg getAppPolicyCfg(Long cfgId){
|
||||
return appCfgDao.getAppPolicyCfg(cfgId);
|
||||
AppPolicyCfg policy = appCfgDao.getAppPolicyCfg(cfgId);
|
||||
List<IpPortCfg> ipPortList = appCfgDao.getAppPolicyIpList(policy);
|
||||
policy.setIpPortList(ipPortList);
|
||||
return policy;
|
||||
}
|
||||
public AppIpCfg getAppIpCfg(Long cfgId){
|
||||
return appCfgDao.getAppIpCfg(cfgId);
|
||||
@@ -116,6 +120,13 @@ public class AppCfgService extends BaseService {
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
appCfgDao.insertAppPolicyCfg(entity);
|
||||
//保存策略IP配置
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
appCfgDao.insertAppPolicyIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
@@ -136,13 +147,23 @@ public class AppCfgService extends BaseService {
|
||||
entity.setIsAudit(0);
|
||||
appCfgDao.updateAppPolicyCfg(entity);
|
||||
|
||||
appCfgDao.deleteAppPolicyIpCfg(entity);
|
||||
//删除旧的区域IP,新增新的区域IP
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
area.setCompileId(entity.getCompileId());
|
||||
area.setFunctionId(entity.getFunctionId());
|
||||
areaIpCfgDao.deleteAreaIpCfg(area);
|
||||
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
//保存策略IP配置
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
appCfgDao.insertAppPolicyIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
@@ -390,19 +411,37 @@ public class AppCfgService extends BaseService {
|
||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||
entity.setTableName(AppPolicyCfg.getTablename());
|
||||
appCfgDao.auditCfg(entity);
|
||||
|
||||
if(isAudit==1){
|
||||
if(entity.getBehavCode()!=null){
|
||||
entity.setCfgKeywords(entity.getAppCode()+"&"+entity.getBehavCode());
|
||||
}else{
|
||||
entity.setCfgKeywords(entity.getAppCode()+"");
|
||||
}
|
||||
|
||||
List<AppPolicyCfg> list = new ArrayList();
|
||||
list.add(entity);
|
||||
Map<String,List> map = cfgConvert(strRegionList,list,2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
|
||||
//查询子配置并修改审核状态
|
||||
entity = this.getAppPolicyCfg(entity.getCfgId());
|
||||
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
|
||||
IpPortCfg cfg = new IpPortCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(IpPortCfg.getTablename());
|
||||
appCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(ipRegionList,entity.getIpPortList(),1,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
ipRegionList=map.get("dstList");
|
||||
if(map.get("numRegionList")!=null){
|
||||
numRegionList.addAll(map.get("numRegionList"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//保存区域IP信息
|
||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||
@@ -810,6 +849,15 @@ public class AppCfgService extends BaseService {
|
||||
entity.setTableName(AppPolicyCfg.getTablename());
|
||||
entity.setFunctionId(functionId);
|
||||
appCfgDao.updateCfgValid(entity);
|
||||
|
||||
//查询子配置
|
||||
entity = this.getAppPolicyCfg(Long.parseLong(id));
|
||||
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
|
||||
IpPortCfg cfg = new IpPortCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(IpPortCfg.getTablename());
|
||||
appCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
||||
AreaIpCfg cfg = new AreaIpCfg();
|
||||
|
||||
@@ -366,40 +366,19 @@ public class HttpRedirectCfgService extends CrudService<WebsiteCfgDao,CfgIndexIn
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
|
||||
//判断http配置是否需要设置自定义域参数
|
||||
String actionValue = DictUtils.getDictCode("SERVICE_ACTION", "action_monit");
|
||||
String userRegion = "";
|
||||
//只有监测业务,并且头域的匹配区域不匹配字典中的信息时需要设置
|
||||
if(!actionValue.equals("默认") && entity.getAction().equals(Integer.parseInt(actionValue))){
|
||||
//请求头域
|
||||
if(entity.getHttpReqHdrList()!=null && entity.getHttpReqHdrList().size()>0){
|
||||
for(ComplexkeywordCfg head:entity.getHttpReqHdrList()){
|
||||
String dictValue = DictUtils.getDictCode("REQUEST_HEADER_DISTRICT", head.getDistrict());
|
||||
if(StringUtil.isEmpty(dictValue) || dictValue.equals("默认")){
|
||||
if(userRegion.equals("")){
|
||||
userRegion += "HTTP_HEADER="+head.getDistrict();
|
||||
}else{
|
||||
userRegion += Constants.USER_REGION_SPLIT+"HTTP_HEADER="+head.getDistrict();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(!StringUtil.isEmpty(entity.getUserRegion1())){
|
||||
if(entity.getUserRegion1().startsWith(Constants.REDIRECT_RESPONSE_CODE_STARTWITH)){
|
||||
userRegion = Constants.REDIRECT_RESPONSE_CODE_KEY+"="+entity.getUserRegion1()+
|
||||
Constants.USER_REGION_SPLIT+
|
||||
Constants.REDIRECT_URL_KEY+"="+entity.getUserRegion2();
|
||||
}else{
|
||||
userRegion = Constants.REDIRECT_RESPONSE_CODE_KEY+"="+entity.getUserRegion1()+
|
||||
Constants.USER_REGION_SPLIT+
|
||||
Constants.REDIRECT_CONTENT_KEY+"="+entity.getUserRegion2();
|
||||
}
|
||||
//应答头域
|
||||
if(entity.getHttpResHdrList()!=null && entity.getHttpResHdrList().size()>0){
|
||||
for(ComplexkeywordCfg head:entity.getHttpResHdrList()){
|
||||
String dictValue = DictUtils.getDictCode("RESPONSE_HEADER_DISTRICT", head.getDistrict());
|
||||
if(StringUtil.isEmpty(dictValue) || dictValue.equals("默认")){
|
||||
if(userRegion.equals("")){
|
||||
userRegion += "HTTP_HEADER="+head.getDistrict();
|
||||
}else{
|
||||
userRegion += Constants.USER_REGION_SPLIT+"HTTP_HEADER="+head.getDistrict();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
}
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
|
||||
@@ -4,12 +4,8 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jets3t.service.ServiceException;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -20,7 +16,6 @@ import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.callback.InlineIp;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.IpCfgTemplate;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||
@@ -233,6 +228,19 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
}else if(Constants.SERVICE_IP_RATELIMIT==cfg.getServiceId().intValue()){
|
||||
maatCfg.setUserRegion(Constants.USERREGION_RATE_LIMIT+"="+cfg.getRatelimit());
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getUserRegion1())){
|
||||
String userRegion = "";
|
||||
if(cfg.getUserRegion1().startsWith(Constants.REDIRECT_RESPONSE_CODE_STARTWITH)){
|
||||
userRegion = Constants.REDIRECT_RESPONSE_CODE_KEY+"="+cfg.getUserRegion1()+
|
||||
Constants.USER_REGION_SPLIT+
|
||||
Constants.REDIRECT_URL_KEY+"="+cfg.getUserRegion2();
|
||||
}else{
|
||||
userRegion = Constants.REDIRECT_RESPONSE_CODE_KEY+"="+cfg.getUserRegion1()+
|
||||
Constants.USER_REGION_SPLIT+
|
||||
Constants.REDIRECT_CONTENT_KEY+"="+cfg.getUserRegion2();
|
||||
}
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
}
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
|
||||
@@ -6,14 +6,11 @@ jdbc.devlop.username=root
|
||||
jdbc.devlop.key=pR3JFt5dsGCW0nZO3TLF7Q==
|
||||
jdbc.devlop.password=JgW5tsiGBNAtcqCgSQIP0g==
|
||||
|
||||
jdbc.product.driver=oracle.jdbc.driver.OracleDriver
|
||||
#jdbc.product.url=jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.17)(PORT = 1521))(LOAD_BALANCE = yes)(CONNECT_DATA =(SERVICE_NAME = ORCL)(FAILOVER_MODE =(TYPE = select)(METHOD = basic)(RETRIES = 180)(DELAY = 180))))
|
||||
jdbc.product.url=jdbc:oracle:thin:@10.0.6.212:1523:app
|
||||
#jdbc.product.url=jdbc:oracle:thin:@10.174.196.20:1521:orcl
|
||||
jdbc.product.username=gk_pz
|
||||
#jdbc.product.username=z2_5x9pz
|
||||
jdbc.product.key=3X3ZBejyxS7lkVsHVm9KTw==
|
||||
jdbc.product.password=sHqDBZIUS0hYZCbC+1xN3A==
|
||||
jdbc.product.driver=com.mysql.jdbc.Driver
|
||||
jdbc.product.url=jdbc:mysql://10.0.6.249:3306/gwall?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
|
||||
jdbc.product.username=root
|
||||
jdbc.product.key=pR3JFt5dsGCW0nZO3TLF7Q==
|
||||
jdbc.product.password=JgW5tsiGBNAtcqCgSQIP0g==
|
||||
|
||||
#jdbc.log.driver=oracle.jdbc.driver.OracleDriver
|
||||
#jdbc.log.url=jdbc:oracle:thin:@10.0.6.212:1523:app
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
<mapping path="/nis/ntc/fileTransfer/ajax*" exclue="true"/>
|
||||
<mapping path="/nis/ntc/app/ajax*" exclue="true"/>
|
||||
<mapping path="/nis/ntc/other/ajax*" exclue="true"/>
|
||||
<mapping path="/nis/proxy/control/httpRedirect/ajax*" exclue="true"/>
|
||||
<mapping path="/nis/app/ajax*" exclue="true"/>
|
||||
<!-- 对同一路径,启用多个装饰器 -->
|
||||
<mapping>
|
||||
<path>/articles/*</path>
|
||||
|
||||
@@ -10,6 +10,7 @@ $(function(){
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
if($(".action:checked").val()==64){
|
||||
$("#ratelimit").show();
|
||||
}else{
|
||||
@@ -17,6 +18,7 @@ $(function(){
|
||||
}
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
if($(".action:checked").val()==64){
|
||||
$("#ratelimit").show();
|
||||
}else{
|
||||
@@ -43,6 +45,10 @@ $(function(){
|
||||
}
|
||||
})
|
||||
if(flag){
|
||||
//将disable属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
$("#appCode").val($("#specServiceIdId").val());
|
||||
loading('onloading...');
|
||||
@@ -52,6 +58,19 @@ $(function(){
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
$(showDiv).removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -82,75 +101,105 @@ $(function(){
|
||||
<input type="hidden" id="exprType" name="exprType" value="0">
|
||||
<input type="hidden" id="matchMethod" name="matchMethod" value="3">
|
||||
<input type="hidden" id="isHexbin" name="isHexbin" value="0">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="social_app"/></label>
|
||||
<div class="col-md-6">
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty _cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(_cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false" extId=""
|
||||
cssClass="form-control required"/>
|
||||
</div>
|
||||
<div for="parent.specServiceName"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" id="ratelimit">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ratelimit"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required digest" range="[0,100]" type="text" name="ratelimit" value="${_cfg.ratelimit}">
|
||||
</div>
|
||||
<div for="ratelimit"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:set var="ipCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<c:if test="${region.regionType eq 2 }">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="social_app"/></label>
|
||||
<div class="col-md-6">
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty _cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(_cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false" extId=""
|
||||
cssClass="form-control required"/>
|
||||
</div>
|
||||
<div for="parent.specServiceName"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" id="ratelimit">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ratelimit"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required digest" range="[0,100]" type="text" name="ratelimit" value="${_cfg.ratelimit}">
|
||||
</div>
|
||||
<div for="ratelimit"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${region.regionType eq 1 }">
|
||||
<h4 class="form-section">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<spring:message code="NTC_UNIVERSAL_IP" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="ipPortList[${ipCfgIndex}]"></c:set>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.ipPortList)>0 and ipCfgIndex<fn:length(_cfg.ipPortList) }">
|
||||
<c:forEach items="${_cfg.ipPortList}" var="ipPort">
|
||||
<c:if test="${region.configRegionValue eq ipPort.cfgType }">
|
||||
<div class="row boxSolid ${tabName}${status.index}">
|
||||
<%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="ipCfgIndex" value="${ipCfgIndex+1}"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="ipCfgIndex" value="${ipCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
|
||||
@@ -32,6 +32,51 @@
|
||||
$("#level").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取策略ip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
//var compileId=$(this).attr("compileId");
|
||||
var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/app/ajaxAppPolicyIpList',
|
||||
data:{"cfgId":cfgId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td style='border-right: 1px solid #FFFFFF;'>"+
|
||||
"<input type='checkbox' hidden='hidden'/>"+
|
||||
"</td>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -287,6 +332,7 @@
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="" compileId="${cfg.compileId}" cfgId="${cfg.cfgId}"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${cfg.cfgId}" value="${cfg.isAudit}">
|
||||
</td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
|
||||
130
src/main/webapp/WEB-INF/views/cfg/app/appPolicyIpList.jsp
Normal file
130
src/main/webapp/WEB-INF/views/cfg/app/appPolicyIpList.jsp
Normal file
@@ -0,0 +1,130 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
})
|
||||
</script>
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<c:if test="${fn:length(tabList)==0}">
|
||||
<div id="NTC_UNIVERSAL_IPTitle${index}" onclick="switchSubCfgTabInfo('NTC_UNIVERSAL_IP',${index})"
|
||||
class="col-md-1 tabInfo badge-info" name="tabTitle">
|
||||
<spring:message code='NTC_UNIVERSAL_IP' />
|
||||
<i id="NTC_UNIVERSAL_IP${index}" class="fa fa-angle-double-down" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div id="NTC_UNIVERSAL_IPInfo${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<spring:message code='no_data' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:forEach items="${tabList}" var="region" varStatus="regionStatus">
|
||||
<div id="${region[1]}Title${index}" onclick="switchSubCfgTabInfo('${region[1]}',${index})"
|
||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||
<spring:message code='${region[1]}' />
|
||||
<i id="${region[1]}${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
</div>
|
||||
<c:forEach items="${tabList}" var="region">
|
||||
<c:if test="${region[0] eq 1 }">
|
||||
<c:forEach items="${_cfg.ipPortList}" var="cfg">
|
||||
<c:if test="${region[1] eq cfg.cfgType }">
|
||||
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='ip_type'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
||||
<c:if test="${cfg.ipType==ipTypeC.itemCode}"><spring:message code="${ipTypeC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='ip_pattern'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
||||
<c:if test="${cfg.ipPattern==ipPatternC.itemCode}"><spring:message code="${ipPatternC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='client_ip'/>:</label>
|
||||
<label>
|
||||
${cfg.srcIpAddress}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='port_pattern'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
||||
<c:if test="${cfg.portPattern eq portPatternC.itemCode}"><spring:message code="${portPatternC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='client_port'/>:</label><label>${cfg.srcPort }</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='server_ip'/>:</label><label>${cfg.destIpAddress }</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='server_port'/>:</label><label>${cfg.destPort }</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='direction'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('DIRECTION')}" var="directionC">
|
||||
<c:if test="${cfg.direction eq directionC.itemCode}"><spring:message code="${directionC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='protocol'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
|
||||
<c:if test="${cfg.protocol eq protocolC.itemCode}"><spring:message code="${protocolC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</html>
|
||||
@@ -123,7 +123,7 @@
|
||||
</shiro:hasPermission>
|
||||
<!-- <button type="button" class="btn btn-default">
|
||||
<i class="fa fa-download"></i> 导出</button> -->
|
||||
<shiro:hasPermission name="intercept:domain:config">
|
||||
<shiro:hasPermission name="${requiresPermissionPrefix.concat(':audit')}">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
|
||||
@@ -36,6 +36,17 @@ $(function(){
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
}
|
||||
if($("select[name='userRegion1']")){
|
||||
$("select[name='userRegion1']").on("change",function(){
|
||||
var code = $(this).val();
|
||||
if(code.indexOf("30")==0){//以30开头的应答码需要输入URL地址
|
||||
$("input[name='userRegion2']").addClass("url");
|
||||
}else{
|
||||
$("input[name='userRegion2']").removeClass("url");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#ipCfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
@@ -194,6 +205,36 @@ $(function(){
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${specialProtocol!=null and specialProtocol eq 'pxyIpControl'}">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="REDIRECT_RESPONSE_CODE" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion1"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('REDIRECT_RESPONSE_CODE')}" var="responseCode">
|
||||
<option value="${responseCode.itemValue}" <c:if test="${_cfg.userRegion1==responseCode.itemValue}">selected</c:if>><spring:message code="${responseCode.itemCode}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion1"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="redirect_content" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="userRegion2"
|
||||
value="${_cfg.userRegion2}">
|
||||
</div>
|
||||
<div for="userRegion2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
|
||||
@@ -50,20 +50,6 @@
|
||||
<!-- 模板导入,start -->
|
||||
<%@include file="/WEB-INF/include/excel/importIp.jsp" %>
|
||||
<!-- 模板导入,end -->
|
||||
<div class="modal fade" id="export_all_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myModalLabel"><spring:message code="confirm"/></h4>
|
||||
</div>
|
||||
<div class="modal-doby">
|
||||
<h2 class=""><spring:message code="sure_to_export_all_data"/></h2>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="btn_confirm" class="btn btn-primary" data-dismiss="modal"><spring:message code="yes"/></button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><spring:message code="no"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="${requiresPermissionPrefix.concat(':config')}">
|
||||
<button type="button" class="btn btn-primary"
|
||||
@@ -246,6 +232,10 @@
|
||||
<c:if test="${specialFunctionId ne null and specialFunctionId eq 'ipratelimit'}">
|
||||
<th><spring:message code="ratelimit"/></th>
|
||||
</c:if>
|
||||
<c:if test="${specialFunctionId ne null and specialFunctionId eq 'pxyIpControl'}">
|
||||
<th><spring:message code="REDIRECT_RESPONSE_CODE"/></th>
|
||||
<th><spring:message code="redirect_content"/></th>
|
||||
</c:if>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="type"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
@@ -312,6 +302,16 @@
|
||||
<c:if test="${cfg.ratelimit ne null}">${cfg.ratelimit}%</c:if>
|
||||
</td>
|
||||
</c:if>
|
||||
<c:if test="${specialFunctionId ne null and specialFunctionId eq 'pxyIpControl'}">
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('REDIRECT_RESPONSE_CODE')}" var="codeC">
|
||||
<c:if test="${codeC.itemValue eq cfg.userRegion1}">
|
||||
<spring:message code="${codeC.itemCode}" />
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${cfg.userRegion2 }</td>
|
||||
</c:if>
|
||||
<td>${cfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<select name="${cfgName}.matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<option value="${matchMethodC.itemCode}" <c:if test="${complexCfg.matchMethod==matchMethodC.itemCode || (complexCfg.matchMethod==null && matchMethodC.itemCode==3)}">selected</c:if>><spring:message code="${matchMethodC.itemValue}"/></option>
|
||||
<option value="${matchMethodC.itemCode}" <c:if test="${complexCfg.matchMethod==matchMethodC.itemCode || (complexCfg.matchMethod==null && matchMethodC.itemCode==0)}">selected</c:if>><spring:message code="${matchMethodC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
@@ -101,7 +101,7 @@
|
||||
<select name="${cfgName}.isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<option value="${isHexbinC.itemCode}" <c:if test="${complexCfg.isHexbin==isHexbinC.itemCode || (complexCfg.matchMethod==null && isHexbinC.itemCode==0)}">selected</c:if>><spring:message code="${isHexbinC.itemValue}"/></option>
|
||||
<option value="${isHexbinC.itemCode}" <c:if test="${complexCfg.isHexbin==isHexbinC.itemCode || (complexCfg.isHexbin==null && isHexbinC.itemCode==0)}">selected</c:if>><spring:message code="${isHexbinC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -109,6 +109,7 @@
|
||||
<sys:delRow url="${ctx}/maintenance/ipMultiplexPoolCfg/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/maintenance/ipMultiplexPoolCfg/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="ip:mulitiplex:pool:audit">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
@@ -120,6 +121,7 @@
|
||||
<li><sys:delRow url="${ctx}/maintenance/ipMultiplexPoolCfg/audit?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
|
||||
@@ -55,6 +55,15 @@
|
||||
}
|
||||
|
||||
});
|
||||
$("select[name='userRegion1']").on("change",function(){
|
||||
var code = $(this).val();
|
||||
if(code.indexOf("30")==0){//以30开头的应答码需要输入URL地址
|
||||
$("input[name='userRegion2']").addClass("url");
|
||||
}else{
|
||||
$("input[name='userRegion2']").removeClass("url");
|
||||
}
|
||||
});
|
||||
|
||||
$("#cfgFrom").validate(
|
||||
{
|
||||
errorPlacement : function(error, element) {
|
||||
@@ -68,8 +77,8 @@
|
||||
}
|
||||
},
|
||||
submitHandler : function(form) {
|
||||
loading('onloading...');
|
||||
var flag = true;
|
||||
|
||||
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
||||
if(!$(".httpReqCfg").hasClass("hidden")){
|
||||
if($(".httpReqCfg").find(".boxSolid").length==$(".httpReqCfg").find(".boxSolid.hidden").length){
|
||||
@@ -99,13 +108,15 @@
|
||||
flag = false;
|
||||
return;
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
if(flag){
|
||||
//将disable属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}
|
||||
|
||||
@@ -201,7 +212,7 @@
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="config_describe" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" multiple
|
||||
<input class="form-control" type="text" name="cfgDesc"
|
||||
value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
@@ -233,6 +244,34 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="REDIRECT_RESPONSE_CODE" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion1"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('REDIRECT_RESPONSE_CODE')}" var="responseCode">
|
||||
<option value="${responseCode.itemValue}" <c:if test="${_cfg.userRegion1==responseCode.itemValue}">selected</c:if>><spring:message code="${responseCode.itemCode}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion1"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="redirect_content" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="userRegion2"
|
||||
value="${_cfg.userRegion2}">
|
||||
</div>
|
||||
<div for="userRegion2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<c:if test="${region.regionType eq 1 }">
|
||||
<!--ip info-->
|
||||
|
||||
@@ -464,6 +464,8 @@
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="REDIRECT_RESPONSE_CODE"/></th>
|
||||
<th><spring:message code="redirect_content"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="type"/></th>
|
||||
@@ -495,6 +497,14 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('REDIRECT_RESPONSE_CODE') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq indexCfg.userRegion1 }">
|
||||
<spring:message code="${dict.itemCode }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${indexCfg.userRegion2 }</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -68,7 +68,7 @@ $(function(){
|
||||
<select name="${cfgName}.matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<option value="${matchMethodC.itemCode}" <c:if test="${strCfg.matchMethod==matchMethodC.itemCode || (strCfg.matchMethod==null && matchMethodC.itemCode==3)}">selected</c:if>><spring:message code="${matchMethodC.itemValue}"/></option>
|
||||
<option value="${matchMethodC.itemCode}" <c:if test="${strCfg.matchMethod==matchMethodC.itemCode || (strCfg.matchMethod==null && matchMethodC.itemCode==0)}">selected</c:if>><spring:message code="${matchMethodC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
@@ -85,7 +85,7 @@ $(function(){
|
||||
<select name="${cfgName}.isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<option value="${isHexbinC.itemCode}" <c:if test="${strCfg.isHexbin==isHexbinC.itemCode || (strCfg.matchMethod==null && isHexbinC.itemCode==0)}">selected</c:if>><spring:message code="${isHexbinC.itemValue}"/></option>
|
||||
<option value="${isHexbinC.itemCode}" <c:if test="${strCfg.isHexbin==isHexbinC.itemCode || (strCfg.isHexbin==null && isHexbinC.itemCode==0)}">selected</c:if>><spring:message code="${isHexbinC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<title><spring:message code="domain_control_white"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
switchIpType($("select[name$='ipType']"));
|
||||
@@ -64,7 +64,7 @@ $(function(){
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfgName}"></spring:message>
|
||||
<spring:message code="domain_control_white"></spring:message>
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
@@ -85,7 +85,7 @@ $(function(){
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/ntc/whitelist/saveOrUpdateDomain" method="post" class="form-horizontal">
|
||||
<form id="cfgFrom" action="${ctx}/ntc/whitelist/domain/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="exprType" value="0">
|
||||
<input type="hidden" name="matchMethod" value="0">
|
||||
<input type="hidden" name="isHexbin" value="0">
|
||||
|
||||
@@ -33,19 +33,6 @@
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
});
|
||||
var edit=function(url){
|
||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||
if(cked.val()==1){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
if(cked.length==1){
|
||||
window.location = url+"&compileId="+cked.attr("id");
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -55,7 +42,7 @@
|
||||
<%-- <button type="button" class="btn btn-default" onclick="location='${ctx}/cfg/string/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="refresh"></spring:message></button> --%>
|
||||
<shiro:hasPermission name="whitelist:domain:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/ntc/whitelist/domainForm?functionId=${cfg.functionId}'">
|
||||
onClick="javascript:window.location='${ctx}/ntc/whitelist/domain/form?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
@@ -71,7 +58,7 @@
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/whitelist/domainList" method="post" class="form-search">
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/whitelist/domain/list" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
@@ -114,8 +101,8 @@
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="whitelist:domain:config">
|
||||
<sys:delRow url="${ctx}/ntc/whitelist/domainForm?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/whitelist/deleteDomain?functionId=${cfg.functionId}" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/whitelist/domain/form?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/whitelist/domain/delete?functionId=${cfg.functionId}" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<!-- <button type="button" class="btn btn-default">
|
||||
<i class="fa fa-download"></i> 导出</button> -->
|
||||
@@ -126,9 +113,9 @@
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/ntc/whitelist/auditDomain?isAudit=1&isValid=1&functionId=${cfg.functionId}" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/whitelist/auditDomain?isAudit=2&isValid=0&functionId=${cfg.functionId}" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/whitelist/auditDomain?isAudit=3&isValid=0&functionId=${cfg.functionId}" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/whitelist/domain/audit?isAudit=1&isValid=1&functionId=${cfg.functionId}" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/whitelist/domain/audit?isAudit=2&isValid=0&functionId=${cfg.functionId}" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/whitelist/domain/audit?isAudit=3&isValid=0&functionId=${cfg.functionId}" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
|
||||
@@ -81,7 +81,7 @@ $(function(){
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="ipCfgFrom" action="${ctx}/ntc/whitelist/saveOrUpdateIp" method="post" class="form-horizontal">
|
||||
<form id="ipCfgFrom" action="${ctx}/ntc/whitelist/ip/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<div class="form-body row">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
|
||||
@@ -43,13 +43,30 @@
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<c:set var="urlPrefix" value="/ntc/whitelist/ip"/>
|
||||
<!-- 模板导入,start -->
|
||||
<%@include file="/WEB-INF/include/excel/importIp.jsp" %>
|
||||
<!-- 模板导入,end -->
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<%-- <button type="button" class="btn btn-default" onclick="location='${ctx}/cfg/ip/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}&audit=${audit}'"><spring:message code="refresh"></spring:message></button> --%>
|
||||
<shiro:hasPermission name="whitelist:ip:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/ntc/whitelist/ipForm?functionId=${cfg.functionId}'">
|
||||
onClick="javascript:window.location='${ctx}/ntc/whitelist/ip/form?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
<!-- 导入功能按钮 -->
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle green" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="import"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<li><a href="javascript:;" onClick="toImport('${region.configRegionCode}','${region.configRegionValue}');">
|
||||
<i class="fa fa-upload"></i><spring:message code="${region.configRegionValue}"/></a></li>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
<h3 class="page-title">
|
||||
@@ -62,7 +79,7 @@
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/whitelist/ipList" method="post" class="form-search">
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/whitelist/ip/list" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
@@ -106,8 +123,9 @@
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="whitelist:ip:config">
|
||||
<sys:delRow url="${ctx}/ntc/whitelist/ipForm?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/whitelist/deleteIp?functionId=${cfg.functionId}" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/whitelist/ip/form?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/whitelist/ip/delete?functionId=${cfg.functionId}" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/whitelist/ip/export?functionId=${cfg.functionId}" id="contentTable" label="export" maxRow="${page.maxExportSize}"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="whitelist:ip:audit">
|
||||
<div class="btn-group">
|
||||
@@ -116,9 +134,9 @@
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/ntc/whitelist/auditIp?isAudit=1&isValid=1&functionId=${cfg.functionId}" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/whitelist/auditIp?isAudit=2&isValid=0&functionId=${cfg.functionId}" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/whitelist/auditIp?isAudit=3&isValid=0&functionId=${cfg.functionId}" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/whitelist/ip/audit?isAudit=1&isValid=1&functionId=${cfg.functionId}" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/whitelist/ip/audit?isAudit=2&isValid=0&functionId=${cfg.functionId}" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/whitelist/ip/audit?isAudit=3&isValid=0&functionId=${cfg.functionId}" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
|
||||
42
src/main/webapp/WEB-INF/views/report/attrType.jsp
Normal file
42
src/main/webapp/WEB-INF/views/report/attrType.jsp
Normal file
@@ -0,0 +1,42 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
});
|
||||
</script>
|
||||
<div id="attrType" class="tab-pane fade">
|
||||
<table id="contentTable1" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>性质</th>
|
||||
<th>总量</th>
|
||||
<th>0点</th>
|
||||
<th>1点</th>
|
||||
<th>2点</th>
|
||||
<th>3点</th>
|
||||
<th>4点</th>
|
||||
<th>5点</th>
|
||||
<th>6点</th>
|
||||
<th>7点</th>
|
||||
<th>8点</th>
|
||||
<th>9点</th>
|
||||
<th>10点</th>
|
||||
<th>11点</th>
|
||||
<th>12点</th>
|
||||
<th>14点</th>
|
||||
<th>15点</th>
|
||||
<th>16点</th>
|
||||
<th>17点</th>
|
||||
<th>18点</th>
|
||||
<th>19点</th>
|
||||
<th>20点</th>
|
||||
<th>21点</th>
|
||||
<th>22点</th>
|
||||
<th>23点</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
42
src/main/webapp/WEB-INF/views/report/destIp.jsp
Normal file
42
src/main/webapp/WEB-INF/views/report/destIp.jsp
Normal file
@@ -0,0 +1,42 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
});
|
||||
</script>
|
||||
<div id="destIp" class="tab-pane fade">
|
||||
<table id="contentTable1" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>所属国家</th>
|
||||
<th>总量</th>
|
||||
<th>0点</th>
|
||||
<th>1点</th>
|
||||
<th>2点</th>
|
||||
<th>3点</th>
|
||||
<th>4点</th>
|
||||
<th>5点</th>
|
||||
<th>6点</th>
|
||||
<th>7点</th>
|
||||
<th>8点</th>
|
||||
<th>9点</th>
|
||||
<th>10点</th>
|
||||
<th>11点</th>
|
||||
<th>12点</th>
|
||||
<th>14点</th>
|
||||
<th>15点</th>
|
||||
<th>16点</th>
|
||||
<th>17点</th>
|
||||
<th>18点</th>
|
||||
<th>19点</th>
|
||||
<th>20点</th>
|
||||
<th>21点</th>
|
||||
<th>22点</th>
|
||||
<th>23点</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
42
src/main/webapp/WEB-INF/views/report/entranceId.jsp
Normal file
42
src/main/webapp/WEB-INF/views/report/entranceId.jsp
Normal file
@@ -0,0 +1,42 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
});
|
||||
</script>
|
||||
<div id="entranceId" class="tab-pane fade">
|
||||
<table id="contentTable1" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>局点</th>
|
||||
<th>总量</th>
|
||||
<th>0点</th>
|
||||
<th>1点</th>
|
||||
<th>2点</th>
|
||||
<th>3点</th>
|
||||
<th>4点</th>
|
||||
<th>5点</th>
|
||||
<th>6点</th>
|
||||
<th>7点</th>
|
||||
<th>8点</th>
|
||||
<th>9点</th>
|
||||
<th>10点</th>
|
||||
<th>11点</th>
|
||||
<th>12点</th>
|
||||
<th>14点</th>
|
||||
<th>15点</th>
|
||||
<th>16点</th>
|
||||
<th>17点</th>
|
||||
<th>18点</th>
|
||||
<th>19点</th>
|
||||
<th>20点</th>
|
||||
<th>21点</th>
|
||||
<th>22点</th>
|
||||
<th>23点</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
42
src/main/webapp/WEB-INF/views/report/label.jsp
Normal file
42
src/main/webapp/WEB-INF/views/report/label.jsp
Normal file
@@ -0,0 +1,42 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
});
|
||||
</script>
|
||||
<div id="label" class="tab-pane fade in active">
|
||||
<table id="contentTable1" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>标签</th>
|
||||
<th>总量</th>
|
||||
<th>0点</th>
|
||||
<th>1点</th>
|
||||
<th>2点</th>
|
||||
<th>3点</th>
|
||||
<th>4点</th>
|
||||
<th>5点</th>
|
||||
<th>6点</th>
|
||||
<th>7点</th>
|
||||
<th>8点</th>
|
||||
<th>9点</th>
|
||||
<th>10点</th>
|
||||
<th>11点</th>
|
||||
<th>12点</th>
|
||||
<th>14点</th>
|
||||
<th>15点</th>
|
||||
<th>16点</th>
|
||||
<th>17点</th>
|
||||
<th>18点</th>
|
||||
<th>19点</th>
|
||||
<th>20点</th>
|
||||
<th>21点</th>
|
||||
<th>22点</th>
|
||||
<th>23点</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
138
src/main/webapp/WEB-INF/views/report/list.jsp
Normal file
138
src/main/webapp/WEB-INF/views/report/list.jsp
Normal file
@@ -0,0 +1,138 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${bean.cfgName}"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
$("input[name='reportType']").each(function(){
|
||||
var type='${bean.reportType}';
|
||||
if(type && type==$(this).val()){
|
||||
$(this).parent(".btn").button("toggle");
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="action" >
|
||||
<c:forEach items="${serviceList}" var="service" >
|
||||
<c:if test="${service.functionId eq bean.functionId and action.itemCode eq service.action}">
|
||||
<div class="btn btn-primary">
|
||||
<spring:message code="${action.itemValue}"/>1000000
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${bean.cfgName}"></spring:message>
|
||||
<small><spring:message code="report_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="bean" action="${ctx}/report/list" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${bean.functionId}"/>
|
||||
<input name="cfgName" type="hidden" value="${bean.cfgName}"/>
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${bean.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<form:select path="action" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="action"/></form:option>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="action" >
|
||||
<c:forEach items="${serviceList}" var="service" >
|
||||
<c:if test="${service.functionId eq bean.functionId and action.itemCode eq service.action}">
|
||||
<form:option value="${action.itemCode}" ><spring:message code="${action.itemValue}"/></form:option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="btn-group" data-toggle="buttons">
|
||||
<label class="btn btn-default">
|
||||
<input type="radio" name="reportType" value="1"
|
||||
<c:if test="${bean.reportType==1}">checked</c:if>
|
||||
><spring:message code="日报"/>
|
||||
</label>
|
||||
<label class="btn btn-default">
|
||||
<input type="radio" name="reportType" value="2"
|
||||
<c:if test="${bean.reportType==2}">checked</c:if>
|
||||
><spring:message code="月报"/>
|
||||
</label>
|
||||
<label class="btn btn-default">
|
||||
<input type="radio" name="reportType" value="3"
|
||||
<c:if test="${bean.reportType==3}">checked</c:if>
|
||||
><spring:message code="季报"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <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>
|
||||
<sys:delRow url="${ctx}/report/test/export?functionId=${cfg.functionId}" id="contentTable" label="export" maxRow="${page.maxExportSize}"></sys:delRow>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/><i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
</div>
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<sys:message content="${message}"/>
|
||||
<br>
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
<!-- <li><a data-toggle="tab" href="#serviceType">业务类型</a></li> -->
|
||||
<li class="active"><a data-toggle="tab" href="#label">标签</a></li>
|
||||
<li><a data-toggle="tab" href="#attrType">性质</a></li>
|
||||
<li><a data-toggle="tab" href="#lwhh">来文函号</a></li>
|
||||
<li><a data-toggle="tab" href="#srcIp">境内源IP</a></li>
|
||||
<li><a data-toggle="tab" href="#destIp">各国家目的IP</a></li>
|
||||
<li><a data-toggle="tab" href="#entranceId">运营商局点</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<%@include file="/WEB-INF/views/report/label.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/attrType.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/lwhh.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/srcIp.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/destIp.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/entranceId.jsp" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
42
src/main/webapp/WEB-INF/views/report/lwhh.jsp
Normal file
42
src/main/webapp/WEB-INF/views/report/lwhh.jsp
Normal file
@@ -0,0 +1,42 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
});
|
||||
</script>
|
||||
<div id="lwhh" class="tab-pane fade">
|
||||
<table id="contentTable1" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>性质</th>
|
||||
<th>总量</th>
|
||||
<th>0点</th>
|
||||
<th>1点</th>
|
||||
<th>2点</th>
|
||||
<th>3点</th>
|
||||
<th>4点</th>
|
||||
<th>5点</th>
|
||||
<th>6点</th>
|
||||
<th>7点</th>
|
||||
<th>8点</th>
|
||||
<th>9点</th>
|
||||
<th>10点</th>
|
||||
<th>11点</th>
|
||||
<th>12点</th>
|
||||
<th>14点</th>
|
||||
<th>15点</th>
|
||||
<th>16点</th>
|
||||
<th>17点</th>
|
||||
<th>18点</th>
|
||||
<th>19点</th>
|
||||
<th>20点</th>
|
||||
<th>21点</th>
|
||||
<th>22点</th>
|
||||
<th>23点</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
43
src/main/webapp/WEB-INF/views/report/srcIp.jsp
Normal file
43
src/main/webapp/WEB-INF/views/report/srcIp.jsp
Normal file
@@ -0,0 +1,43 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
});
|
||||
</script>
|
||||
<div id="srcIp" class="tab-pane fade">
|
||||
<table id="contentTable1" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>所属省</th>
|
||||
<th>所属市</th>
|
||||
<th>总量</th>
|
||||
<th>0点</th>
|
||||
<th>1点</th>
|
||||
<th>2点</th>
|
||||
<th>3点</th>
|
||||
<th>4点</th>
|
||||
<th>5点</th>
|
||||
<th>6点</th>
|
||||
<th>7点</th>
|
||||
<th>8点</th>
|
||||
<th>9点</th>
|
||||
<th>10点</th>
|
||||
<th>11点</th>
|
||||
<th>12点</th>
|
||||
<th>14点</th>
|
||||
<th>15点</th>
|
||||
<th>16点</th>
|
||||
<th>17点</th>
|
||||
<th>18点</th>
|
||||
<th>19点</th>
|
||||
<th>20点</th>
|
||||
<th>21点</th>
|
||||
<th>22点</th>
|
||||
<th>23点</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
128
src/main/webapp/WEB-INF/views/report/test.jsp
Normal file
128
src/main/webapp/WEB-INF/views/report/test.jsp
Normal file
@@ -0,0 +1,128 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${bean.cfgName}"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<div class="btn btn-primary">
|
||||
<spring:message code="阻断数据量"></spring:message>1000000
|
||||
</div>
|
||||
<div class="btn btn-default">
|
||||
<spring:message code="监测数据量"></spring:message>1000000
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${bean.cfgName}"></spring:message>
|
||||
<small><spring:message code="report_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="bean" action="${ctx}/report/test/list" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${bean.functionId}"/>
|
||||
<input name="cfgName" type="hidden" value="${bean.cfgName}"/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${bean.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<form:select path="action" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="action"/></form:option>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="action" >
|
||||
<form:option value="${action.itemCode}" ><spring:message code="${action.itemValue}"/></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="form-control" ><spring:message code="begin_date"/></span>
|
||||
</div>
|
||||
<input name="searchReportStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||
value="${bean.searchReportStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="form-control" ><spring:message code="end_date"/></span>
|
||||
</div>
|
||||
<input name="searchReportEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||
value="${cfg.searchReportEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <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>
|
||||
<sys:delRow url="${ctx}/report/test/export?functionId=${cfg.functionId}" id="contentTable" label="export" maxRow="${page.maxExportSize}"></sys:delRow>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/><i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
</div>
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<sys:message content="${message}"/>
|
||||
<br>
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
<!-- <li><a data-toggle="tab" href="#serviceType">业务类型</a></li> -->
|
||||
<li class="active"><a data-toggle="tab" href="#label">标签</a></li>
|
||||
<li><a data-toggle="tab" href="#attrType">性质</a></li>
|
||||
<li><a data-toggle="tab" href="#lwhh">来文函号</a></li>
|
||||
<li><a data-toggle="tab" href="#srcIp">境内源IP</a></li>
|
||||
<li><a data-toggle="tab" href="#destIp">各国家目的IP</a></li>
|
||||
<li><a data-toggle="tab" href="#entranceId">运营商局点</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<%@include file="/WEB-INF/views/report/label.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/attrType.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/lwhh.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/srcIp.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/destIp.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/entranceId.jsp" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user