拦截IP相关功能提交
This commit is contained in:
@@ -27,7 +27,14 @@ public class FunctionRegionDict extends BaseCfg<FunctionRegionDict> {
|
||||
private String configPortPattern;
|
||||
private String configDirection;
|
||||
private String configProtocol;
|
||||
private Integer configRegionSort;
|
||||
|
||||
public Integer getConfigRegionSort() {
|
||||
return configRegionSort;
|
||||
}
|
||||
public void setConfigRegionSort(Integer configRegionSort) {
|
||||
this.configRegionSort = configRegionSort;
|
||||
}
|
||||
public String getConfigIpPortShow() {
|
||||
return configIpPortShow;
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@ public class FunctionServiceDict extends BaseCfg<FunctionServiceDict> {
|
||||
private String serviceName;
|
||||
private String serviceDesc;
|
||||
private String actionCode;
|
||||
private Integer regionCode;
|
||||
private String regionCode;
|
||||
|
||||
public Integer getRegionCode() {
|
||||
public String getRegionCode() {
|
||||
return regionCode;
|
||||
}
|
||||
public void setRegionCode(Integer regionCode) {
|
||||
public void setRegionCode(String regionCode) {
|
||||
this.regionCode = regionCode;
|
||||
}
|
||||
public Integer getDictId() {
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.nis.domain.callback;
|
||||
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
/**
|
||||
* http代理文件策略
|
||||
* @author nanfang
|
||||
*
|
||||
*/
|
||||
public class ProxyFileStrategyCfg extends BaseCfg<ProxyFileStrategyCfg> {
|
||||
private static final long serialVersionUID = 4283944377949702481L;
|
||||
public final static String TABLE_NAME = "PROXY_FILE_STRATEGY_CFG";//对应表名
|
||||
private String fileId;//glaxy返回的文件id
|
||||
private String fileDesc;//文件描述
|
||||
private String url;//文件保存的url
|
||||
private String contentType;//内容类型,如text/html,取字典表contentType
|
||||
private String md5;//文件md5值
|
||||
private Long contentLength;//文件长度
|
||||
|
||||
public ProxyFileStrategyCfg() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getFileId() {
|
||||
return fileId;
|
||||
}
|
||||
public void setFileId(String fileId) {
|
||||
this.fileId = fileId;
|
||||
}
|
||||
public String getFileDesc() {
|
||||
return fileDesc;
|
||||
}
|
||||
public void setFileDesc(String fileDesc) {
|
||||
this.fileDesc = fileDesc;
|
||||
}
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
public void setContentType(String contentType) {
|
||||
this.contentType = contentType;
|
||||
}
|
||||
public Long getContentLength() {
|
||||
return contentLength;
|
||||
}
|
||||
public void setContentLength(Long contentLength) {
|
||||
this.contentLength = contentLength;
|
||||
}
|
||||
public String getMd5() {
|
||||
return md5;
|
||||
}
|
||||
public void setMd5(String md5) {
|
||||
this.md5 = md5;
|
||||
}
|
||||
|
||||
}
|
||||
147
src/main/java/com/nis/domain/configuration/AppSslCertCfg.java
Normal file
147
src/main/java/com/nis/domain/configuration/AppSslCertCfg.java
Normal file
@@ -0,0 +1,147 @@
|
||||
/**
|
||||
*@Title: BaseStringConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:26:02
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* APP SSL证书特征配置
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class AppSslCertCfg extends BaseCfg<AppSslCertCfg> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -4366457794248757698L;
|
||||
private static final String tableName="app_ssl_cert_cfg";
|
||||
@Expose
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private Integer ratelimit;
|
||||
private Integer appCode;//specific_service_cfg表一级节点的spec_service_code
|
||||
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
||||
private Integer specServiceId;
|
||||
private String district;
|
||||
private String cfgKeywords;
|
||||
private String appName;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
}
|
||||
|
||||
public void setExprType(Integer exprType) {
|
||||
this.exprType = exprType;
|
||||
}
|
||||
|
||||
public Integer getMatchMethod() {
|
||||
return matchMethod;
|
||||
}
|
||||
|
||||
public void setMatchMethod(Integer matchMethod) {
|
||||
this.matchMethod = matchMethod;
|
||||
}
|
||||
|
||||
public Integer getIsHexbin() {
|
||||
return isHexbin;
|
||||
}
|
||||
|
||||
public void setIsHexbin(Integer isHexbin) {
|
||||
this.isHexbin = isHexbin;
|
||||
}
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.isHexbin = 0;
|
||||
}
|
||||
|
||||
|
||||
public Integer getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public Integer getRatelimit() {
|
||||
return ratelimit;
|
||||
}
|
||||
|
||||
public void setRatelimit(Integer ratelimit) {
|
||||
this.ratelimit = ratelimit;
|
||||
}
|
||||
public Integer getAppCode() {
|
||||
return appCode;
|
||||
}
|
||||
public void setAppCode(Integer appCode) {
|
||||
this.appCode = appCode;
|
||||
}
|
||||
public Integer getSpecServiceId() {
|
||||
return specServiceId;
|
||||
}
|
||||
public void setSpecServiceId(Integer specServiceId) {
|
||||
this.specServiceId = specServiceId;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
|
||||
public String getAppName() {
|
||||
return appName;
|
||||
}
|
||||
|
||||
public void setAppName(String appName) {
|
||||
this.appName = appName;
|
||||
}
|
||||
|
||||
public Integer getBehavCode() {
|
||||
return behavCode;
|
||||
}
|
||||
|
||||
public void setBehavCode(Integer behavCode) {
|
||||
this.behavCode = behavCode;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
@@ -196,6 +197,18 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
*/
|
||||
protected Integer functionId;
|
||||
|
||||
/**
|
||||
* do_log属性在界面(do_log:0不需要1记录所有日志2只记录结构化日志。默认是2)
|
||||
*/
|
||||
protected Integer doLog = Constants.MAAT_CFG_DOLOG_DEFAULT;
|
||||
|
||||
|
||||
public Integer getDoLog() {
|
||||
return doLog;
|
||||
}
|
||||
public void setDoLog(Integer doLog) {
|
||||
this.doLog = doLog;
|
||||
}
|
||||
/**
|
||||
* cfgRegionCode
|
||||
* @return cfgRegionCode
|
||||
|
||||
@@ -53,6 +53,8 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
private List<FileDigestCfg> digestList;
|
||||
private List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList;//新增SUBSCRIBE_ID
|
||||
private NtcSubscribeIdCfg ntcSubscribeIdCfg;
|
||||
private InterceptPktBin interceptPktBin;
|
||||
private List<InterceptPktBin> interceptPktBinList;
|
||||
|
||||
private Long dnsStrategyId;
|
||||
private String dnsStrategyName;
|
||||
@@ -63,6 +65,18 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
private List<P2pKeywordCfg> p2pKeywordList;
|
||||
|
||||
|
||||
public InterceptPktBin getInterceptPktBin() {
|
||||
return interceptPktBin;
|
||||
}
|
||||
public void setInterceptPktBin(InterceptPktBin interceptPktBin) {
|
||||
this.interceptPktBin = interceptPktBin;
|
||||
}
|
||||
public void setInterceptPktBinList(List<InterceptPktBin> interceptPktBinList) {
|
||||
this.interceptPktBinList = interceptPktBinList;
|
||||
}
|
||||
public List<InterceptPktBin> getInterceptPktBinList() {
|
||||
return interceptPktBinList;
|
||||
}
|
||||
public List<NtcSubscribeIdCfg> getNtcSubscribeIdCfgList() {
|
||||
return ntcSubscribeIdCfgList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
*@Title: DnsDomainConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午3:34:14
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: DnsDomainConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午3:34:14
|
||||
* @version V1.0
|
||||
*/
|
||||
public class InterceptPktBin extends ComplexkeywordCfg {
|
||||
private static final String tableName="pxy_intercept_pkt_bin";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -2761078174512000577L;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
/**
|
||||
* tablename
|
||||
* @return tablename
|
||||
*/
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public final class Constants {
|
||||
/**
|
||||
* MaatConfig 默认值
|
||||
*/
|
||||
public static Integer MAAT_CFG_DOLOG_DEFAULT=Configurations.getIntProperty("maat_cfg_dolog_default", 1);
|
||||
public static Integer MAAT_CFG_DOLOG_DEFAULT=Configurations.getIntProperty("maat_cfg_dolog_default", 2);
|
||||
public static Integer MAAT_CFG_DOLOG_DOBLACKLIST_DEFAULT=Configurations.getIntProperty("maat_cfg_dolog_doblacklist_default", 1);
|
||||
public static Integer MAAT_CFG_DOLOG_CONFIGPERCENT_DEFAULT=Configurations.getIntProperty("maat_cfg_dolog_configpercent_default", 100);
|
||||
public static Integer MAAT_CFG_DOLOG_CONFIGOPTION_DEFAULT=Configurations.getIntProperty("maat_cfg_dolog_configoption_default", 1);
|
||||
@@ -480,6 +480,7 @@ public final class Constants {
|
||||
public static final String REDIRECT_RESPONSE_CODE_KEY = Configurations.getStringProperty("redirect_response_code_key","code");
|
||||
public static final String REDIRECT_URL_KEY = Configurations.getStringProperty("redirect_url_key","url");
|
||||
public static final String REDIRECT_CONTENT_KEY = Configurations.getStringProperty("redirect_content_key","content");
|
||||
public static final String CONTENT_FILE_ID_KEY = Configurations.getStringProperty("content_file_id_key","content_file_id");
|
||||
public static final String REDIRECT_RESPONSE_CODE_STARTWITH = Configurations.getStringProperty("redirect_response_code_startwith","30");
|
||||
public static final String REPLACE_ZONE_KEY = Configurations.getStringProperty("replace_zone_key","zone");
|
||||
public static final String REPLACE_SUBSTITUTE_KEY = Configurations.getStringProperty("replace_substitute_key","substitute");
|
||||
|
||||
@@ -22,6 +22,7 @@ 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.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
@@ -633,4 +634,114 @@ public class AppCfgController extends BaseController {
|
||||
appCfgService.updateAppByteCfgValid(isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/app/byteCfgList?functionId="+functionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* APP ssl证书特征配置 列表
|
||||
* @param model
|
||||
* @param cfg
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"sslCfgList"})
|
||||
public String sslCfgList(Model model,@ModelAttribute("cfg")AppSslCertCfg cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<AppSslCertCfg> searchPage=new Page<AppSslCertCfg>(request,response,"r");
|
||||
Page<AppSslCertCfg> page = appCfgService.findAppSslList(searchPage, cfg);
|
||||
for(AppSslCertCfg entity:page.getList()){
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
||||
entity.setAppName(app.getSpecServiceName());
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/app/appSslCfgList";
|
||||
}
|
||||
/**
|
||||
* APP ssl证书特征配置表单(新增/修改)
|
||||
* @param model
|
||||
* @param ids
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"sslCfgForm"})
|
||||
@RequiresPermissions(value={"app:ssl:config"})
|
||||
public String sslCfgForm(Model model,String ids,AppSslCertCfg entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = appCfgService.getAppSslCfg(Long.parseLong(ids));
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
}
|
||||
model.addAttribute("_cfg", entity);
|
||||
return "/cfg/app/appSslCfgForm";
|
||||
}
|
||||
/**
|
||||
* APP ssl证书特征配置(新增/修改)提交
|
||||
* @param model
|
||||
* @param request
|
||||
* @param response
|
||||
* @param entity
|
||||
* @param redirectAttributes
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"saveAppSslCfg"})
|
||||
@RequiresPermissions(value={"app:ssl:config"})
|
||||
public String saveAppSslCfg(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
AppSslCertCfg entity,RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
SpecificServiceCfg specificService = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
||||
if(specificService!=null){
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppSslCfg(entity);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/sslCfgList?functionId="+entity.getFunctionId();
|
||||
}
|
||||
/**
|
||||
* APP ssl证书特征配置 审核
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids
|
||||
* @param functionId
|
||||
* @param redirectAttributes
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"auditAppSslCfg"})
|
||||
@RequiresPermissions(value={"app:ssl:confirm"})
|
||||
public String auditAppSslCfg(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||
AppSslCertCfg entity = new AppSslCertCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = appCfgService.getAppSslCfg(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appCfgService.auditAppSslCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
logger.info("app SSL配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/app/sslCfgList?functionId="+functionId;
|
||||
}
|
||||
/**
|
||||
* APP ssl证书特征配置 删除
|
||||
* @param isValid
|
||||
* @param ids
|
||||
* @param functionId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"updateAppSslCfgValid"})
|
||||
@RequiresPermissions(value={"app:ssl:config"})
|
||||
public String updateAppSslCfgValid(Integer isValid,String ids,Integer functionId) {
|
||||
appCfgService.updateAppSslCfgValid(isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/app/sslCfgList?functionId="+functionId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,11 +56,11 @@ public class IpController extends CommonController{
|
||||
model.addAttribute("dropAction",Constants.DROP_ACTION);
|
||||
model.addAttribute("urlPrefix","/ntc/iplist");
|
||||
model.addAttribute("requiresPermissionPrefix","iplist");
|
||||
if(specialFunctionId!=null && "ipsec".equals(specialFunctionId)) {
|
||||
return "/cfg/ipsec/ipForm";
|
||||
}else if(specialFunctionId!=null && "ipaddr".equals(specialFunctionId)) {
|
||||
return "/cfg/ipaddr/ipForm";
|
||||
}
|
||||
// if(specialFunctionId!=null && "ipsec".equals(specialFunctionId)) {
|
||||
// return "/cfg/ipsec/ipForm";
|
||||
// }else if(specialFunctionId!=null && "ipaddr".equals(specialFunctionId)) {
|
||||
// return "/cfg/ipaddr/ipForm";
|
||||
// }
|
||||
return "/cfg/common/ipForm";
|
||||
}
|
||||
@RequestMapping(value = {"saveOrUpdate"})
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
/**
|
||||
*@Title: ControlController.java
|
||||
*@Package com.nis.web.controller.configuration.proxy
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年6月22日 下午4:35:42
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.web.controller.configuration.proxy;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
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.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.ToMaatResult.ResponseData;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.configuration.CommonController;
|
||||
|
||||
/**
|
||||
* @ClassName: ControlController.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年6月22日 下午4:35:42
|
||||
* @version V1.0
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/proxy/fileStrategy")
|
||||
public class FileStrategyController extends CommonController {
|
||||
|
||||
@RequestMapping(value = {"list"})
|
||||
public String fileStrategyList(ProxyFileStrategyCfg cfg,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<ProxyFileStrategyCfg> page = proxyFileStrategyService.findPage(new Page<ProxyFileStrategyCfg>(request, response,"a"), cfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("cfg", cfg);
|
||||
initPageCondition(model);
|
||||
return "/cfg/proxy/fileStrategy/list";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"form"})
|
||||
@RequiresPermissions(value={"proxy:fileStrategy:config"})
|
||||
public String fileform(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response
|
||||
,@ModelAttribute("cfg")ProxyFileStrategyCfg cfg
|
||||
,String ids
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg = proxyFileStrategyService.getCfgById(Long.valueOf(ids));
|
||||
}
|
||||
// initFormCondition(model);
|
||||
initFormCondition(model, cfg);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/proxy/fileStrategy/form";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存 文件
|
||||
* 1、将文件上传到 service 接口
|
||||
* 2、将文件信息及 1返回的结果 保存到数据库
|
||||
* @param model
|
||||
* @param request
|
||||
* @param response
|
||||
* @param cfgFile
|
||||
* @param cfg
|
||||
* @param redirectAttributes
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions(value={"proxy:fileStrategy:config"})
|
||||
@RequestMapping(value = {"saveOrUpdate"})
|
||||
public String saveOrUpdate(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,MultipartFile cfgFile,
|
||||
@ModelAttribute("cfg")ProxyFileStrategyCfg cfg,
|
||||
RedirectAttributes redirectAttributes){
|
||||
File file = null;
|
||||
try{
|
||||
if(cfgFile != null) {
|
||||
String filename = cfgFile.getOriginalFilename();
|
||||
String prefix = FileUtils.getPrefix(filename, false);
|
||||
String suffix = FileUtils.getSuffix(filename, false);
|
||||
file = File.createTempFile("file_"+ prefix, suffix);
|
||||
cfgFile.transferTo(file);//复制文件
|
||||
String md5 = FileUtils.getFileMD5(file);
|
||||
Map<String,Object> srcMap = Maps.newHashMap();
|
||||
srcMap.put("filetype", suffix);
|
||||
srcMap.put("datatype", "dbSystem");//源文件存入数据中心
|
||||
srcMap.put("createTime",new Date());
|
||||
srcMap.put("key",prefix);
|
||||
srcMap.put("fileName", filename);
|
||||
srcMap.put("checksum", md5);
|
||||
ToMaatResult result = ConfigServiceUtil.postFileCfg(null, file, JsonMapper.toJsonString(srcMap));
|
||||
logger.info("http 重定向阻断文件上传响应信息:"+JsonMapper.toJsonString(result));
|
||||
String srcAccessUrl = null;
|
||||
if(!StringUtil.isEmpty(result)){
|
||||
ResponseData data = result.getData();
|
||||
srcAccessUrl=data.getAccessUrl();
|
||||
cfg.setUrl(srcAccessUrl);;
|
||||
}
|
||||
cfg.setMd5(md5);//文件md5值
|
||||
cfg.setContentLength(file.length());//文件长度
|
||||
cfg.setFileId(md5);
|
||||
}
|
||||
proxyFileStrategyService.saveOrUpdate(cfg);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}finally {
|
||||
if(file != null) {
|
||||
file.delete();//删除临时文件
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/fileStrategy/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"delete"})
|
||||
@RequiresPermissions(value={"proxy:fileStrategy:config"})
|
||||
public String delete(Integer isAudit,Integer isValid,
|
||||
String ids,
|
||||
Integer functionId,
|
||||
RedirectAttributes redirectAttributes){
|
||||
proxyFileStrategyService.update(isAudit,isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/proxy/fileStrategy/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = {"audit"})
|
||||
@RequiresPermissions(value={"proxy:fileStrategy:confirm"})
|
||||
public String audit(Integer isAudit,Integer isValid,String ids
|
||||
,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
proxyFileStrategyService.audit(isAudit, isValid, functionId, ids);
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/fileStrategy/list?functionId="+functionId;
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
import com.nis.domain.configuration.HttpReqHeadCfg;
|
||||
@@ -42,6 +43,9 @@ public class HttpRedirectPolicyController extends BaseController{
|
||||
Page<CfgIndexInfo> page = httpRedirectCfgService.getHttpRedirectList(searchPage, cfg);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model,cfg);
|
||||
//获取所有的响应文件内容,阻断,或重定向时可以选择
|
||||
List<ProxyFileStrategyCfg> allProxyFileStrategys = proxyFileStrategyService.getProxyFileStrategyCfgList(new ProxyFileStrategyCfg());
|
||||
model.addAttribute("allProxyFileStrategys", allProxyFileStrategys);
|
||||
return "/cfg/proxy/control/httpRedirectList";
|
||||
}
|
||||
@RequestMapping(value = {"form"})
|
||||
@@ -136,8 +140,10 @@ public class HttpRedirectPolicyController extends BaseController{
|
||||
entity.setIpPortList(ipPortList);
|
||||
initFormCondition(model,entity);
|
||||
}
|
||||
|
||||
//获取所有的响应文件内容,阻断,或重定向时可以选择
|
||||
List<ProxyFileStrategyCfg> allProxyFileStrategys = proxyFileStrategyService.getProxyFileStrategyCfgList(new ProxyFileStrategyCfg());
|
||||
model.addAttribute("_cfg", entity);
|
||||
model.addAttribute("allProxyFileStrategys", allProxyFileStrategys);
|
||||
return "/cfg/proxy/control/httpRedirectForm";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.nis.web.controller.configuration.proxy;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
@@ -13,7 +16,10 @@ 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;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.template.IpAddrTemplate;
|
||||
@@ -28,13 +34,22 @@ import com.nis.web.controller.configuration.CommonController;
|
||||
@RequestMapping("${adminPath}/proxy/intercept")
|
||||
public class InterceptController extends CommonController{
|
||||
@RequestMapping(value = {"/ip/list"})
|
||||
// @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);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/intercept/interceptIpList";
|
||||
}
|
||||
/*@RequestMapping(value = {"/ip/list"})
|
||||
// @RequiresPermissions(value={"intercept:ip:config","intercept:ip:confirm"},logical=Logical.OR)
|
||||
public String ipList(String cfgName,Model model,@ModelAttribute("cfg")IpPortCfg cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
this._ipList(cfgName,model, cfg, request, response);
|
||||
model.addAttribute("urlPrefix","/proxy/intercept/ip");
|
||||
model.addAttribute("requiresPermissionPrefix","intercept:ip");
|
||||
return "/cfg/common/ipList";
|
||||
}
|
||||
}*/
|
||||
@RequestMapping(value = {"/domain/list"})
|
||||
// @RequiresPermissions(value={"intercept:domain:config","intercept:domain:confirm"},logical=Logical.OR)
|
||||
public String domainList(String cfgName,Model model,@ModelAttribute("cfg")HttpUrlCfg cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
@@ -43,14 +58,31 @@ public class InterceptController extends CommonController{
|
||||
model.addAttribute("requiresPermissionPrefix","intercept:domain");
|
||||
return "/cfg/common/domainList";
|
||||
}
|
||||
@RequestMapping(value = {"/ip/form"})
|
||||
|
||||
@RequestMapping(value = {"/interceptIpForm"})
|
||||
@RequiresPermissions(value={"intercept:ip:config"})
|
||||
public String dnsForm(Model model,String ids,CfgIndexInfo entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = interceptCfgService.getInterceptIpCfg(Long.parseLong(ids));
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
}
|
||||
//TODO获取证书信息
|
||||
//List<DnsResStrategy> resStrategys=dnsResStrategyService.findDnsResStrategys(null, 1,1);
|
||||
//model.addAttribute("dnsResStrategys", resStrategys);
|
||||
|
||||
model.addAttribute("_cfg", entity);
|
||||
return "/cfg/intercept/interceptIpForm";
|
||||
}
|
||||
/*@RequestMapping(value = {"/ip/form"})
|
||||
@RequiresPermissions(value={"intercept:ip:config"})
|
||||
public String ipForm(String cfgName,Model model,String ids,Integer functionId,BaseIpCfg entity) {
|
||||
this._ipForm(cfgName,model, ids, functionId, entity);
|
||||
model.addAttribute("urlPrefix","/proxy/intercept/ip");
|
||||
model.addAttribute("requiresPermissionPrefix","intercept:ip");
|
||||
return "/cfg/common/ipForm";
|
||||
}
|
||||
}*/
|
||||
@RequestMapping(value = {"/domain/form"})
|
||||
@RequiresPermissions(value={"intercept:domain:config"})
|
||||
public String domainForm(String cfgName,Model model,String ids,Integer functionId,HttpUrlCfg entity) {
|
||||
@@ -59,11 +91,16 @@ public class InterceptController extends CommonController{
|
||||
model.addAttribute("requiresPermissionPrefix","intercept:domain");
|
||||
return "/cfg/common/domainForm";
|
||||
}
|
||||
@RequestMapping(value = {"/ip/saveOrUpdate"})
|
||||
@RequestMapping(value = {"saveOrUpdate"})
|
||||
public String saveInterceptIpCfg(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) {
|
||||
interceptCfgService.saveInterceptIpCfg(entity);
|
||||
return "redirect:" + adminPath +"/proxy/intercept/ip/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
/*@RequestMapping(value = {"/ip/saveOrUpdate"})
|
||||
public String saveOrUpdateIp(String cfgName,RedirectAttributes model, IpPortCfg cfg) {
|
||||
this._saveOrUpdateIp(cfgName,model, cfg);
|
||||
return "redirect:" + adminPath +"/proxy/intercept/ip/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
}*/
|
||||
@RequestMapping(value = {"/domain/saveOrUpdate"})
|
||||
public String saveOrUpdateDomain(String cfgName,RedirectAttributes model, HttpUrlCfg cfg) {
|
||||
this._saveOrUpdateDomain(cfgName, model, cfg);
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.aspectj.util.FileUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcIpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/log/ntc/p2pLogs")
|
||||
public class B2pLogController extends BaseController {
|
||||
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(@ModelAttribute("log") NtcIpLog log, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
try {
|
||||
PageLog<NtcIpLog> page = new PageLog<NtcIpLog>(request, response);
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_P2P_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
logger.info("查询结果:" + recv);
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
Gson gson = new GsonBuilder().create();
|
||||
LogRecvData<NtcIpLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcIpLog>>(){}.getType());
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
page.setList(fromJson.getData().getList());
|
||||
List<NtcIpLog> list = page.getList();
|
||||
for (NtcIpLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, e.getMessage());
|
||||
}
|
||||
|
||||
return "/log/ntc/p2pList";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,332 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.FatalBeanException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.AvFileSampleCfg;
|
||||
import com.nis.domain.configuration.AvSignSampleCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.DnsDomainCfg;
|
||||
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.InterceptPktBin;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.SslKeywordCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||
import com.nis.domain.maat.MaatCfg.IpCfg;
|
||||
import com.nis.domain.maat.MaatCfg.StringCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.IpUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||
import com.nis.web.dao.configuration.InterceptCfgDao;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
import com.nis.web.dao.configuration.StringCfgDao;
|
||||
import com.nis.web.dao.configuration.WebsiteCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
/**
|
||||
* 网站相关配置事务类
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
@Autowired
|
||||
protected WebsiteCfgDao websiteCfgDao;
|
||||
@Autowired
|
||||
protected InterceptCfgDao interceptCfgDao;
|
||||
@Autowired
|
||||
protected AreaIpCfgDao areaIpCfgDao;
|
||||
|
||||
public CfgIndexInfo getInterceptIpCfg(Long cfgId){
|
||||
CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId);
|
||||
List<IpPortCfg> ipPortList = websiteCfgDao.getIpPortList(entity);
|
||||
List<InterceptPktBin> pktBinList = interceptCfgDao.getInterceptPktBin(entity);
|
||||
entity.setIpPortList(ipPortList);
|
||||
entity.setInterceptPktBinList(pktBinList);
|
||||
return entity;
|
||||
}
|
||||
public Page<CfgIndexInfo> getWebsiteList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
List<CfgIndexInfo> list = websiteCfgDao.getWebsiteList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 保存dns配置
|
||||
* @param entity
|
||||
*/
|
||||
|
||||
public void saveInterceptIpCfg(CfgIndexInfo entity){
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
if(entity.getCfgId()==null){
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
List<Integer> idList = ConfigServiceUtil.getId(1, 1);
|
||||
if(idList!=null && idList.size()>0){
|
||||
compileId = idList.get(0);
|
||||
}
|
||||
entity.setCompileId(compileId);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
websiteCfgDao.saveCfgIndex(entity);
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveIpPortCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getInterceptPktBinList()!=null){
|
||||
for(InterceptPktBin cfg:entity.getInterceptPktBinList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
interceptCfgDao.insertInterceptPktBin(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
cfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
entity.setEditTime(new Date());
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
|
||||
websiteCfgDao.updateCfgIndex(entity);
|
||||
//无效子配置后,再新增子配置
|
||||
interceptCfgDao.deleteInterceptIpCfg(entity);
|
||||
interceptCfgDao.deleteInterceptPktBin(entity);
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
area.setCompileId(entity.getCompileId());
|
||||
area.setFunctionId(entity.getFunctionId());
|
||||
areaIpCfgDao.deleteAreaIpCfg(area);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveIpPortCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getInterceptPktBinList()!=null){
|
||||
for(InterceptPktBin cfg:entity.getInterceptPktBinList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
interceptCfgDao.insertInterceptPktBin(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
cfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgDesc","cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**//**
|
||||
* dns配置删除
|
||||
* @param isValid
|
||||
* @param ids
|
||||
* @param functionId
|
||||
*//*
|
||||
public void updateDnsCfgValid(Integer isValid,String ids,Integer functionId){
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
entity.setFunctionId(functionId);
|
||||
websiteCfgDao.updateCfgValid(entity);
|
||||
//查询子配置
|
||||
entity = this.getDnsCfg(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());
|
||||
websiteCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if(entity.getDomainList()!=null && entity.getDomainList().size()>0)
|
||||
{
|
||||
SslKeywordCfg cfg = new SslKeywordCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(DnsDomainCfg.getTablename());
|
||||
websiteCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
||||
AreaIpCfg cfg = new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
websiteCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
*//**
|
||||
* dns配置审核
|
||||
* @param entity
|
||||
* @param isAudit
|
||||
* @throws MaatConvertException
|
||||
*//*
|
||||
public void auditDnsCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
||||
//修改数据库审核状态信息
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
websiteCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
List<GroupCfg> groupRelationList = new ArrayList();
|
||||
List<IpCfg> ipRegionList = new ArrayList();
|
||||
List<StringCfg> strRegionList = new ArrayList();
|
||||
List<NumBoundaryCfg> numRegionList = new ArrayList();
|
||||
List<DigestCfg> digestRegionList = new ArrayList();
|
||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||
|
||||
//查询子配置并修改审核状态
|
||||
entity = this.getDnsCfg(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());
|
||||
websiteCfgDao.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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getDomainList()!=null && entity.getDomainList().size()>0){
|
||||
DnsDomainCfg cfg = new DnsDomainCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(DnsDomainCfg.getTablename());
|
||||
websiteCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(strRegionList,entity.getDomainList(),2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||
AreaIpCfg cfg = new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
websiteCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
areaIpRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
maatCfg.setAction(entity.getAction());
|
||||
maatCfg.setAuditTime(entity.getAuditTime());
|
||||
maatCfg.setIpRegionList(ipRegionList);
|
||||
maatCfg.setStrRegionList(strRegionList);
|
||||
maatCfg.setNumRegionList(numRegionList);
|
||||
maatCfg.setDigestRegionList(digestRegionList);
|
||||
maatCfg.setGroupRelationList(groupRelationList);
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
// dns reject userRegion=;dnsStrategyId;
|
||||
if(!StringUtil.isEmpty(entity.getDnsStrategyId())){
|
||||
// maatCfg.setUserRegion(Constants.USER_REGION_SPLIT+entity.getDnsStrategyId()+Constants.USER_REGION_SPLIT);
|
||||
maatCfg.setUserRegion(Constants.DNS_STRATEGY_USER_REGION_KEY+"="+entity.getDnsStrategyId());
|
||||
}
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("dns配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
logger.info("dns配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("dns配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||
logger.info("dns配置取消配置响应信息:"+result.getMsg());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
INSERT INTO function_service_dict
|
||||
()
|
||||
VALUES
|
||||
(108, 200, 0, 64, 'ratelimit', 531, 'ip_intercepter_ratelimit', '', 1,null , null,null , null,null );
|
||||
|
||||
INSERT INTO function_service_dict
|
||||
()
|
||||
VALUES
|
||||
(109, 201, 0, 64, 'ratelimit', 541, 'domain_intercepter_ratelimit', '', 1,null , null,null ,null,null );
|
||||
|
||||
|
||||
INSERT INTO function_service_dict
|
||||
()
|
||||
VALUES
|
||||
(110, 200, 0, 80, 'replace', 551, 'ip_intercepter_replace', '', 1,null , null,null , null,null );
|
||||
|
||||
INSERT INTO function_service_dict
|
||||
()
|
||||
VALUES
|
||||
(111, 201, 0, 80, 'replace', 561, 'domain_intercepter_replace', '', 1,null , null,null ,null,null );
|
||||
|
||||
|
||||
INSERT INTO function_region_dict
|
||||
(`config_service_type`, `config_multi_keywords`, `config_expr_type`, `config_hex`, `config_match_method`, `dict_id`, `function_id`, `config_region_code`, `config_region_value`, `config_district`, `config_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_maat`, `region_type`, `config_ip_type`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`)
|
||||
VALUES
|
||||
('', '0', '0,1', '0,1,2', '0,1,2,3', 167, 200, 2, 'PXY_INTERCEPT_PKT_BIN', '', 'PXY<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 1, NULL, NULL, NULL, NULL, 1, 2, '', '', '', '', '', '');
|
||||
@@ -2,7 +2,7 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
console.log("调用须知:调用本页面函数在common.js里,并且需要配置字典MAAT_SERVICE中的项")
|
||||
//console.log("调用须知:调用本页面函数在common.js里,并且需要配置字典MAAT_SERVICE中的项")
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="import_modal" tabindex="-1" role="dialog" aria-labelledby="mo" aria-hidden="true">
|
||||
|
||||
@@ -6,7 +6,7 @@ $(function(){
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="row">
|
||||
<div class="row areaInfo">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_area_block"/></label>
|
||||
|
||||
@@ -23,22 +23,6 @@
|
||||
<div for="ipType"></div>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${specialProtocol!=null and specialProtocol eq 'ipsec'}">
|
||||
<div class="col-md-6 ipsec">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="protocol" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('IPSEC_PROTOCOL')}" var="protocolC">
|
||||
<option value="${protocolC.itemCode}" <c:if test="${_cfg.protocol==protocolC.itemCode || (_cfg.protocol==null && protocolC.itemCode==0)}">selected</c:if>><spring:message code="${protocolC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="protocolId" value="0">
|
||||
</div>
|
||||
<div for="protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@@ -130,37 +114,20 @@
|
||||
<div class="row protocol">
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${specialProtocol!=null and specialProtocol eq 'tunnel'}">
|
||||
<c:forEach items="${fns:getDictList('TUNNEL_PROTOCOL')}" var="protocolC">
|
||||
<c:if test="${protocolC.itemValue eq 'default'}">
|
||||
<input type="hidden" name="protocol" value="${protocolC.itemCode}">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<c:if test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="hidden" name="protocolId" value="${service.protocolId }">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:when test="${specialProtocol!=null and specialProtocol eq 'ipsec'}"></c:when>
|
||||
<c:otherwise>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="protocol" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
|
||||
<option value="${protocolC.itemCode}" <c:if test="${_cfg.protocol==protocolC.itemCode || (_cfg.protocol==null && protocolC.itemCode==0)}">selected</c:if>><spring:message code="${protocolC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="protocolId" value="0">
|
||||
</div>
|
||||
<div for="protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="protocol" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
|
||||
<option value="${protocolC.itemCode}" <c:if test="${_cfg.protocol==protocolC.itemCode || (_cfg.protocol==null && protocolC.itemCode==0)}">selected</c:if>><spring:message code="${protocolC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="protocolId" value="0">
|
||||
</div>
|
||||
<div for="protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
|
||||
|
||||
@@ -32,14 +32,62 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="response_content" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text"
|
||||
name="userRegion2"
|
||||
value="${_cfg.userRegion2 }">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select id="response" class="selectpicker select2 input-small pull-right">
|
||||
<option value="responseContent"><spring:message code="response_content"></spring:message></option>
|
||||
<option value="responseFile"><spring:message code="response_file"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input id="responseContent" name="userRegion2" class="form-control" type="text" value="${_cfg.userRegion2 }">
|
||||
<select id="responseFile" name="userRegion3" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:if test="${file.isValid!=0 and file.isAudit!=3}">
|
||||
<option action="${file.action }" value="${file.fileId}"
|
||||
<c:if test="${file.fileId==_cfg.userRegion3}">selected</c:if>>${file.fileDesc}</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion2"></div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
//清除没用的 file 信息
|
||||
var action = $("input[name='action']").val();
|
||||
$("#responseFile option").each(function(i,n){
|
||||
var oa = $(this).attr("action");
|
||||
if(oa != action && i != 0){
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
//页面加载时触发初始化操作
|
||||
var file = $("#responseFile").val();
|
||||
if(file){
|
||||
$("#responseContent").hide();//隐藏输入框
|
||||
$("#response").val("responseFile");
|
||||
$("#responseFile").selectpicker("show");//隐藏选择框
|
||||
}else{
|
||||
$("#responseFile").selectpicker("hide");//隐藏选择框
|
||||
$("#response").val("responseContent");
|
||||
$("#responseContent").show();//隐藏输入框
|
||||
}
|
||||
|
||||
$("#response").on("change",function(){
|
||||
var $this = $(this);
|
||||
var inputId = $this.val();
|
||||
$("#responseContent").val("");//清空
|
||||
$("#responseFile").selectpicker("val","");
|
||||
if("responseContent" == inputId){
|
||||
$("#responseContent").show();//显示输入框
|
||||
$("#responseFile").selectpicker("hide");//隐藏选择框
|
||||
}else{
|
||||
$("#responseContent").hide();//隐藏输入框
|
||||
$("#responseFile").selectpicker("show");//显示选择框
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -56,7 +104,7 @@
|
||||
<spring:message code="redirect_response_code" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion1"
|
||||
<select id="redirectResponseCode" name="userRegion1"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('REDIRECT_RESPONSE_CODE')}" var="redirectResponseCodeC">
|
||||
<option value="${redirectResponseCodeC.itemCode}" <c:if test="${_cfg.userRegion1==redirectResponseCodeC.itemCode || (_cfg.userRegion1==null && redirectResponseCodeC.itemCode==1)}">selected</c:if>>${redirectResponseCodeC.itemCode} <spring:message code="${redirectResponseCodeC.itemValue}"/></option>
|
||||
@@ -68,14 +116,69 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<label id="responseLabel" class="control-label col-md-3 "><font color="red">*</font>
|
||||
<spring:message code="redirect_url" /></label>
|
||||
<div class="col-md-6">
|
||||
<input id="responseContent" name="userRegion2" class="form-control required" type="text" value="${_cfg.userRegion2 }">
|
||||
<select id="responseFile" name="userRegion3" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:if test="${file.isValid!=0 and file.isAudit!=3}">
|
||||
<option action="${file.action }" value="${file.fileId}"
|
||||
<c:if test="${file.fileId==_cfg.userRegion3}">selected</c:if>>${file.fileDesc}</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
//清除没用的 file 信息
|
||||
var action = $("input[name='action']").val();
|
||||
$("#responseFile option").each(function(i,n){
|
||||
var oa = $(this).attr("action");
|
||||
if(oa != action && i != 0){
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
//页面加载时触发初始化操作
|
||||
var code = $("#redirectResponseCode").val();
|
||||
if(code == 200){//响应文件
|
||||
$("#responseContent").hide();//隐藏输入框
|
||||
$("#responseFile").selectpicker("show");//隐藏选择框
|
||||
$("#responseLabel").html('<font color="red">*</font><spring:message code="response_file" />');
|
||||
}else{
|
||||
$("#responseContent").show();//隐藏输入框
|
||||
$("#responseFile").selectpicker("hide");//隐藏选择框
|
||||
$("#responseLabel").html('<font color="red">*</font><spring:message code="redirect_url" />');
|
||||
}
|
||||
|
||||
$("#redirectResponseCode").on("change",function(){
|
||||
var $this = $(this);
|
||||
var code = $this.val();
|
||||
if(code == 200){//重定向 应答码 为 200 时可以选择 应答文件
|
||||
$("#responseContent").hide();//隐藏输入框
|
||||
$("#responseFile").selectpicker("show");//隐藏选择框
|
||||
$("#responseLabel").html('<font color="red">*</font><spring:message code="response_file" />');
|
||||
}else{
|
||||
$("#responseContent").show();//隐藏输入框
|
||||
$("#responseFile").selectpicker("hide");//隐藏选择框
|
||||
$("#responseLabel").html('<font color="red">*</font><spring:message code="redirect_url" />');
|
||||
}
|
||||
$("#responseContent").val("");//清空
|
||||
$("#responseFile").selectpicker("val","");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<%-- <label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="redirect_url" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control url required" type="text"
|
||||
name="userRegion2"
|
||||
value="${_cfg.userRegion2 }">
|
||||
</div>
|
||||
</div> --%>
|
||||
<div for="userRegion2"></div>
|
||||
<div for="userRegion3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,12 +5,7 @@
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
initCommIpVal();
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
@@ -59,7 +54,16 @@ $(function(){
|
||||
<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}">
|
||||
<input type="hidden" name="cfgRegionCode"isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
regionType="${region.regionType}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
@@ -189,6 +193,7 @@ $(function(){
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode}"
|
||||
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">
|
||||
|
||||
421
src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp
Normal file
421
src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp
Normal file
@@ -0,0 +1,421 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form){
|
||||
var flag = true;
|
||||
$("input[name$='cfgKeywords']").each(function(){
|
||||
if($(this).val()==''){
|
||||
$(this).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
})
|
||||
$("select[name$='isHexbin']").each(function(){
|
||||
var isHexbin=$(this).val();
|
||||
if(isHexbin == 1){
|
||||
var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val();
|
||||
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
|
||||
$(this).parents(".form-body").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(flag){
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
$("#appCode").val($("#specServiceIdId").val());
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
|
||||
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
|
||||
<div class="page-content">
|
||||
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq 'social_app'}"><c:set var="app" value="${dict.itemCode}"/></c:if>
|
||||
</c:forEach>
|
||||
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
|
||||
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="app_ssl_config"></spring:message>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}"><spring:message code="add"></spring:message></c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/app/saveAppSslCfg" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
||||
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
||||
<!-- 配置域类型 -->
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
|
||||
<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&cfgType=${app}" 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 for="cfgDesc"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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}">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-6 hidden">
|
||||
<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>
|
||||
<c:if test="${!empty region.configDistrict }">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="district" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="district"
|
||||
class="selectpicker show-tick form-control required district" onchange="changeDistrict($(this))">
|
||||
<c:forEach items="${fn:split(region.configDistrict,',')}"
|
||||
var="_district">
|
||||
<option value="${_district }"
|
||||
<c:if test="${_cfg.district==_district}">selected</c:if>>${_district }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="districtShowName" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
|
||||
</div>
|
||||
<div for="district"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</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="keywords" /></label>
|
||||
<!-- 此配置的关键词可以输入多个关键词 -->
|
||||
<c:if test="${region.configMultiKeywords eq 1}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required tags" type="text" id="tags_${tabName}"
|
||||
name="cfgKeywords"
|
||||
value="${_cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 此配置的关键词不允许输入多个关键词 -->
|
||||
<c:if test="${(region.configMultiKeywords eq 0) or (empty region.configMultiKeywords)}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required invisibleChar" type="text"
|
||||
name="cfgKeywords"
|
||||
value="${_cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div for="cfgKeywords"></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="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:if test="${!empty region.configExprType}">
|
||||
<c:forEach var="exprType" items="${fn:split(region.configExprType,',')}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq exprType}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprType }"
|
||||
class="required"
|
||||
<c:if test="${_cfg.exprType eq exprType || (empty _cfg.exprType && exprType eq 0)}">
|
||||
checked
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configExprType}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq 0}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprTypeC.itemCode }"
|
||||
class="required" checked >
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configMatchMethod}">
|
||||
<c:forEach var="matchMethod" items="${fn:split(region.configMatchMethod,',')}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq matchMethod}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
<c:if test="${_cfg.matchMethod eq matchMethod || (empty _cfg.matchMethod && matchMethod eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configMatchMethod}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq 0}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
selected
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="1" class="required"
|
||||
><spring:message code="hex"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required"
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="1" class="required"
|
||||
><spring:message code="case_senstive"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required" checked
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
checked
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="whether_hexbinary" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<c:forEach var="isHexbin" items="${fn:split(region.configHex,',')}">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq isHexbin}">
|
||||
<option value="${isHexbinC.itemCode}"
|
||||
<c:if test="${_cfg.isHexbin eq isHexbin || (empty _cfg.isHexbin && isHexbin eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq 0}">
|
||||
<option value="${isHexbinC.itemCode}" selected >
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<input name="isAreaEffective" type="hidden" value="0">
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
<input name="requestId" value="0" type="hidden">
|
||||
<%-- <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> --%>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
431
src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp
Normal file
431
src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp
Normal file
@@ -0,0 +1,431 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(".tooltips").tooltip();
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.cfgKeywords}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//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",'');
|
||||
$("#level").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq 'social_app'}"><c:set var="app" value="${dict.itemCode}"/></c:if>
|
||||
</c:forEach>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="app:http:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/app/sslCfgForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="app_ssl_config"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/app/sslCfgList?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<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="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${specificServiceCfg.parent.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&cfgType=${app}" extId=""
|
||||
cssClass="form-control input-small"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="cfgKeywords"><spring:message code="keywords"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
|
||||
</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>
|
||||
<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">
|
||||
<shiro:hasPermission name="app:ssl:config">
|
||||
<sys:delRow url="${ctx}/app/sslCfgForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/updateAppSslCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="app:ssl:confirm">
|
||||
<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>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/app/auditAppSslCfg?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/app/auditAppSslCfg?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/app/auditAppSslCfg?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>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row hidden">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='request_number'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='type'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="social_app"/></th>
|
||||
<th><spring:message code="district"/></th>
|
||||
<th><spring:message code="keywords"/></th>
|
||||
<th><spring:message code="whether_hexbinary"/></th>
|
||||
<th><spring:message code="expression_type"/></th>
|
||||
<th><spring:message code="match_method"/></th>
|
||||
<%-- <th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th> --%>
|
||||
<th><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${cfg.cfgId}" value="${cfg.isAudit}">
|
||||
</td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.appName }</td>
|
||||
<td>${cfg.district }</td>
|
||||
<td>
|
||||
<a href="javascript:;" data-original-title="${fn:replace(cfg.cfgKeywords, '***and***', ' ')}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(fn:replace(cfg.cfgKeywords, "***and***", " "),20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${cfg.exprType==1}"><spring:message code="and_expression"/></c:if>
|
||||
<c:if test="${cfg.exprType==0}"><spring:message code="null_expression"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq cfg.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">
|
||||
<a href="javascript:viewAreaInfo('${ctx}','${cfg.areaEffectiveIds }','${cfg.compileId }')" >
|
||||
<spring:message code="yes"/>
|
||||
</a>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>${cfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${cfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}"><div class="loading-total"></div></td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page" style="margin-top:40px">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,7 @@
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
initCommIpVal();
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate({
|
||||
@@ -56,8 +50,19 @@ $(function(){
|
||||
<!-- 配置域类型 -->
|
||||
<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}">
|
||||
<input type="hidden" name="${cfgName}.configServiceType" value="${region.configServiceType}">
|
||||
<input type="hidden" id="cfgType${region.configRegionCode}" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" id="cfgRegionCode${region.configRegionCode}"
|
||||
isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
regionType="${region.regionType}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
@@ -82,6 +87,7 @@ $(function(){
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode}"
|
||||
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">
|
||||
|
||||
@@ -5,13 +5,7 @@
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
initCommIpVal();
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate({
|
||||
@@ -56,8 +50,19 @@ $(function(){
|
||||
<!-- 配置域类型 -->
|
||||
<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}">
|
||||
<input type="hidden" name="${cfgName}.configServiceType" value="${region.configServiceType}">
|
||||
<input type="hidden" id="cfgType${region.configRegionCode}" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" id="cfgRegionCode${region.configRegionCode}"
|
||||
isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
regionType="${region.regionType}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
@@ -82,6 +87,7 @@ $(function(){
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
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">
|
||||
|
||||
@@ -152,8 +152,6 @@
|
||||
value="${_cfg.serviceId}">
|
||||
|
||||
<div class="form-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
@@ -192,6 +190,29 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog begin-->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog end-->
|
||||
<c:set var="accountCfgIndex" value="0"></c:set>
|
||||
<c:set var="strCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
|
||||
@@ -535,6 +535,7 @@
|
||||
<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="do_log"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -566,6 +567,13 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.doLog }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -13,13 +13,14 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
$("#cancel").on("click", function() {
|
||||
initCommIpVal();
|
||||
/* $("#cancel").on("click", function() {
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
}); */
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate(
|
||||
@@ -165,37 +166,58 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 动作 -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="action" /></label>
|
||||
<label class="control-label col-md-3"><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 }"
|
||||
<label class="radio-inline"> <c:if test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action" serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
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 }">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- dolog begin-->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog end-->
|
||||
|
||||
<c:set var="ipCfgIndex" value="0"></c:set>
|
||||
<c:set var="strCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
|
||||
@@ -602,6 +602,7 @@
|
||||
<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="do_log"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -633,6 +634,13 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.doLog }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -5,57 +5,29 @@
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
if($("input[name='action']:checked").val()==0x20||$("input[name='action']:checked").val()==0x60){
|
||||
$("#cfgRegionCode").val($("#cfgRegionCodeCallback").val());
|
||||
$("#cfgType").val($("#cfgTypeCallback").val());
|
||||
}else{
|
||||
$("#cfgRegionCode").val($("#cfgRegionCodeMaat").val());
|
||||
$("#cfgType").val($("#cfgTypeMaat").val());
|
||||
}
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
if($(this).val()==0x20||$(this).val()==0x60){
|
||||
$("#cfgRegionCode").val($("#cfgRegionCodeCallback").val());
|
||||
$("#cfgType").val($("#cfgTypeCallback").val());
|
||||
$("input[name='isAreaEffective']").each(function(){
|
||||
if($(this).val()==0){
|
||||
$(this).click();
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$("#cfgRegionCode").val($("#cfgRegionCodeMaat").val());
|
||||
$("#cfgType").val($("#cfgTypeMaat").val());
|
||||
}
|
||||
|
||||
});
|
||||
if('${fn:length(serviceList)}'>1){
|
||||
$("#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");
|
||||
}
|
||||
});
|
||||
}
|
||||
initCommIpVal();
|
||||
$("#ipCfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
if($("#dnsStrategyId")&&$("#dnsStrategyId").val()){
|
||||
$("#cfgRegionCode").val($("#cfgRegionCodeMaat").val());
|
||||
$("#cfgType").val($("#cfgTypeMaat").val());
|
||||
}
|
||||
loading('<spring:message code="onloading"/>');
|
||||
//禁用隐藏域的表单
|
||||
var serviceType=$("input[name='cfgRegionCode']").attr("serviceType");
|
||||
var action=$("input[name='action']").val();
|
||||
if(serviceType.indexOf("ipmulitiplex")==-1){
|
||||
$("[name='dnsStrategyId'").removeAttr("name");
|
||||
$("[name='irType'").removeAttr("name");
|
||||
}
|
||||
if(serviceType.indexOf("ratelimit")==-1){
|
||||
$("[name='ratelimit'").removeAttr("name");
|
||||
}else if(64!=action){
|
||||
$("[name='ratelimit'").removeAttr("name");
|
||||
}
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox"
|
||||
@@ -86,33 +58,34 @@ $(function(){
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="cfgType" name="cfgType" value="${_cfg.cfgType}">
|
||||
<input type="hidden" id="cfgRegionCode" name="cfgRegionCode" value="${_cfg.cfgRegionCode}">
|
||||
<c:if test="${fn:length(serviceList)==1}">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<input type="hidden" name="action" value="${service.action }">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${service.serviceId}">
|
||||
<input type="hidden" id="protocolId" name="protocolId" value="${service.protocolId}">
|
||||
</c:forEach>
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<input type="hidden" name="action" serviceId="${service.serviceId }" protocolId="${service.protocolId }" regionCode="${service.regionCode}" value="${service.action }">
|
||||
<input type="hidden" id="protocolId" name="protocolId" value="${service.protocolId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${service.serviceId}">
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${fn:length(serviceList)>1}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="protocolId" name="protocolId" value="${_cfg.protocolId}">
|
||||
<input type="hidden" id="protocolId" name="protocolId" value="${_cfg.protocolId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
</c:if>
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<c:if test="${region.isMaat==1}"><!-- is maat -->
|
||||
<input type="hidden" id="cfgTypeMaat" value="${region.configRegionValue}">
|
||||
<input type="hidden" id="cfgRegionCodeMaat" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
<c:if test="${region.isMaat==2}">
|
||||
<input type="hidden" id="cfgTypeCallback" value="${region.configRegionValue}">
|
||||
<input type="hidden" id="cfgRegionCodeCallback" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<input type="hidden" name="${cfgName}.configServiceType" value="${region.configServiceType}">
|
||||
<input type="hidden" id="cfgType${region.configRegionCode}" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" id="cfgRegionCode${region.configRegionCode}" name="cfgRegionCode"
|
||||
isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
regionType="${region.regionType}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@@ -135,6 +108,7 @@ $(function(){
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
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">
|
||||
@@ -151,18 +125,8 @@ $(function(){
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<!-- desc and action -->
|
||||
<c:forEach items="${fns:getDictList('SPECIAL_FUNCTION_ID')}" var="sfi">
|
||||
<c:if test="${sfi.itemCode==_cfg.functionId}">
|
||||
<c:set var="specialProtocol" value="${sfi.itemValue}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:if test="${specialProtocol ne 'ipmulitiplex'}">
|
||||
<%@include file="/WEB-INF/include/form/ipInfo.jsp" %>
|
||||
</c:if>
|
||||
<c:if test="${specialProtocol ne null and specialProtocol eq 'ipmulitiplex'}">
|
||||
<%@include file="/WEB-INF/include/form/complexIpInfo.jsp" %>
|
||||
<div class="row">
|
||||
<%@include file="/WEB-INF/include/form/ipInfo.jsp" %>
|
||||
<div class="row ipmulitiplex hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="group"/></label>
|
||||
@@ -192,57 +156,19 @@ $(function(){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${specialProtocol ne null and specialProtocol eq 'ipratelimit'}">
|
||||
<div class="row">
|
||||
<div class="row ratelimit hidden">
|
||||
<div class="col-md-6">
|
||||
<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 number" range="[0,100]" type="text" name="ratelimit">
|
||||
<input class="form-control required number" range="[0,100]" type="text" name="ratelimit" value="${_cfg.ratelimit}">
|
||||
</div>
|
||||
<div for="ratelimit"></div>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
<c:if test="${specialProtocol ne 'ipmulitiplex'}">
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
</c:if>
|
||||
<c:if test="${specialProtocol eq 'ipmulitiplex'}">
|
||||
<input type="hidden" name="isAreaEffective" value="0" >
|
||||
</c:if>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -323,6 +323,11 @@
|
||||
<div class="table-responsive">
|
||||
<sys:message content="${message}"/>
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<c:if test="${service.action==64}">
|
||||
<c:set var="hasRatelimit" value="1"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
@@ -351,7 +356,7 @@
|
||||
<th exportColumn="group_name"><spring:message code="group"/></th>
|
||||
<th exportColumn="ir_type"><spring:message code="ir_type"/></th>
|
||||
</c:if>
|
||||
<c:if test="${specialFunctionId ne null and specialFunctionId eq 'ipratelimit'}">
|
||||
<c:if test="${hasRatelimit==1}">
|
||||
<th exportColumn="ratelimit"><spring:message code="ratelimit"/></th>
|
||||
</c:if>
|
||||
<c:if test="${specialFunctionId ne null and specialFunctionId eq 'pxyIpControl'}">
|
||||
@@ -444,9 +449,9 @@
|
||||
</c:forEach>
|
||||
</td>
|
||||
</c:if>
|
||||
<c:if test="${specialFunctionId ne null and specialFunctionId eq 'ipratelimit'}">
|
||||
<c:if test="${hasRatelimit==1}">
|
||||
<td>
|
||||
<c:if test="${cfg.ratelimit eq null}">0%</c:if>
|
||||
<c:if test="${cfg.ratelimit eq null and cfg.action==64}">0%</c:if>
|
||||
<c:if test="${cfg.ratelimit ne null}">${cfg.ratelimit}%</c:if>
|
||||
</td>
|
||||
</c:if>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<input type="hidden" name="${cfgName}.cfgType" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="${cfgName}.cfgRegionCode" value="${region.configRegionCode }">
|
||||
<input type="hidden" name="${cfgName}.configMultiKeywords" value="${region.configRegionCode }">
|
||||
<input type="hidden" name="${cfgName}.configServiceType" value="${region.configServiceType }">
|
||||
<%-- </c:if>
|
||||
</c:forEach> --%>
|
||||
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
initCommIpVal();
|
||||
/* $("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
}); */
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate({
|
||||
@@ -58,7 +59,17 @@ $(function(){
|
||||
<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}">
|
||||
<input type="hidden" name="cfgRegionCode"
|
||||
isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
regionType="${region.regionType}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
@@ -83,6 +94,7 @@ $(function(){
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<spring:message code="${service.actionCode }" />
|
||||
|
||||
@@ -13,13 +13,14 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
$("#cancel").on("click", function() {
|
||||
initCommIpVal();
|
||||
/* $("#cancel").on("click", function() {
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
}); */
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate(
|
||||
@@ -174,6 +175,7 @@
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
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">
|
||||
|
||||
464
src/main/webapp/WEB-INF/views/cfg/intercept/interceptIpForm.jsp
Normal file
464
src/main/webapp/WEB-INF/views/cfg/intercept/interceptIpForm.jsp
Normal file
@@ -0,0 +1,464 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
|
||||
<style type="text/css">
|
||||
.boxSolid {
|
||||
border: 1px solid #eeeeee
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
$("#cancel").on("click", function() {
|
||||
window.history.back();
|
||||
});
|
||||
setDefaultInfo();
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
setDefaultInfo();
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate(
|
||||
{
|
||||
errorPlacement : function(error, element) {
|
||||
$(element).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ element.attr("name")
|
||||
+ "']").append(error);
|
||||
},
|
||||
submitHandler : function(form) {
|
||||
|
||||
var flag = true;
|
||||
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
||||
if($(".boxSolid").length ==$(".boxSolid.hidden").length){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
//代表所有区域都隐藏了,提示必须增加个区域信息
|
||||
if($("input[name='isAreaEffective']:checked").val()==1 && $(".container-fluid:visible").size()==0){
|
||||
if($("#areaIsp").hasClass("hidden")) $("#areaIp").find(".glyphicon-plus").click();
|
||||
if($("#areaIp").hasClass("hidden")) $("#areaIsp").find(".glyphicon-plus").click();
|
||||
top.$.jBox.tip("<spring:message code='one_more_area'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
$(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
|
||||
if($(this).val()==''){
|
||||
$(this).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
});
|
||||
//keywords非空校验完成校验二进制字符串
|
||||
$(".boxSolid:visible").find("select[name$='isHexbin']").each(function(){
|
||||
var isHexbin=$(this).val();
|
||||
if(isHexbin == 1){ //十六进制
|
||||
var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val();
|
||||
if(keywords != ''){
|
||||
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
|
||||
$(this).parents(".boxSolid").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
var flag1=validateInvisibleCharTag();
|
||||
if(flag){
|
||||
flag=flag1;
|
||||
}
|
||||
if(flag){
|
||||
//将disable属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
var action=$("input[name='action']").val();
|
||||
if(action==1){ //监测
|
||||
$("input[name='userRegion2']").val("");
|
||||
$("select[name='userRegion3']").val();
|
||||
$("input[name='userRegion4']").val("");
|
||||
$("input[name='userRegion5']").val("");
|
||||
}else if(action==64){//限速
|
||||
$("select[name='userRegion1']").val("");
|
||||
$("select[name='userRegion3']").val();
|
||||
$("input[name='userRegion4']").val("");
|
||||
$("input[name='userRegion5']").val("");
|
||||
}else if(action==80){//替换
|
||||
$("input[name='userRegion1']").val("");
|
||||
$("input[name='userRegion2']").val("");
|
||||
}else {//白名单
|
||||
$("select[name='userRegion1']").val();
|
||||
$("input[name='userRegion2']").val("");
|
||||
$("select[name='userRegion3']").val();
|
||||
$("input[name='userRegion4']").val("");
|
||||
$("input[name='userRegion5']").val("");
|
||||
}
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
|
||||
},
|
||||
errorContainer : "#messageBox",
|
||||
});
|
||||
//业务内容增加
|
||||
/* $("span[title='add']").on("click", function() {
|
||||
$(".ipPort0").removeClass("hidden");
|
||||
}); */
|
||||
|
||||
});
|
||||
var setDefaultInfo=function(){
|
||||
var action=$("input[name='action']").val();
|
||||
var serviceRegionType="";
|
||||
var protocolNamePrefix="";
|
||||
$("input[name$='configServiceType']").each(function(){
|
||||
//替换动作非tcp
|
||||
var serviceRegionTypeValue=$(this).val();
|
||||
var serviceRegionTypeValue=$(this).attr("name");
|
||||
if(serviceRegionTypeValue.indexOf(".") >-1){
|
||||
serviceRegionTypeValue=serviceRegionTypeValue.substring(0,serviceRegionTypeValue.indexOf(".")+1);
|
||||
}else{
|
||||
serviceRegionTypeValue="";
|
||||
}
|
||||
if(serviceRegionType == 'intercept_ratelimit'){
|
||||
serviceRegionType=serviceRegionTypeValue;
|
||||
protocolNamePrefix=serviceRegionTypeValue;
|
||||
}
|
||||
});
|
||||
|
||||
if(action==1){
|
||||
//监测
|
||||
$(".monitAction").removeClass("hidden");
|
||||
$(".monitAction").find(".hidden").removeClass("hidden");
|
||||
$(".monitAction").find("[disabled=disabled]").attr("disabled","");
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
$(".replaceAction").addClass("hidden");
|
||||
if(serviceRegionType == 'intercept_ratelimit'){
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=1]").hide();
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=6]").show();
|
||||
}
|
||||
}else if(action==64){
|
||||
//限速
|
||||
$(".monitAction").addClass("hidden");
|
||||
$(".ratelimitAction").removeClass("hidden");
|
||||
$(".ratelimitAction").find(".hidden").removeClass("hidden");
|
||||
$(".ratelimitAction").find("[disabled=disabled]").attr("disabled","");
|
||||
$(".replaceAction").addClass("hidden");
|
||||
if(serviceRegionType == 'intercept_ratelimit'){
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=1]").hide();
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=6]").show();
|
||||
}
|
||||
}else if(action==80){
|
||||
//替换
|
||||
$(".monitAction").addClass("hidden");
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
$(".replaceAction").removeClass("hidden");
|
||||
$(".replaceAction").find(".hidden").removeClass("hidden");
|
||||
$(".replaceAction").find("[disabled=disabled]").attr("disabled","");
|
||||
if(serviceRegionType == 'intercept_ratelimit'){
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=1]").show();
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=6]").hide();
|
||||
}
|
||||
|
||||
|
||||
}else {
|
||||
//白名单
|
||||
$(".monitAction").hide();
|
||||
$(".ratelimitAction").hide();
|
||||
$(".replaceAction").hide();
|
||||
if(serviceRegionType == 'intercept_ratelimit'){
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=1]").hide();
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=6]").show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
$(showDiv).removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
/* $("."+contentClassName+"0").find("input,select").each(function(){
|
||||
$(this).removeAttr("disabled");
|
||||
}); */
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
/* $("."+contentClassName).find("input,select").each(function(){
|
||||
$(this).attr("disabled","true");
|
||||
}); */
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
|
||||
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
|
||||
<div class="page-content">
|
||||
<h3 class="page-title">
|
||||
<spring:message code="ip_intercept"></spring:message>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}">
|
||||
<spring:message code="add"></spring:message>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<spring:message code="edit"></spring:message>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/ntc/website/saveDnsCfg"
|
||||
method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId"
|
||||
value="${_cfg.serviceId}">
|
||||
|
||||
<div class="form-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<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 class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><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>
|
||||
<%-- action 为1 监测时 可以选择证书--%>
|
||||
<div class="row monitAction hidden">
|
||||
<div class="col-md-6 policy">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="policy_name" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion1" class="selectpicker show-tick form-control">
|
||||
<option value="" ><spring:message code="selected"/></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- action 为64 限速时 可以选择证书--%>
|
||||
<div class="row ratelimitAction hidden">
|
||||
<div class="col-md-6">
|
||||
<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 number" range="[0,100]" type="text" name="userRegion2">
|
||||
</div>
|
||||
<div for="ratelimit"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%--action 为80 替换时 可以选择替换动作--%>
|
||||
<div class="row replaceAction hidden">
|
||||
<h4 class="form-section">
|
||||
<spring:message code="action_region" />
|
||||
<small></small>
|
||||
</h4>
|
||||
<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="replace_zone" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion3"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<option value="${replaceZoneC.itemCode}" <c:if test="${_cfg.userRegion3==replaceZoneC.itemCode || _cfg.userRegion3==null}">selected</c:if>><spring:message code="${replaceZoneC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion1"></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="replaced_content" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text"
|
||||
name="userRegion4"
|
||||
value="${_cfg.userRegion4 }">
|
||||
</div>
|
||||
<div for="userRegion4"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="replace_content" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text"
|
||||
name="userRegion5"
|
||||
value="${_cfg.userRegion5 }">
|
||||
</div>
|
||||
<div for="userRegion5"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:set var="ipCfgIndex" value="0"></c:set>
|
||||
<c:set var="complexCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<c:if test="${region.regionType eq 1 }">
|
||||
<!--ip info-->
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<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:set var="regionValue" value="${region.configRegionValue}"></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>
|
||||
<!--/ip info-->
|
||||
</c:if>
|
||||
<c:if test="${region.regionType eq 2 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="interceptPktBinList[${complexCfgIndex}]"></c:set>
|
||||
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.interceptPktBinList)>0}">
|
||||
<c:set var="isBreak" value="false" ></c:set>
|
||||
<c:forEach items="${_cfg.domainList}" var="cfg">
|
||||
<c:choose>
|
||||
<c:when test="${region.configRegionValue eq cfg.cfgType and !isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index}">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="isBreak" value="true" ></c:set>
|
||||
<c:set var="complexCfgIndex" value="${complexCfgIndex+1 }"></c:set>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="complexCfgIndex" value="${complexCfgIndex+1 }"></c:set>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="complexCfgIndex" value="${complexCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<br>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp"%>
|
||||
<br>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
<button id="cancel" type="button" class="btn default">
|
||||
<spring:message code="cancel" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
463
src/main/webapp/WEB-INF/views/cfg/intercept/interceptIpList.jsp
Normal file
463
src/main/webapp/WEB-INF/views/cfg/intercept/interceptIpList.jsp
Normal file
@@ -0,0 +1,463 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//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",'');
|
||||
$("#level").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取voip相关信息
|
||||
$("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}/ntc/website/ajaxDnsSubList',
|
||||
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>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="intercept:ip:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/proxy/intercept/interceptIpForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="ip_intercept"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/proxy/intercept/interceptIpList?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<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="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option>
|
||||
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option>
|
||||
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option>
|
||||
<form:option value="voipAccount.district"><spring:message code="strong_string"/></form:option> --%>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
|
||||
</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>
|
||||
<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">
|
||||
<shiro:hasPermission name="intercept:ip:config">
|
||||
<sys:delRow url="${ctx}/ntc/website/dnsForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/website/updateDnsCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="intercept:ip:confirm">
|
||||
<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>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/proxy/intercept/auditInterceptIpCfg?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/intercept/auditInterceptIpCfg?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/intercept/auditInterceptIpCfg?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>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='request_number'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='type'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="rate_limit"/></th>
|
||||
<th><spring:message code="certificate"/></th>
|
||||
<th><spring:message code="replace_zone"/></th>
|
||||
<th><spring:message code="replaced_content"/></th>
|
||||
<th><spring:message code="replace_content"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th>
|
||||
<th><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="" compileId="${indexCfg.compileId}" cfgId="${indexCfg.cfgId}"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
|
||||
</td>
|
||||
<td>${indexCfg.cfgDesc }</td>
|
||||
<td>
|
||||
${indexCfg.userRegion1 }
|
||||
</td>
|
||||
<td>
|
||||
${indexCfg.userRegion2 }
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<c:if test="${indexCfg.userRegion3==replaceZoneC.itemCode}">
|
||||
<spring:message code="${replaceZoneC.itemValue}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
${indexCfg.userRegion4 }
|
||||
</td>
|
||||
<td>
|
||||
${indexCfg.userRegion5 }
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
<a href="javascript:viewAreaInfo('${ctx}','${indexCfg.areaEffectiveIds }','${indexCfg.compileId }')" >
|
||||
<spring:message code="yes"/>
|
||||
</a>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>${indexCfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${indexCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}"><div class="loading-total"></div></td>
|
||||
<td>${indexCfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page" style="margin-top:40px">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,186 @@
|
||||
<%@ 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: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>
|
||||
<div class="row">
|
||||
<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>
|
||||
<div class="row">
|
||||
<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>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='client_port'/>:</label><label>${cfg.srcPort }</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<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>
|
||||
<div class="row">
|
||||
<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>
|
||||
<div class="row">
|
||||
<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:if test="${region[0] eq 3 }">
|
||||
<c:forEach items="${_cfg.domainList}" 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='district' />:</label><label>${cfg.district }</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='keywords' />:</label>
|
||||
<label>
|
||||
${fn:replace(cfg.cfgKeywords, "***and***", " ")}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='expression_type' />:</label>
|
||||
<label>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||
</c:choose>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='match_method' />:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='whether_hexbinary' />:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</html>
|
||||
@@ -13,13 +13,14 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
$("#cancel").on("click", function() {
|
||||
initCommIpVal();
|
||||
/* $("#cancel").on("click", function() {
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
}); */
|
||||
$("#fileInfo").on('click',function(){
|
||||
$("#file").trigger("click");
|
||||
});
|
||||
@@ -180,6 +181,7 @@
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
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">
|
||||
|
||||
@@ -13,13 +13,14 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
$("#cancel").on("click", function() {
|
||||
initCommIpVal();
|
||||
/* $("#cancel").on("click", function() {
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
}); */
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
|
||||
@@ -177,6 +178,7 @@
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
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">
|
||||
|
||||
@@ -559,7 +559,16 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${indexCfg.userRegion2 }</td>
|
||||
<td><!-- 阻断 响应内容 -->
|
||||
<c:if test="${not empty indexCfg.userRegion2 }">${indexCfg.userRegion2 }</c:if>
|
||||
<c:if test="${not empty indexCfg.userRegion3 }">
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:if test="${file.fileId eq indexCfg.userRegion3}">
|
||||
<a href="${file.url }" target="_blank">${file.fileDesc }</a>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</td>
|
||||
</c:if>
|
||||
<c:if test="${action == 48}">
|
||||
<td>
|
||||
@@ -570,7 +579,16 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${indexCfg.userRegion2 }</td>
|
||||
<td><!-- 重定向 响应内容 ,userRegion3 不为空 响应文件-->
|
||||
<c:if test="${not empty indexCfg.userRegion2 }">${indexCfg.userRegion2 }</c:if>
|
||||
<c:if test="${not empty indexCfg.userRegion3 }">
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:if test="${file.fileId eq indexCfg.userRegion3}">
|
||||
<a href="${file.url }" target="_blank">${file.fileDesc }</a>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</td>
|
||||
</c:if>
|
||||
<c:if test="${action == 80}">
|
||||
<td>
|
||||
|
||||
170
src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/form.jsp
Normal file
170
src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/form.jsp
Normal file
@@ -0,0 +1,170 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
$("#urlInfo,#urlBtn").on('click',function(){
|
||||
$("#cfgFile").trigger("click");
|
||||
});
|
||||
|
||||
$(".action").on("change",function(){
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));//初始化
|
||||
|
||||
$("#cfgFile").on('change',function(){
|
||||
$("#urlInfo").val($("#cfgFile").val());
|
||||
});
|
||||
|
||||
$("#cancel").on("click", function() {
|
||||
window.history.back();
|
||||
});
|
||||
|
||||
$("#cfgFrom") .validate( {
|
||||
submitHandler : function(form) {
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer : "#messageBox",
|
||||
errorPlacement : function(error, element) {
|
||||
$(element).parents(".form-group").find( "div[for='" + element.attr("name") + "']").append(error);
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="file_strategy"></spring:message>
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}">
|
||||
<spring:message code="add"></spring:message>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<spring:message code="edit"></spring:message>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/proxy/fileStrategy/saveOrUpdate" enctype="multipart/form-data" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<div class="form-body">
|
||||
<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="reply_file" /></label>
|
||||
<div class="col-md-6">
|
||||
<input id="cfgFile" name="cfgFile" type="file" style="width: 330px; display: none" />
|
||||
<div class="input-group">
|
||||
<input id="urlInfo" name="urlInfo" readonly="readonly" data-msg-required="" placeholder="<spring:message code="select_file"/>" class="required form-control"
|
||||
style="background-color: transparent" aria-required="true"
|
||||
type="text" value="${_cfg.url }">
|
||||
<div class="input-group-btn">
|
||||
<a id="urlBtn" class="btn btn-default btn-search"
|
||||
href="javascript:" style=""><i class="fa fa-search"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div for="fileUrl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="file_desc" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text" name="fileDesc" value="${_cfg.fileDesc}">
|
||||
</div>
|
||||
<div for="fileDesc"></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="content_type" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="contentType" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${fns:getDictList('CONTENT_TYPE')}" var="dict">
|
||||
<option value="${dict.itemCode}" <c:if test="${dict.itemCode==_cfg.contentType}">selected</c:if>>${dict.itemCode}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="contentType"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<input type="hidden" name="isAreaEffective" value="0">
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
<button id="cancel" type="button" class="btn default">
|
||||
<spring:message code="cancel" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
395
src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/list.jsp
Normal file
395
src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/list.jsp
Normal file
@@ -0,0 +1,395 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.fileDesc}"){
|
||||
$("#intype").val("${cfg.fileDesc}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//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",'');
|
||||
$("#level").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
|
||||
|
||||
$("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>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="proxy:fileStrategy:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/proxy/fileStrategy/form?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="file_strategy"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<sys:message content="${message}"/>
|
||||
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/proxy/fileStrategy/list" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<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="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="fileDesc"><spring:message code="file_desc"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
</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>
|
||||
<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">
|
||||
<shiro:hasPermission name="proxy:fileStrategy:config">
|
||||
<sys:delRow url="${ctx}/proxy/fileStrategy/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/proxy/fileStrategy/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="proxy:fileStrategy:confirm">
|
||||
<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>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/proxy/fileStrategy/audit?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/fileStrategy/audit?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/fileStrategy/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>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='request_number'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='type'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<c:if
|
||||
test="${cfg.functionId eq service.functionId}">
|
||||
<c:set var="action" value="${service.action }"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th><spring:message code="file_desc"/></th>
|
||||
<th><spring:message code="content_type"/></th>
|
||||
<th><spring:message code="content_length"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th>
|
||||
<th><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
|
||||
</td>
|
||||
<td><a href="${indexCfg.url }" target="_blank">${indexCfg.fileDesc }</a></td>
|
||||
<td>${indexCfg.contentType }</td>
|
||||
<td>${indexCfg.contentLength }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${indexCfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${indexCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${indexCfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page" style="margin-top:40px">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -13,13 +13,14 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
$("#cancel").on("click", function() {
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
initCommIpVal();
|
||||
//$("#cancel").on("click", function() {
|
||||
// window.history.back();
|
||||
//});
|
||||
//$(".action").on("change", function() {
|
||||
// $("#serviceId").val($(this).attr("serviceId"));
|
||||
// $("#protocolId").val($(this).attr("protocolId"));
|
||||
//});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
if($("#cfgId").val()!=""){
|
||||
@@ -241,6 +242,7 @@
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
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">
|
||||
|
||||
@@ -13,13 +13,14 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
$("#cancel").on("click", function() {
|
||||
initCommIpVal();
|
||||
/* $("#cancel").on("click", function() {
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
}); */
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate(
|
||||
@@ -174,6 +175,7 @@
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
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">
|
||||
|
||||
@@ -6,51 +6,7 @@
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
switchIpInfo($("select[name$='ipType']"),"ipType");
|
||||
$("input[name='isAreaEffective']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if(val==1){
|
||||
$(".areaType").removeClass("hidden");
|
||||
if($("input[name='areaType']:checked").val()==1){//areaISP
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
}else if($("input[name='areaType']:checked").val()==0){//areaIp
|
||||
$("#areaIp").removeClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$(".areaType").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
if(val==0){
|
||||
$("#areaIp").removeClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}else{
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$("select[name$='ipType']").on("change",function(){
|
||||
switchIpInfo(this,"ipType");
|
||||
});
|
||||
$("select[name$='ipPattern']").on("change",function(){
|
||||
switchIpInfo(this,"ipPattern");
|
||||
});
|
||||
$("select[name$='portPattern']").on("change",function(){
|
||||
switchIpInfo(this,"portPattern");
|
||||
});
|
||||
$(".action").on("change",function(){
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
initCommIpVal();
|
||||
$("#ipCfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
@@ -93,7 +49,8 @@ $(function(){
|
||||
<input type="hidden" name="isAreaEffective" value="0">
|
||||
<c:if test="${fn:length(serviceList)==1}">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<input type="hidden" name="action" value="${service.action }">
|
||||
<input type="hidden" name="${cfgName}.configServiceType" value="${region.configServiceType}">
|
||||
<input type="hidden" name="action" protocolId="${service.protocolId}" regionCode="${service.regionCode}" value="${service.action }">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${service.serviceId}">
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
@@ -104,7 +61,16 @@ $(function(){
|
||||
<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}">
|
||||
<input type="hidden" name="cfgRegionCode" isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
regionType="${region.regionType}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<h3 class="form-section"><spring:message code="block_config"/></h3>
|
||||
|
||||
@@ -1,65 +1,67 @@
|
||||
/*
|
||||
* Translated default messages for the jQuery validation plugin.
|
||||
* Locale: RU (Russian; русский язык)
|
||||
* Locale: ZH (Chinese, 中文 (Zhōngwén), 汉语, 漢語)
|
||||
*/
|
||||
(function ($) {
|
||||
$.extend($.validator.messages, {
|
||||
required: "Это поле необходимо заполнить.",
|
||||
remote: "Пожалуйста, введите правильное значение.",
|
||||
email: "Пожалуйста, введите корректный адрес электронной почты.",
|
||||
url: "Пожалуйста, введите корректный URL.",
|
||||
date: "Пожалуйста, введите корректную дату.",
|
||||
dateISO: "Пожалуйста, введите корректную дату в формате ISO.",
|
||||
number: "Пожалуйста, введите число.",
|
||||
digits: "Пожалуйста, вводите только цифры.",
|
||||
creditcard: "Пожалуйста, введите правильный номер кредитной карты.",
|
||||
equalTo: "Пожалуйста, введите такое же значение ещё раз.",
|
||||
accept: "Пожалуйста, выберите файл с правильным расширением.",
|
||||
maxlength: $.validator.format("Пожалуйста, введите не больше {0} символов."),
|
||||
minlength: $.validator.format("Пожалуйста, введите не меньше {0} символов."),
|
||||
rangelength: $.validator.format("Пожалуйста, введите значение длиной от {0} до {1} символов."),
|
||||
range: $.validator.format("Пожалуйста, введите число от {0} до {1}."),
|
||||
max: $.validator.format("Пожалуйста, введите число, меньшее или равное {0}."),
|
||||
min: $.validator.format("Пожалуйста, введите число, большее или равное {0}."),
|
||||
ipCheck: $.validator.format(" Пожалуйста, введите правильный IP - адрес."),
|
||||
ipMask:"Please enter a correct IP/mask",
|
||||
ipPart:"Invalid IP part",
|
||||
ipv6MaskPart:"Mask must be exponent of 2,not greater than 128",
|
||||
ipMaskRange:"IP mask must between 0 and 32",
|
||||
srcIpNotEqDestIp:"Sourse IP and destination IP can't the same",
|
||||
ipRange:"Wrong IP format or start IP and end IP in two subnet",
|
||||
ipRange1:"start IP should smaller than end IP",
|
||||
portCheck: " Пожалуйста, введите правильный порт.",
|
||||
portRange:"Port must between 0 and 65535",
|
||||
srcIpNotEqDestIp:"Sourse IP ",
|
||||
destIpNotEqDestIp:" and destination IP ",
|
||||
srcIpIsNotValue:"Sourse IP can't be ",
|
||||
destIpIsNotValue:"Destination IP can't be ",
|
||||
IpNotEqDestIp:" can't the same",
|
||||
portMaskRange:"Port and mask must between 0 and 65535.The correct pattern is \"port/mask\".",
|
||||
chooseAreaOrIsp:"The region and the oprater must choose one",
|
||||
areaControl:"Action drop and loop do not need area control",
|
||||
ip_type: "ip type",
|
||||
ip_pattern: "ip Pattern",
|
||||
area: "area",
|
||||
isp: "isp",
|
||||
close_info: "close",
|
||||
client_ip: "client ip",
|
||||
required: "Необходимая информация",
|
||||
remote: "Исправьте эту информацию",
|
||||
email: "Введите правильный адрес электронной почты",
|
||||
url: "Введите действительный URL-адрес",
|
||||
date: "Введите действительную дату",
|
||||
dateISO: "Введите действительную дату (ISO).",
|
||||
number: "Введите действительный номер",
|
||||
digits: "Может вводить только целые числа",
|
||||
creditcard: "Введите действительный номер кредитной карты",
|
||||
equalTo: "Повторите одно и то же значение",
|
||||
accept: "Введите строку с юридическим суффиксом",
|
||||
maxlength: $.validator.format("Введите строку с максимальной длиной {0}"),
|
||||
minlength: $.validator.format("Введите строку с минимальной длиной {0}"),
|
||||
rangelength: $.validator.format("Введите строку символов,длина которой между {0} и {1}"),
|
||||
range: $.validator.format("Введите значение между {0} и {1}"),
|
||||
max: $.validator.format("Введите значение до {0}"),
|
||||
min: $.validator.format("Введите значение с минимальным значением {0}"),
|
||||
noBlankSpace:"Не может быть пробела",
|
||||
ip:"Заполните правильный IP-адрес",
|
||||
ipCheck:"Заполните правильный IP-адрес",
|
||||
ipMask:"Заполните правильный IP-адрес / маска",
|
||||
ipPart:"Ошибка формата части IP",
|
||||
ipv6MaskPart:"Mаска-показатель степени 2, небольше 128",
|
||||
ipMaskRange:"Маска IP между 0 и 32",
|
||||
srcIpNotEqDestIp:"IP-адрес источника ",
|
||||
destIpNotEqDestIp:" с IP-адресом назначения",
|
||||
IpNotEqDestIp:" не может быть одинаковым",
|
||||
srcIpIsNotValue:"IP-адрес источника не может быть ",
|
||||
destIpIsNotValue:"IP-адрес назначения не может быть",
|
||||
ipRange:"Формат диапазона IP неверен, или начальный IP-адрес и конечный IP-адрес не относятся к одному и тому же сегменту сети.",
|
||||
ipRange1:"Начальное значение IP должно меньше конечного значения IP.",
|
||||
portCheck:"Заполните правильный порт",
|
||||
notStartZero:"Пожалуйста, введите правильное значение",
|
||||
portRange:"Порт должен быть меньше 65536, отличные от нуля номера не могут начинаться с 0",
|
||||
portMaskRange:"Порт должен меньше 65536, отличные от нуля номера не могут начинаться с 0.Формат\"порт/маска\"",
|
||||
chooseAreaOrIsp:"Необходимо выбрать один регион и оператор",
|
||||
areaControl:"Действия выброса и рефлюкса не могут контролироваться на региональном уровне",
|
||||
ip_type: "Тип ip",
|
||||
ip_pattern: "Формат ip",
|
||||
area: "Зона",
|
||||
isp: "Оператор",
|
||||
close_info: "Закрыть",
|
||||
client_ip: " IP",
|
||||
ipv4: "IPv4",
|
||||
ipv6: "IPv6",
|
||||
over6: "4over6",
|
||||
over4: "6over4",
|
||||
ipv4v6:"IPv4(0.0.0.0) or IPv6(::)",
|
||||
all: "all",
|
||||
ip_subnet: "Subnet",
|
||||
ip_range: "ip Range",
|
||||
timeout:"timeout",
|
||||
areaIpPrefix:"Forbiden value: ",
|
||||
domainCheck:"Please enter a valid domain.",
|
||||
checkParent:"Configuration Type must match it's parent.",
|
||||
specServiceCodeCheck:"Protocol No is repeat.",
|
||||
compareDate:"The end time should not be earlier than the start time.",
|
||||
hexCheck:"Please enter the HEX format character",
|
||||
invisibleChar:"Please enter the visible character"
|
||||
ipv4v6:"Введите действительный IP-адрес, например IPv4 (0.0.0.0) или IPv6 (::)",
|
||||
all: "Все",
|
||||
ip_subnet:"Маска IP-адреса/Маска подсети",
|
||||
ip_range: "Диапазон IP",
|
||||
timeout:"Превышение срока",
|
||||
areaIpPrefix:"Запрещенное значение: ",
|
||||
domainCheck:"Введите действительное доменное имя",
|
||||
checkParent:"Тип конфигурации должен соответствовать предыдущей конфигурации!",
|
||||
specServiceCodeCheck:"Повторяющийся номер протокола",
|
||||
compareDate:"Время окончания нельзя раньше времени начала",
|
||||
hexCheck:"Введите шестнадцатеричный символ",
|
||||
invisibleChar:"Введите видимые символы"
|
||||
});
|
||||
}(jQuery));
|
||||
}(jQuery));
|
||||
|
||||
@@ -362,7 +362,201 @@ $(function(){
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
var actionCode=$(this).val();
|
||||
var regionCode=$(this).attr("regionCode");
|
||||
if(!regionCode){
|
||||
regionCode=$("input[name='action']").attr("regionCode");
|
||||
}
|
||||
if(regionCode){
|
||||
if(regionCode.indexOf(",")==-1){
|
||||
$("#cfgRegionCode"+regionCode).attr("name","cfgRegionCode");
|
||||
$("#cfgType"+regionCode).attr("name","cfgType");
|
||||
$("[id^='cfgRegionCode']").each(function(){
|
||||
if($(this).attr("id")==("cfgRegionCode"+regionCode)){
|
||||
$(this).attr("name","cfgRegionCode");
|
||||
}else{
|
||||
$(this).removeAttr("name");
|
||||
}
|
||||
});
|
||||
$("[id^='cfgType']").each(function(){
|
||||
if($(this).attr("id")==("cfgType"+regionCode)){
|
||||
$(this).attr("name","cfgType");
|
||||
}else{
|
||||
$(this).removeAttr("name");
|
||||
}
|
||||
});
|
||||
}else{
|
||||
var _region='';
|
||||
var regionArr=regionCode.split(',');
|
||||
$("input[name$='cfgRegionCode'][regionType='1']").each(function(){
|
||||
for(var re in regionArr){
|
||||
if($(this).val()==regionArr[re]){
|
||||
serviceType=$(this).attr("serviceType");
|
||||
_region=regionArr[re];
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(_region!=''){
|
||||
regionCode=_region;
|
||||
}
|
||||
}
|
||||
var ipPortShow=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPortShow"),
|
||||
ipType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipType"),
|
||||
ipPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPattern"),
|
||||
portPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("portPattern"),
|
||||
direction=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("direction"),
|
||||
protocol=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("protocol"),
|
||||
regionType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("regionType");
|
||||
//ip,端口处理
|
||||
if(ipPortShow){
|
||||
if(ipPortShow.indexOf('1')>-1){//展示源IP,端口
|
||||
$("input[name$='srcIpAddress']").parents(".form-group").removeClass("hidden");
|
||||
$("input[name$='srcPort']").parents(".form-group").removeClass("hidden");
|
||||
}else{
|
||||
$("input[name$='srcIpAddress']").parents(".form-group").addClass("hidden");
|
||||
$("input[name$='srcPort']").parents(".form-group").addClass("hidden");
|
||||
}
|
||||
if(ipPortShow.indexOf('2')>-1){//展示目的IP,端口
|
||||
$("input[name$='destIpAddress']").parents(".form-group").removeClass("hidden");
|
||||
$("input[name$='destPort']").parents(".form-group").removeClass("hidden");
|
||||
}else{
|
||||
$("input[name$='destIpAddress']").parents(".form-group").addClass("hidden");
|
||||
$("input[name$='destPort']").parents(".form-group").addClass("hidden");
|
||||
}
|
||||
}
|
||||
if(ipType){
|
||||
var arr=ipType.split(',');
|
||||
$("select[name$='ipType'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
if($(this).val()==arr[type]){
|
||||
has=true;
|
||||
if($(this).attr("disabled")){
|
||||
$(this).removeAttr("disabled")
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
}
|
||||
});
|
||||
$("select[name$='ipType']").selectpicker("refresh");
|
||||
}
|
||||
if(ipPattern){
|
||||
arr=ipPattern.split(',');
|
||||
$("select[name$='ipPattern'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
if($(this).val()==arr[type]){
|
||||
has=true;
|
||||
if($(this).attr("disabled")){
|
||||
$(this).removeAttr("disabled")
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
}
|
||||
});
|
||||
$("select[name$='ipPattern']").selectpicker("refresh");
|
||||
}
|
||||
if(portPattern){
|
||||
arr=portPattern.split(',');
|
||||
$("select[name$='portPattern'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
if($(this).val()==arr[type]){
|
||||
has=true;
|
||||
if($(this).attr("disabled")){
|
||||
$(this).removeAttr("disabled")
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
}
|
||||
});
|
||||
$("select[name$='portPattern']").selectpicker("refresh");
|
||||
}
|
||||
if(direction){
|
||||
arr=direction.split(',');
|
||||
$("select[name$='direction'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
if($(this).val()==arr[type]){
|
||||
has=true;
|
||||
if($(this).attr("disabled")){
|
||||
$(this).removeAttr("disabled")
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
}
|
||||
});
|
||||
$("select[name$='direction']").selectpicker("refresh");
|
||||
}
|
||||
|
||||
if(protocol){
|
||||
arr=protocol.split(',');
|
||||
$("select[name$='protocol'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
if($(this).val()==arr[type]){
|
||||
has=true;
|
||||
if($(this).attr("disabled")){
|
||||
$(this).removeAttr("disabled")
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
}
|
||||
});
|
||||
$("select[name$='protocol']").selectpicker("refresh");
|
||||
}
|
||||
|
||||
//处理自定义字段
|
||||
var serviceType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("serviceType");
|
||||
if(serviceType){
|
||||
if(serviceType.indexOf("ipaddr")>-1){
|
||||
if($(this).val()==32){
|
||||
$("select[name$='protocol'] option[value='1']").removeAttr("disabled")
|
||||
}else{
|
||||
$("select[name$='protocol'] option[value='1']").attr("disabled",true);
|
||||
}
|
||||
$("select[name$='protocol']").selectpicker("refresh");
|
||||
}
|
||||
if(serviceType.indexOf("ipmulitiplex")>-1){
|
||||
$(".ipmulitiplex").removeClass("hidden");
|
||||
}else{
|
||||
$(".ipmulitiplex").addClass("hidden");
|
||||
}
|
||||
if(serviceType.indexOf("ratelimit")>-1){
|
||||
if($(this).val()==64){
|
||||
$(".ratelimit").removeClass("hidden");
|
||||
}else{
|
||||
$(".ratelimit").addClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$(".ratelimit").addClass("hidden");
|
||||
}
|
||||
if($(this).val()==0x20||$(this).val()==0x60){
|
||||
$("input[name$='isAreaEffective']").each(function(){
|
||||
if($(this).val()==0){
|
||||
$(this).click();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//选择hex cfgkeywords需校验十六进制
|
||||
$("select[name$='isHexbin']").each(function(){
|
||||
$(this).on("change",function(){
|
||||
@@ -431,6 +625,7 @@ $(function(){
|
||||
$("input[name*='userRegion']").addClass("invisibleChar");
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
window.onload=function(){
|
||||
@@ -1187,4 +1382,189 @@ var validateInvisibleCharTag=function(){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
var initCommIpVal=function(){
|
||||
var regionCode,serviceType,ipPortShow,ipType,
|
||||
ipPattern,portPattern,direction,protocol,regionType;
|
||||
if($("input[name$='action']:checked").length>0){
|
||||
regionCode=$("input[name$='action']:checked").attr("regionCode");
|
||||
}else{
|
||||
regionCode=$("input[name$='action']").attr("regionCode");
|
||||
}
|
||||
if(regionCode){
|
||||
if(regionCode.indexOf(",")==-1){
|
||||
$("#cfgRegionCode"+regionCode).attr("name","cfgRegionCode");
|
||||
$("#cfgType"+regionCode).attr("name","cfgType");
|
||||
serviceType=$("input[name$='cfgRegionCode'][regionType='1'][value='"+regionCode+"']").attr("serviceType");
|
||||
}else{
|
||||
var _region='';
|
||||
var regionArr=regionCode.split(',');
|
||||
$("input[name$='cfgRegionCode'][regionType='1']").each(function(){
|
||||
for(var re in regionArr){
|
||||
if($(this).val()==regionArr[re]){
|
||||
serviceType=$(this).attr("serviceType");
|
||||
_region=regionArr[re];
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(_region!=''){
|
||||
regionCode=_region;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(serviceType){
|
||||
if(serviceType.indexOf("ipaddr")>-1&&$("input[name$='action']:checked").val()==32){
|
||||
$("select[name$='protocol'] option").each(function(){
|
||||
if($(this).attr("value")==1){
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
$("select[name$='protocol']").selectpicker("refresh");
|
||||
}
|
||||
if(serviceType&&serviceType.indexOf("ipaddr")>-1&&$("input[name$='action']").val()==32){
|
||||
$("select[name$='protocol'] option").each(function(){
|
||||
if($(this).attr("value")==1){
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
$("select[name$='protocol']").selectpicker("refresh");
|
||||
}
|
||||
if(serviceType.indexOf("ipmulitiplex")>-1){
|
||||
$(".ipmulitiplex").removeClass("hidden");
|
||||
$("input[name$='isAreaEffective']").each(function(){
|
||||
if($(this).val()==0){
|
||||
$(this).click();
|
||||
}
|
||||
})
|
||||
$(".areaInfo").addClass("hidden");
|
||||
}else{
|
||||
$(".areaInfo").removeClass("hidden");
|
||||
$(".ipmulitiplex").addClass("hidden");
|
||||
}
|
||||
if(serviceType.indexOf("ratelimit")>-1){
|
||||
if($("input[name$='action']").val()==64||$("input[name$='action']:checked").val()==64){
|
||||
$(".ratelimit").removeClass("hidden");
|
||||
}else{
|
||||
$(".ratelimit").addClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$(".ratelimit").addClass("hidden");
|
||||
}
|
||||
}
|
||||
ipPortShow=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPortShow"),
|
||||
ipType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipType"),
|
||||
ipPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPattern"),
|
||||
portPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("portPattern"),
|
||||
direction=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("direction"),
|
||||
protocol=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("protocol"),
|
||||
regionType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("regionType");
|
||||
//ip,端口处理
|
||||
if(ipPortShow){
|
||||
if(ipPortShow.indexOf('1')>-1){//展示源IP,端口
|
||||
$("input[name$='srcIpAddress']").parents(".form-group").removeClass("hidden");
|
||||
$("input[name$='srcPort']").parents(".form-group").removeClass("hidden");
|
||||
}else{
|
||||
$("input[name$='srcIpAddress']").parents(".form-group").addClass("hidden");
|
||||
$("input[name$='srcPort']").parents(".form-group").addClass("hidden");
|
||||
}
|
||||
if(ipPortShow.indexOf('2')>-1){//展示目的IP,端口
|
||||
$("input[name$='destIpAddress']").parents(".form-group").removeClass("hidden");
|
||||
$("input[name$='destPort']").parents(".form-group").removeClass("hidden");
|
||||
}else{
|
||||
$("input[name$='destIpAddress']").parents(".form-group").addClass("hidden");
|
||||
$("input[name$='destPort']").parents(".form-group").addClass("hidden");
|
||||
}
|
||||
}
|
||||
if(ipType){
|
||||
var arr=ipType.split(',');
|
||||
$("select[name$='ipType'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
if($(this).val()==arr[type]){
|
||||
has=true;
|
||||
if($(this).attr("disabled")){
|
||||
$(this).removeAttr("disabled")
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
}
|
||||
});
|
||||
}
|
||||
if(ipPattern){
|
||||
arr=ipPattern.split(',');
|
||||
$("select[name$='ipPattern'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
if($(this).val()==arr[type]){
|
||||
has=true;
|
||||
if($(this).attr("disabled")){
|
||||
$(this).removeAttr("disabled")
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
}
|
||||
});
|
||||
}
|
||||
if(portPattern){
|
||||
arr=portPattern.split(',');
|
||||
$("select[name$='portPattern'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
if($(this).val()==arr[type]){
|
||||
has=true;
|
||||
if($(this).attr("disabled")){
|
||||
$(this).removeAttr("disabled")
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
}
|
||||
});
|
||||
}
|
||||
if(direction){
|
||||
arr=direction.split(',');
|
||||
$("select[name$='direction'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
if($(this).val()==arr[type]){
|
||||
has=true;
|
||||
if($(this).attr("disabled")){
|
||||
$(this).removeAttr("disabled")
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
}
|
||||
});
|
||||
}
|
||||
if(protocol){
|
||||
arr=protocol.split(',');
|
||||
$("select[name$='protocol'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
if($(this).val()==arr[type]){
|
||||
has=true;
|
||||
if($(this).attr("disabled")){
|
||||
$(this).removeAttr("disabled")
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
}
|
||||
});
|
||||
}
|
||||
return regionCode;
|
||||
}
|
||||
Reference in New Issue
Block a user