Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop

This commit is contained in:
zhangwenqing
2018-08-25 13:51:51 +08:00
16 changed files with 1212 additions and 349 deletions

View File

@@ -1,10 +1,13 @@
package com.nis.web.controller.configuration.ntc;
import java.util.ArrayList;
import java.util.Date;
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;
@@ -15,15 +18,18 @@ 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.SysDataDictionaryItem;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.IpPortCfg;
import com.nis.domain.configuration.NtcSubscribeIdCfg;
import com.nis.domain.configuration.template.IpAddrTemplate;
import com.nis.domain.configuration.template.IpsecTemplate;
import com.nis.domain.configuration.template.TunnelIpTemplate;
import com.nis.util.Constants;
import com.nis.exceptions.MaatConvertException;
import com.nis.util.DictUtils;
import com.nis.web.controller.configuration.CommonController;
import com.nis.web.security.UserUtils;
/**
* IP相关配置控制类
@@ -35,54 +41,87 @@ import com.nis.web.controller.configuration.CommonController;
public class IpController extends CommonController{
@RequestMapping(value = {"list"})
// @RequiresPermissions(value={"iplist:config","iplist:confirm"},logical=Logical.OR)
public String list(String cfgName,Model model,@ModelAttribute("cfg")IpPortCfg cfg,HttpServletRequest request,HttpServletResponse response) {
this._ipList(cfgName, model, cfg, request, response);
model.addAttribute("urlPrefix","/ntc/iplist");
model.addAttribute("requiresPermissionPrefix","iplist");
return "/cfg/common/ipList";
public String list(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
Page<CfgIndexInfo> page = ipCfgService.getIpCfgList(searchPage, cfg);
model.addAttribute("page", page);
initPageCondition(model,cfg);
return "/cfg/ipaddr/ipList";
}
@RequestMapping(value = {"form"})
@RequiresPermissions(value={"iplist:config"})
public String form(String cfgName,Model model,String ids,Integer functionId,BaseIpCfg entity) {
this._ipForm(cfgName, model, ids, functionId, entity);
List<SysDataDictionaryItem> specialFunctionIdList = DictUtils.getDictList("SPECIAL_FUNCTION_ID");
String specialFunctionId=null;
for(SysDataDictionaryItem item:specialFunctionIdList) {
if(Integer.parseInt(item.getItemCode())==entity.getFunctionId().intValue()) {
specialFunctionId= item.getItemValue();
break;
}
public String form(Model model,String ids,CfgIndexInfo entity) {
if(StringUtils.isNotBlank(ids)){
entity = ipCfgService.getIpPortCfg(Long.parseLong(ids));
initUpdateFormCondition(model,entity);
}else{
initFormCondition(model,entity);
}
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";
// }
return "/cfg/common/ipForm";
model.addAttribute("_cfg", entity);
return "/cfg/ipaddr/ipForm";
}
@RequestMapping(value = {"saveOrUpdate"})
public String saveOrUpdate(String cfgName,RedirectAttributes model, IpPortCfg cfg) {
this._saveOrUpdateIp(cfgName, model, cfg);
return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+cfg.getFunctionId();
public String saveOrUpdate(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) {
ipCfgService.saveIpCfg(entity);
return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
}
@RequestMapping(value = {"delete"})
@RequestMapping(value = {"ajaxSubList"})
public String ajaxIpPortSubList(Model model,Long cfgId,Integer index) {
CfgIndexInfo cfg = ipCfgService.getIpPortCfg(cfgId);
/*List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId());
model.addAttribute("regionList", regionList);*/
List<String[]> tabList = new ArrayList();
if(cfg.getIpPortList()!=null){
String cfgType = null;
for(IpPortCfg ip:cfg.getIpPortList()){
if(!ip.getCfgType().equals(cfgType)){
tabList.add(new String[]{"1",ip.getCfgType()});
cfgType = ip.getCfgType();
}
}
}
if(cfg.getNtcSubscribeIdCfgList()!=null){
String cfgType = null;
for(NtcSubscribeIdCfg keyword:cfg.getNtcSubscribeIdCfgList()){
if(!keyword.getCfgType().equals(cfgType)){
tabList.add(new String[]{"2",keyword.getCfgType()});
cfgType = keyword.getCfgType();
}
}
}
model.addAttribute("_cfg", cfg);
model.addAttribute("index", index);
model.addAttribute("tabList", tabList);
return "/cfg/ipaddr/ipSubList";
}
@RequestMapping(value = {"updateValid"})
@RequiresPermissions("iplist:config")
public String delete(String cfgName,String ids,String compileIds,Integer functionId,RedirectAttributes model) {
this._deleteIp(cfgName, ids, compileIds, functionId, model);
model.addAttribute("urlPrefix","/ntc/iplist");
model.addAttribute("requiresPermissionPrefix","iplist");
public String updateIpPortCfgValid(Integer isValid,String ids,Integer functionId) {
ipCfgService.updateIpCfgValid(isValid, ids, functionId);
return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+functionId;
}
@RequestMapping(value = {"audit"})
@RequiresPermissions("iplist:confirm")
public String audit(String cfgName,String ids,IpPortCfg cfg,RedirectAttributes redirectAttributes) {
this._auditIp(cfgName, ids, cfg, redirectAttributes);
redirectAttributes.addAttribute("urlPrefix","/ntc/iplist");
redirectAttributes.addAttribute("requiresPermissionPrefix","iplist");
return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+cfg.getFunctionId();
public String audit(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = ipCfgService.getIpPortCfg(Long.parseLong(id));
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());
entity.setAuditTime(new Date());
entity.setFunctionId(functionId);
try {
ipCfgService.auditIpCfg(entity,isAudit);
} catch (MaatConvertException e) {
e.printStackTrace();
logger.info("ssl配置下发失败"+e.getMessage());
addMessage(redirectAttributes, e.getMessage());
}
}
return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+functionId;
}
//ip配置导入
@RequestMapping(value = "import", method=RequestMethod.POST)

View File

@@ -41,7 +41,7 @@ public class WhiteListController extends CommonController{
//@RequiresPermissions(value={"whitelist:ip:config","whitelist:ip:confirm","whitelist:ip:aduit"},logical=Logical.OR)
public String ipList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
Page<CfgIndexInfo> page = ipCfgService.getWhiteIpList(searchPage, cfg);
Page<CfgIndexInfo> page = ipCfgService.getIpCfgList(searchPage, cfg);
model.addAttribute("page", page);
initPageCondition(model,cfg);
return "/cfg/whitelist/ipList";

View File

@@ -44,6 +44,6 @@ public interface IpCfgDao extends CrudDao<BaseIpCfg>{
public void deleteIpCfg(CfgIndexInfo entity);
public void updateCfgValid(BaseCfg entity);
public void auditCfg(BaseCfg entity);
public List<CfgIndexInfo> getWhiteIpList(CfgIndexInfo entity);
public List<CfgIndexInfo> getIpCfgList(CfgIndexInfo entity);
}

View File

@@ -1001,7 +1001,7 @@
and function_id=#{functionId,jdbcType=INTEGER}
</trim>
</update>
<select id="getWhiteIpList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
<select id="getIpCfgList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
SELECT
<include refid="ConfigIndex_Column" />
<trim prefix="," prefixOverrides=",">
@@ -1073,92 +1073,6 @@
<if test="functionId != null">
AND a.function_id=#{functionId,jdbcType=INTEGER}
</if>
<if test="ipPort!=null">
AND a.compile_id in (select t.compile_id from ip_port_cfg t
<where>
<if test="functionId != null">
AND t.function_id=#{functionId,jdbcType=INTEGER}
</if>
<if test="ipPort.srcIpAddress != null and ipPort.srcIpAddress != ''">
and t.src_ip_address =#{(ipPort.srcIpAddress,jdbcType=VARCHAR}
</if>
<if test="ipPort.srcPort != null and ipPort.srcPort != ''">
and t.src_port =#{ipPort.srcPort,jdbcType=VARCHAR}
</if>
<if test="ipPort.destIpAddress != null and ipPort.destIpAddress != ''">
and t.dest_ip_address =#{(ipPort.destIpAddress,jdbcType=VARCHAR}
</if>
<if test="ipPort.destPort != null and ipPort.destPort != ''">
and t.dest_port =#{ipPort.destPort,jdbcType=VARCHAR}
</if>
</where>
)
</if>
<if test="httpUrl!=null">
AND a.compile_id in (select f.compile_id from http_url_cfg f
<where>
<if test="httpUrl.cfgKeywords != null and httpUrl.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{httpUrl.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
</where>
)
</if>
<if test="httpReqBody!=null">
AND a.compile_id in (select f.compile_id from http_body_cfg f
<where>
and cfg_type='http_req_body'
<if test="httpReqBody.cfgKeywords != null and httpReqBody.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{httpReqBody.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
</where>
)
</if>
<if test="httpResBody!=null">
AND a.compile_id in (select f.compile_id from http_body_cfg f
<where>
and cfg_type='http_res_body'
<if test="httpResBody.cfgKeywords != null and httpResBody.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{httpResBody.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
</where>
)
</if>
<if test="httpReqHdr!=null">
AND a.compile_id in (select f.compile_id from http_req_head_cfg f
<where>
<if test="httpReqHdr.cfgKeywords != null and httpReqHdr.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{httpReqHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
<if test="httpReqHdr.district != null and httpReqHdr.district != ''">
and f.district like concat(concat('%',#{httpReqHdr.district,jdbcType=VARCHAR}),'%')
</if>
</where>
)
</if>
<if test="httpResHdr!=null">
AND a.compile_id in (select f.compile_id from http_res_head_cfg f
<where>
<if test="httpResHdr.cfgKeywords != null and httpResHdr.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{httpResHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
<if test="httpResHdr.district != null and httpResHdr.district != ''">
and f.district like concat(concat('%',#{httpResHdr.district,jdbcType=VARCHAR}),'%')
</if>
</where>
)
</if>
<!-- <if test="sslCfg!=null">
AND a.compile_id in (select f.compile_id from ssl_keyword_cfg f
<where>
<if test="sslCfg.cfgKeywords != null and sslCfg.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{sslCfg.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
</where>
)
</if> -->
<!-- 数据范围过滤 -->
${sqlMap.dsf}
</trim>

View File

@@ -472,6 +472,8 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
}
}else{
entity.setEditTime(new Date());
entity.setEditorId(entity.getCurrentUser().getId());
websiteCfgDao.updateCfgIndex(entity);
//无效子配置后,再新增子配置
websiteCfgDao.deleteHttpUrlCfg(entity);

View File

@@ -144,6 +144,8 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
}
}else{
entity.setEditTime(new Date());
entity.setEditorId(entity.getCurrentUser().getId());
ipCfgDao.updateCfgIndex(entity);
//无效子配置后,再新增子配置
ipCfgDao.deleteIpCfg(entity);
@@ -495,10 +497,10 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
}
}
public void auditIpCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
Properties props=this.getMsgProp();
//修改数据库审核状态信息
entity.setTableName(CfgIndexInfo.getTablename());
ipCfgDao.auditCfg(entity);
ToMaatBean maatBean = new ToMaatBean();
MaatCfg maatCfg = new MaatCfg();
List<MaatCfg> configCompileList = new ArrayList();
@@ -508,10 +510,22 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
List<NumBoundaryCfg> numRegionList = new ArrayList();
List<DigestCfg> digestRegionList = new ArrayList();
List<IpCfg> areaIpRegionList = new ArrayList();
//获取region
List<FunctionRegionDict> dictList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
int maatType=0;
//查询子配置并修改审核状态
entity = this.getIpPortCfg(entity.getCfgId());
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
//判断下发类型是走maat还是callback
String regionValue=entity.getIpPortList().get(0).getCfgType();
if(regionValue!=null) {
for(FunctionRegionDict region:dictList) {
if(regionValue.equals(region.getConfigRegionValue())) {
maatType=region.getIsMaat();
break;
}
}
}
IpPortCfg cfg = new IpPortCfg();
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
cfg.setTableName(IpPortCfg.getTablename());
@@ -551,48 +565,95 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
}
//构造提交综合服务参数格式,一条配置提交一次综合服务
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());
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("ip配置下发配置参数"+json);
//调用服务接口下发配置
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
logger.info("ip配置下发响应信息"+result.getMsg());
if(maatType==Constants.CALLBACK_TYPE){
List<InlineIp> ipList=new ArrayList<>();
for(IpPortCfg cfg :entity.getIpPortList()) {
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
InlineIp ip=convertCallBackIp(cfg,null);
ipList.add(ip);
}
//调用服务接口下发配置数据
String json=gsonToJson(ipList);
logger.info("IP配置下发配置参数"+json);
//调用服务接口下发配置
try {
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
if(result!=null){
logger.info("IP配置配置下发响应信息"+result.getMsg());
}
} catch (Exception e) {
logger.error("IP配置配置下发失败",e);
throw e;
}
}else if(maatType==Constants.MAAT_TYPE){
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());
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("ip配置下发配置参数"+json);
//调用服务接口下发配置
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
logger.info("ip配置下发响应信息"+result.getMsg());
}else {
throw new RuntimeException("<spring:message code=\"request_service_failed\"/>:"+props.getProperty("unknown_cfg_type"));
}
}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("ip配置下发配置参数"+json);
//调用服务接口下发配置
ToMaatResult result = ConfigServiceUtil.put(json,1);
logger.info("ip配置取消配置响应信息:"+result.getMsg());
if(maatType==Constants.CALLBACK_TYPE){
List<InlineIp> ipList=new ArrayList<>();
for(IpPortCfg cfg :entity.getIpPortList()) {
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
InlineIp ip=convertCallBackIp(cfg,null);
ipList.add(ip);
}
//调用服务接口下发配置数据
String json=gsonToJson(ipList);
logger.info("IP配置下发配置参数"+json);
//调用服务接口下发配置
try {
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
if(result!=null){
logger.info("IP配置配置下发响应信息:"+result.getMsg());
}
} catch (Exception e) {
logger.error("IP配置配置下发失败",e);
throw e;
}
}else if(maatType==Constants.MAAT_TYPE){
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("ip配置下发配置参数"+json);
//调用服务接口下发配置
ToMaatResult result = ConfigServiceUtil.put(json,1);
logger.info("ip配置取消配置响应信息"+result.getMsg());
}else {
throw new RuntimeException("<spring:message code=\"request_service_failed\"/>:"+props.getProperty("unknown_cfg_type"));
}
}
}
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
@@ -740,10 +801,10 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
}
return msgProp;
}
public Page<CfgIndexInfo> getWhiteIpList(Page<CfgIndexInfo> page, CfgIndexInfo entity) {
public Page<CfgIndexInfo> getIpCfgList(Page<CfgIndexInfo> page, CfgIndexInfo entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
entity.setPage(page);
List<CfgIndexInfo> list = ipCfgDao.getWhiteIpList(entity);
List<CfgIndexInfo> list = ipCfgDao.getIpCfgList(entity);
page.setList(list);
return page;
}

View File

@@ -10,8 +10,11 @@ INSERT INTO function_region_dict (config_service_type,config_multi_keywords,conf
VALUES('subscribe_id',0,'0,1','0,1,2','0,1,2,3',4,2,'WHITE_LIST_SUBSCRIBE_ID','全局域名白名单SUBSCRIBE配置',1,1,2,2);
UPDATE function_service_dict SET region_code='1,2' WHERE function_id=4 AND ACTION=128
#ip地址
UPDATE function_service_dict SET region_code=1 WHERE function_id=5 AND ACTION IN(16,1);
UPDATE function_service_dict SET region_code=2 WHERE function_id=5 AND ACTION IN(32,96);
INSERT INTO function_region_dict (config_service_type,config_multi_keywords,config_expr_type,config_hex,config_match_method
,function_id,config_region_code,config_region_value,config_desc,is_valid,is_maat,region_type,config_region_sort)
VALUES('subscribe_id',0,'0,1','0,1,2','0,1,2,3',5,3,'NTC_SUBSCRIBE_ID','IP地址SUBSCRIBE配置',1,1,2,2);
UPDATE function_service_dict SET region_code='1,3' WHERE function_id=5 AND ACTION IN(16,1);
UPDATE function_service_dict SET region_code='2,3' WHERE function_id=5 AND ACTION IN(32,96);
UPDATE function_region_dict SET config_ip_port_show='1,2' ,config_ip_type='4,6,46,64,10',config_ip_pattern='1,2,3',config_port_pattern='1,2',config_direction='0,1',config_protocol='0,6,17' WHERE dict_id=27;
UPDATE function_region_dict SET config_service_type='ipaddr',config_ip_port_show='1,2' ,config_ip_type='4,6,46,64,10',config_ip_pattern='1,2,3',config_port_pattern='1,2',config_direction='0,1',config_protocol='0,6,17,1' WHERE dict_id=35;
#ip限流

View File

@@ -34,6 +34,7 @@
<mapping path="/nis/proxy/intercept/ajax*" exclue="true"/>
<mapping path="/nis/ntc/whitelist/ip/ajax*" exclue="true"/>
<mapping path="/nis/ntc/whitelist/domain/ajax*" exclue="true"/>
<mapping path="/nis/ntc/iplist/ajax*" exclue="true"/>
<!-- 对同一路径,启用多个装饰器 -->
<mapping>
<path>/articles/*</path>

View File

@@ -81,7 +81,7 @@ $(function(){
<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" notAllowSelectRoot="true" notAllowSelectParent="true"
labelName="parent.specServiceName" notAllowSelectRoot="true" notAllowSelectParent="true" enableAddBtn="true"
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"/>

View File

@@ -96,7 +96,7 @@ $(function(){
<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" notAllowSelectRoot="true" notAllowSelectParent="true"
labelName="parent.specServiceName" notAllowSelectRoot="true" notAllowSelectParent="true" enableAddBtn="true"
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"/>

View File

@@ -96,7 +96,7 @@ $(function(){
<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" notAllowSelectRoot="true" notAllowSelectParent="true"
labelName="parent.specServiceName" notAllowSelectRoot="true" notAllowSelectParent="true" enableAddBtn="true"
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"/>

View File

@@ -96,7 +96,7 @@ $(function(){
<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" notAllowSelectRoot="true" notAllowSelectParent="true"
labelName="parent.specServiceName" notAllowSelectRoot="true" notAllowSelectParent="true" enableAddBtn="true"
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"/>

View File

@@ -92,7 +92,7 @@ $(function(){
<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" notAllowSelectRoot="true" notAllowSelectParent="true"
labelName="parent.specServiceName" notAllowSelectRoot="true" notAllowSelectParent="true" enableAddBtn="true"
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"/>

View File

@@ -3,190 +3,405 @@
<html>
<head>
<title><spring:message code="${cfgName}"></spring:message></title>
<style type="text/css">
.boxSolid {
border: 1px solid #eeeeee
}
</style>
<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());
$(document)
.ready(
function() {
/*initCommIpVal();
$("#cancel").on("click", function() {
window.history.back();
});*/
var action=$(".action:checked").val();
if(action==32||action==96){
$(".subscribeId").find(".glyphicon-remove").click();
$(".subscribeId").prev("h4").addClass("hidden");
}
var regionCodes=$(".action:checked").attr("regionCode").split(",");
$("h4[class*='ipPortListTitle']").each(function(){
var has=false;
for(var ind in regionCodes){
if($(this).hasClass("ipPortListTitle"+regionCodes[ind])){
has=true;
}
}
if(!has){
$(this).html("");
}
});
$(".action").on("change", function() {
$("#serviceId").val($(this).attr("serviceId"));
$("#protocolId").val($(this).attr("protocolId"));
switchAction($(this).val());
var regioncode=$(this).attr("regioncode");
var hasRegioncode=false;
var arr=regioncode.split(',');
var cfgType,cfgRegionCode;
for(var re in arr){
if($("[id='cfgRegionCode"+arr[re]+"']")&&$("[id='cfgRegionCode"+arr[re]+"']").attr("regionType")==1){
regioncode=arr[re];
cfgType=$("[id='cfgType"+arr[re]+"']").val();
cfgRegionCode=$("[id='cfgRegionCode"+arr[re]+"']").val();
}
}
$("h4[class*='ipPortListTitle']").each(function(){
var html="<spring:message code='"+cfgType+"'/>";
$(this).find(".ipPortTitle").html(html);
});
var tabInfo=$(".ipPortList");
if(tabInfo){
tabInfo.find("[name$='cfgType']").val(cfgType);
tabInfo.find("[name$='cfgRegionCode']").val(cfgRegionCode);
//丢弃回流没有subscribeId
if($(this).val()==32||$(this).val()==96){
$(".subscribeId").find(".glyphicon-remove").click();
$(".subscribeId").prev("h4").addClass("hidden");
}else{
$(".subscribeId").prev("h4").removeClass("hidden");
}
//处理ICMP
if($(this).val()==32){
tabInfo.find("select[name$='protocol'] option[value='1']").removeAttr("disabled");
tabInfo.find("select[name$='protocol']").selectpicker("refresh");
}else{
tabInfo.find("select[name$='protocol'] option[value='1']").attr("disabled",true);
tabInfo.find("select[name$='protocol']").selectpicker("refresh");
}
}
});
$("#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) {
//loading('onloading...');
var flag = true;
var subscribeId=0;
//存在隐藏的subscribeId不算进域配置
if($(".boxSolid.hidden").hasClass("subscribeId")){
subscribeId=1;
}
//代表所有业务都隐藏了,提示必须增加一种业务数据
if(($(".boxSolid").length-1) ==($(".boxSolid.hidden").length-subscribeId)){
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);
loading('onloading...');
form.submit();
}else{
return;
}
},
errorContainer : "#messageBox",
});
//业务内容增加
/* $("span[title='add']").on("click", function() {
$(".ipPort0").removeClass("hidden");
}); */
});
//业务窗口打开
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");
}
$("#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"));
//业务窗口关闭
var delContent = function(contentClassName, addBtnClassName) {
$("." + contentClassName).addClass("hidden").addClass("disabled");
/* $("."+contentClassName).find("input,select").each(function(){
$(this).attr("disabled","true");
}); */
$("." + addBtnClassName).removeClass("hidden");
}
if($("[name='action']:checked").val()=="${dropAction}"){
$("[name='protocol']").append('<option class="icmp" value="1" <c:if test="${_cfg.protocol==1}">selected</c:if>><spring:message code="ICMP"/></option>');
$("[name='protocol']").selectpicker("render");
$("[name='protocol']").selectpicker("refresh");
}
$("[name='action']").on("click",function(){
if($(this).val()=="${dropAction}"){
$("[name='protocol']").append('<option class="icmp" value="1" <c:if test="${_cfg.protocol==1}">selected</c:if>><spring:message code="ICMP"/></option>');
}else{
if($("[name='protocol'] option[value='1']")){
if($("[name='protocol'] option[value='1']").is(":selected")){
$("[name='protocol'] option[value='1']").removeAttr("selected");
$("[name='protocol']").val(0);
}
$("[name='protocol'] option[value='1']").remove();
}
}
$("[name='protocol']").selectpicker("render");
$("[name='protocol']").selectpicker("refresh");
});
$("#ipCfgFrom").validate({
errorPlacement: function(error,element){
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
},
submitHandler: function(form){
loading('<spring:message code="onloading"/>');
form.submit();
},
errorContainer: "#messageBox"
});
});
</script>
</head>
<body>
<div class="page-content">
<h3 class="page-title">
<spring:message code="${cfgName}"></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>
<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_control"></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>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="ipCfgFrom" action="${ctx}${urlPrefix}/saveOrUpdate" method="post" class="form-horizontal">
<div class="form-body row">
<input name="cfgName" type="hidden" value="${cfgName}"/>
<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: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}">
</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">
<!-- desc and action -->
<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>
<c:if test="${fn:length(serviceList)>1}">
<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>>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="cfgFrom" action="${ctx}/ntc/iplist/saveOrUpdate"
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}">
<c:forEach items="${regionList}" var="region">
<input type="hidden" id="cfgType${region.configRegionCode}" value="${region.configRegionValue}">
<input type="hidden" 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:forEach>
<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 }"
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 }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</c:if>
</label>
</c:forEach>
</div>
<div for="action"></div>
</div>
</div>
</c:if>
</c:if>
</label>
</c:forEach>
</div>
<div for="action"></div>
</div>
</div>
</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>
<%@include file="/WEB-INF/include/form/ipInfo.jsp" %>
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
<%@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>
<!-- 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:set var="subscribeIdIndex" value="0"></c:set>
<c:forEach items="${regionList}" var="region" varStatus="status">
<c:if test="${region.regionType eq 1 }">
<c:if test="${ipCfgIndex==0}">
<!--ip info-->
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
<h4 class="form-section ipPortListTitle${region.configRegionCode}">
<span class="ipPortTitle"><spring:message code="${region.configRegionValue}" /></span>
<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 ipPortList ${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 ipPortList ${tabName}${status.index} hidden disabled">
<%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%>
</div>
<c:set var="ipCfgIndex" value="${ipCfgIndex+1 }"></c:set>
</c:otherwise>
</c:choose>
</c:if>
<!--/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:if test="${region.configServiceType eq 'subscribe_id' }">
<c:set var="cfgName" value="ntcSubscribeIdCfgList[${subscribeIdIndex}]"></c:set>
</c:if>
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
<c:choose>
<c:when test="${fn:length(_cfg.ntcSubscribeIdCfgList)>0}">
<c:set var="isBreak" value="false" ></c:set>
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="cfg">
<c:choose>
<c:when test="${region.configRegionValue eq cfg.cfgType and !isBreak}">
<div class="row boxSolid subscribeId ${tabName}${status.index}">
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
</div>
<c:set var="isBreak" value="true" ></c:set>
<c:set var="subscribeIdIndex" value="${subscribeIdIndex+1 }"></c:set>
</c:when>
</c:choose>
</c:forEach>
<c:if test="${!isBreak}">
<div class="row boxSolid subscribeId ${tabName}${status.index} hidden disabled">
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
</div>
<c:if test="${region.configServiceType eq 'subscribe_id' }">
<c:set var="subscribeIdIndex" value="${subscribeIdIndex+1 }"></c:set>
</c:if>
</c:if>
</c:when>
<c:otherwise>
<div class="row boxSolid subscribeId ${tabName}${status.index} hidden disabled">
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
</div>
<c:if test="${region.configServiceType eq 'subscribe_id' }">
<c:set var="subscribeIdIndex" value="${subscribeIdIndex+1 }"></c:set>
</c:if>
<c:if test="${region.configServiceType ne 'subscribe_id' }">
<c:set var="strCfgIndex" value="${strCfgIndex+1 }"></c:set>
</c:if>
</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>
</div>
</body>
</html>

View File

@@ -0,0 +1,452 @@
<%@ 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 if("${cfg.compileId}"){
$("#intype").val("${cfg.compileId}");
}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/iplist/ajaxSubList',
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="iplist:config">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/ntc/iplist/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="ip_control"></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}/ntc/iplist/list?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="compileId"><spring:message code="cfg_id"></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="iplist:config">
<sys:delRow url="${ctx}/ntc/iplist/form" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/iplist/updateValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
</shiro:hasPermission>
<shiro:hasPermission name="iplist: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}/ntc/iplist/audit?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/iplist/audit?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/iplist/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>&nbsp;</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>&nbsp;</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>&nbsp;</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 style="display: none"><spring:message code="cfg_id"/></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>
<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.compileId }</td>
<td>${indexCfg.cfgDesc }</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: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}">
<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>

View File

@@ -0,0 +1,176 @@
<%@ 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 2) && (fn:length(_cfg.ntcSubscribeIdCfgList) >0)}">
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" 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-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>