url分组配置页面(url公共组)

This commit is contained in:
shangguanyanfei
2019-02-18 18:47:07 +08:00
parent e4b44e6b8c
commit e5d8f038ea
12 changed files with 1261 additions and 9 deletions

View File

@@ -0,0 +1,58 @@
package com.nis.domain.basics;
import com.nis.domain.configuration.BaseStringCfg;
import com.nis.util.excel.ExcelField;
public class UrlCommGroupCfg extends BaseStringCfg<UrlCommGroupCfg>{
private static final long serialVersionUID = 398247881810945300L;
private static final String tableName="http_url_cfg";
@ExcelField(title="key_word",sort=3)
protected String cfgKeywords;//url关键字配置
// protected Integer exprType;//表达式类型
// protected Integer matchMethod;//匹配类型
protected Integer isHexbin;//是否大小写敏感
protected String ratelimit;//限速比例,0到1之间
public String getCfgKeywords() {
return cfgKeywords;
}
public void setCfgKeywords(String cfgKeywords) {
this.cfgKeywords = cfgKeywords;
}
// 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;
}
public String getRatelimit() {
return ratelimit;
}
public void setRatelimit(String ratelimit) {
this.ratelimit = ratelimit;
}
public static String getTablename() {
return tableName;
}
}

View File

@@ -15,6 +15,7 @@ import com.google.gson.annotations.Expose;
import com.nis.domain.basics.AsnGroupInfo;
import com.nis.domain.basics.AsnIpCfg;
import com.nis.domain.basics.IpReuseIpCfg;
import com.nis.domain.basics.UrlCommGroupCfg;
import com.nis.util.Constants;
import com.nis.util.excel.ExcelField;
@@ -88,8 +89,9 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
private List<AsnKeywordCfg> asnKeywords;
@ExcelField(title="log_total",sort=42)
private Long totalLogs;
private UrlCommGroupCfg urlCommGroupCfg;
private List<UrlCommGroupCfg> urlCommGroupList;
/*private CachePolicyUserRegion cachePolicyUserRegion;//缓存策略用户自定义域参数
public static class CachePolicyUserRegion{
@@ -411,4 +413,16 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
public void setTotalLogs(Long totalLogs) {
this.totalLogs = totalLogs;
}
public List<UrlCommGroupCfg> getUrlCommGroupList() {
return urlCommGroupList;
}
public void setUrlCommGroupList(List<UrlCommGroupCfg> urlCommGroupList) {
this.urlCommGroupList = urlCommGroupList;
}
public UrlCommGroupCfg getUrlCommGroupCfg() {
return urlCommGroupCfg;
}
public void setUrlCommGroupCfg(UrlCommGroupCfg urlCommGroupCfg) {
this.urlCommGroupCfg = urlCommGroupCfg;
}
}

View File

@@ -0,0 +1,37 @@
package com.nis.domain.configuration.template;
import com.nis.util.excel.ExcelField;
/**
* @Description: excel导入url分组 配置
*/
public class UrlCommGroupTemplate extends BasicTemplate{
private String cfgDesc;
private String cfgKeywords;
private String matchMethod;
@ExcelField(title="config_describe",align=2,sort=1)
public String getCfgDesc() {
return cfgDesc;
}
public void setCfgDesc(String cfgDesc) {
this.cfgDesc = cfgDesc;
}
@ExcelField(title="key_word",align=2,sort=2)
public String getCfgKeywords() {
return cfgKeywords;
}
public void setCfgKeywords(String cfgKeywords) {
this.cfgKeywords = cfgKeywords;
}
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=3)
public String getMatchMethod() {
return matchMethod;
}
public void setMatchMethod(String matchMethod) {
this.matchMethod = matchMethod;
}
}

View File

@@ -0,0 +1,155 @@
package com.nis.web.controller.basics;
import java.util.ArrayList;
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.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
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.servlet.mvc.support.RedirectAttributes;
import com.nis.domain.FunctionRegionDict;
import com.nis.domain.FunctionServiceDict;
import com.nis.domain.Page;
import com.nis.domain.basics.AsnIpCfg;
import com.nis.domain.basics.UrlCommGroupCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.HttpUrlCfg;
import com.nis.exceptions.MaatConvertException;
import com.nis.util.Constants;
import com.nis.util.DictUtils;
import com.nis.util.StringUtil;
import com.nis.web.controller.BaseController;
import com.nis.web.service.basics.UrlCommGroupService;
@Controller
@RequestMapping(value = "${adminPath}/basics/url")
public class UrlCommGroupController extends BaseController{
@Autowired
private UrlCommGroupService urlCommGroupService;
@RequestMapping(value = {"/list"})
public String list(Model model,HttpServletRequest request
,HttpServletResponse response,@ModelAttribute("cfg")UrlCommGroupCfg entity
){
Page<UrlCommGroupCfg> page = urlCommGroupService.findPage(new Page<UrlCommGroupCfg>(request, response,"r"), entity);
model.addAttribute("page", page);
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
model.addAttribute("regionList", regionList);
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entity.getFunctionId());
model.addAttribute("serviceList", serviceList);
return "/basics/urlCommGroupList";
}
@RequestMapping(value = {"/addForm"})
public String addForm(Model model,HttpServletRequest request
,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg
,RedirectAttributes redirectAttributes){
// UrlCommGroupCfg urlCfg = new UrlCommGroupCfg();
// urlCfg.setCfgType("NTC_URL_REGION");
// cfg.setUrlCommGroupCfg(urlCfg);
// List<UrlCommGroupCfg> urlList = new ArrayList<UrlCommGroupCfg>();
// urlList.add(urlCfg);
// cfg.setUrlCommGroupList(urlList);
// initFormCondition(model, entity);
cfg.setGroupType(11);
initFormCondition(model,cfg);
//List<ConfigGroupInfo> groupInfos=configGroupInfoService.findAllList(4);
//model.addAttribute("policyGroups", groupInfos);
model.addAttribute("_cfg", cfg);
return "/basics/urlCommGroupFormAdd";
}
@RequestMapping(value = {"/save"})
@RequiresPermissions(value={"http:url:config"})
public String save(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg,RedirectAttributes redirectAttributes){
System.out.println("URL分组");
try{
urlCommGroupService.saveUrlCommGroupCfg(cfg);
}catch(Exception e){
logger.error("信息保存失败",e);
e.printStackTrace();
if(e instanceof MaatConvertException) {
addMessage(redirectAttributes,"error",e.getMessage());
}else {
addMessage(redirectAttributes,"error","save_failed");
}
}
return "redirect:" + adminPath +"/basics/url/list?functionId="+cfg.getFunctionId();
}
//urlComm配置导出
@RequestMapping(value = "/exportUrlComm")
public void exportAsnIp(Model model,HttpServletRequest request,HttpServletResponse response,
@ModelAttribute("cfg")UrlCommGroupCfg entity,String ids,RedirectAttributes redirectAttributes){
try {
//export data info
List<String> titleList=new ArrayList<String>();
Map<String, Class<?>> classMap=new HashMap<String, Class<?>>();
Map<String, List> dataMap=new HashMap<String, List>();
Map<String, String> noExportMap=new HashMap<String, String>();
List<UrlCommGroupCfg> list = new ArrayList<UrlCommGroupCfg>();
if (!StringUtil.isEmpty(ids)) {
list = urlCommGroupService.findByPage(ids);
} else {
Page<UrlCommGroupCfg> pageInfo=new Page<UrlCommGroupCfg>(request, response,"r");
pageInfo.setPageNo(1);
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
Page<UrlCommGroupCfg> page = urlCommGroupService.findPage(pageInfo, entity);
list=page.getList();
}
//
titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), UrlCommGroupCfg.class);
String cfgIndexInfoNoExport=",block_type,do_log,action"
+ ",letter,whether_area_block,classification,attribute,label"
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,asn_no,is_hex,is_case_insenstive,";
// 时间过滤
if (entity.getSearch_create_time_start() == null ) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
dataMap.put(entity.getMenuNameCode(), list);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) {
logger.error("urlGroupConfig export failed",e);
addMessage(redirectAttributes,"error","export_failed");
}
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
}
}

View File

@@ -66,6 +66,7 @@ import com.nis.domain.configuration.template.SnatTemplate;
import com.nis.domain.configuration.template.StringAllNotDoLogTemplate;
import com.nis.domain.configuration.template.StringAllTemplate;
import com.nis.domain.configuration.template.TopicWebsiteTemplate;
import com.nis.domain.configuration.template.UrlCommGroupTemplate;
import com.nis.domain.specific.SpecificServiceCfg;
import com.nis.exceptions.MaatConvertException;
import com.nis.util.Constants;
@@ -490,6 +491,11 @@ public class IpController extends BaseController{
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, TopicWebsiteTemplate.class, 2);
excel.setDataList(pro,classList,null).
write(request,response, fileName).dispose();
}else if(regionDict.getFunctionId().equals(111)) {// url分组配置
List<UrlCommGroupTemplate> classList=new ArrayList<UrlCommGroupTemplate>();
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, UrlCommGroupTemplate.class, 2);
excel.setDataList(pro,classList,null).
write(request,response, fileName).dispose();
}else{
List<StringAllTemplate> classList=new ArrayList<StringAllTemplate>();
ExportExcel excel=new ExportExcel(serviceDict,regionDict,pro,null, StringAllTemplate.class, 2);

View File

@@ -0,0 +1,22 @@
package com.nis.web.dao.basics;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.basics.UrlCommGroupCfg;
import com.nis.web.dao.CrudDao;
import com.nis.web.dao.MyBatisDao;
@MyBatisDao
public interface UrlCommGroupDao extends CrudDao<UrlCommGroupDao>{
// 查询列表
public List<UrlCommGroupCfg> findAllPageList(UrlCommGroupCfg entity);
public List<UrlCommGroupCfg> findByPage(@Param("ids")String ids);
public List<UrlCommGroupCfg> findInfoByCfgId(@Param("cfgId")String cfgId);
//新增
public int insertUrlCommGroupCfg(UrlCommGroupCfg entity);
}

View File

@@ -0,0 +1,248 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nis.web.dao.basics.UrlCommGroupDao">
<resultMap id="urlCommGroupCfgMap" type="com.nis.domain.basics.UrlCommGroupCfg">
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
<result column="action" property="action" jdbcType="INTEGER" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
<result column="request_id" property="requestId" jdbcType="INTEGER" />
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
<result column="classify" property="classify" jdbcType="VARCHAR" />
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
<result column="lable" property="lable" jdbcType="VARCHAR" />
<result column="expr_type" property="exprType" jdbcType="INTEGER" />
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
<result column="function_id" property="functionId" jdbcType="INTEGER" />
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
<result column="ratelimit" property="ratelimit" jdbcType="VARCHAR" />
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
</resultMap>
<select id="findAllPageList" parameterType="com.nis.domain.basics.UrlCommGroupCfg" resultMap="urlCommGroupCfgMap">
SELECT
r.cfg_id,r.cfg_desc,r.cfg_keywords,r.action,r.is_valid,r.is_audit,r.creator_id,
r.create_time,r.editor_id,r.edit_time,r.auditor_id,r.audit_time,r.service_id,
r.request_id,r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,
r.cfg_region_code,r.cfg_type,r.ratelimit,r.user_region1,r.user_region2,
r.user_region3,r.user_region4,r.user_region5,
s.name AS creator_name,e.name AS editor_name,u.name AS auditor_name
FROM
http_url_cfg r
LEFT JOIN sys_user s ON r.creator_id = s.id
LEFT JOIN sys_user e ON r.editor_id = e.id
LEFT JOIN sys_user u ON r.auditor_id = u.id
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="page !=null and page.where != null and page.where != ''">
AND ${page.where}
</if>
<if test="cfgId != null">
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if>
<if test="cfgKeywords != null and cfgKeywords != ''">
AND r.cfg_keywords like concat(concat('%',#{cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
<if test="cfgRegionCode != null">
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
</if>
<if test="cfgType != null and cfgType != ''">
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
</if>
<if test="action != null">
AND r.ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="isValid != null">
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isValid == null">
AND r.IS_VALID != -1
</if>
<if test="isAudit != null">
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
<if test="creatorName != null and creatorName !=''">
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
</if>
<if test="createTime != null and createTime !=''">
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
</if>
<if test="editorName != null and editorName !=''">
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
</if>
<if test="editTime != null and editTime !='' ">
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
</if>
<if test="auditorName != null and auditorName !=''">
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
</if>
<if test="auditTime != null and auditTime !=''">
AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
</if>
<if test="serviceId != null">
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="requestId != null">
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null">
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if>
<if test="classify != null and classify !=''">
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
</if>
<if test="attribute != null and attribute !=''">
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
</if>
<if test="lable != null and lable !=''">
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
</if>
<if test="areaEffectiveIds != null and areaEffectiveIds !=''">
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if>
<if test="functionId != null">
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
</if>
<!-- 数据范围过滤 -->
${sqlMap.dsf}
</trim>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY r.create_time desc
</otherwise>
</choose>
</select>
<select id="findByPage" resultMap="urlCommGroupCfgMap">
SELECT
r.cfg_id,r.cfg_desc,r.cfg_keywords,r.action,r.is_valid,r.is_audit,r.creator_id,
r.create_time,r.editor_id,r.edit_time,r.auditor_id,r.audit_time,r.service_id,
r.request_id,r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,
r.cfg_region_code,r.cfg_type,r.ratelimit,r.user_region1,r.user_region2,
r.user_region3,r.user_region4,r.user_region5,
s.name AS creator_name,e.name AS editor_name,u.name AS auditor_name
FROM
http_url_cfg r
LEFT JOIN sys_user s ON r.creator_id = s.id
LEFT JOIN sys_user e ON r.editor_id = e.id
LEFT JOIN sys_user u ON r.auditor_id = u.id
where r.CFG_ID in (${ids})
</select>
<select id="findInfoByCfgId" resultMap="urlCommGroupCfgMap">
SELECT
r.cfg_id,r.cfg_desc,r.cfg_keywords,r.action,r.is_valid,r.is_audit,r.creator_id,
r.create_time,r.editor_id,r.edit_time,r.auditor_id,r.audit_time,r.service_id,
r.request_id,r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,
r.cfg_region_code,r.cfg_type,r.ratelimit,r.user_region1,r.user_region2,
r.user_region3,r.user_region4,r.user_region5,
s.name AS creator_name,e.name AS editor_name,u.name AS auditor_name
FROM
http_url_cfg r
LEFT JOIN sys_user s ON r.creator_id = s.id
LEFT JOIN sys_user e ON r.editor_id = e.id
LEFT JOIN sys_user u ON r.auditor_id = u.id
where r.CFG_ID =#{cfgId}
</select>
<insert id="insertUrlCommGroupCfg" parameterType="com.nis.domain.basics.UrlCommGroupCfg">
insert into http_url_cfg (
CFG_DESC,
cfg_keywords,
action,
is_valid,
is_audit,
creator_id,
create_time,
editor_id,
edit_time,
auditor_id,
audit_time,
service_id,
request_id,
compile_id,
IS_AREA_EFFECTIVE,
CLASSIFY,
ATTRIBUTE,
LABLE,
expr_type,
match_method,
is_hexbin,
area_effective_ids,
function_id,
cfg_region_code,
cfg_type,
ratelimit,
user_region1,
user_region2,
user_region3,
user_region4,
user_region5
)values (
#{cfgDesc,jdbcType=VARCHAR},
#{cfgKeywords,jdbcType=VARCHAR},
#{action,jdbcType=INTEGER},
#{isValid,jdbcType=INTEGER},
#{isAudit,jdbcType=INTEGER},
#{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{editorId,jdbcType=INTEGER},
#{editTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER},
#{auditTime,jdbcType=TIMESTAMP},
#{serviceId,jdbcType=INTEGER},
#{requestId,jdbcType=INTEGER},
#{compileId,jdbcType=INTEGER},
#{isAreaEffective,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},
#{attribute,jdbcType=VARCHAR},
#{lable,jdbcType=VARCHAR},
#{exprType,jdbcType=INTEGER},
#{matchMethod,jdbcType=INTEGER},
#{isHexbin,jdbcType=INTEGER},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{cfgRegionCode,jdbcType=INTEGER},
#{cfgType,jdbcType=VARCHAR},
#{ratelimit,jdbcType=VARCHAR},
#{userRegion1,jdbcType=VARCHAR},
#{userRegion2,jdbcType=VARCHAR},
#{userRegion3,jdbcType=VARCHAR},
#{userRegion4,jdbcType=VARCHAR},
#{userRegion5,jdbcType=VARCHAR}
)
</insert>
</mapper>

View File

@@ -0,0 +1,74 @@
package com.nis.web.service.basics;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.nis.domain.Page;
import com.nis.domain.basics.AsnGroupInfo;
import com.nis.domain.basics.AsnIpCfg;
import com.nis.domain.basics.UrlCommGroupCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.specific.ConfigGroupInfo;
import com.nis.util.ConfigServiceUtil;
import com.nis.util.Constants;
import com.nis.web.dao.CrudDao;
import com.nis.web.dao.basics.UrlCommGroupDao;
import com.nis.web.service.CrudService;
@Service
public class UrlCommGroupService extends CrudService<CrudDao<UrlCommGroupCfg>, UrlCommGroupCfg>{
@Autowired
private UrlCommGroupDao urlCommGroupDao;
public Page<UrlCommGroupCfg> findPage(Page<UrlCommGroupCfg> page, UrlCommGroupCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
entity.setPage(page);
List<UrlCommGroupCfg> list=urlCommGroupDao.findAllPageList(entity);
page.setList(list);
return page;
}
public List<UrlCommGroupCfg> findByPage(String ids) {
List<UrlCommGroupCfg> list=urlCommGroupDao.findByPage(ids);
return list;
}
//新增 insertUrlCommGroupCfg
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void saveUrlCommGroupCfg(CfgIndexInfo entity) {
Date createTime=new Date();
if(entity.getUrlCommGroupList()!=null) {
for(UrlCommGroupCfg cfg:entity.getUrlCommGroupList()) {
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
cfg.setRequestId(0);
cfg.setClassify("0");
cfg.setAttribute("0");
cfg.setLable("0");
cfg.setIsHexbin(0);
cfg.setCreateTime(createTime);
cfg.setCreatorId(entity.getCurrentUser().getId());
cfg.setIsValid(Constants.VALID_NO);
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
if(cfg.getCfgKeywords().contains("and")){
cfg.setExprType(1);
}else{
cfg.setExprType(0);
}
urlCommGroupDao.insertUrlCommGroupCfg(cfg);
}
}
}
}

View File

@@ -1,7 +1,7 @@
--URL DNS COMMONGROUPS
--<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>->common_group->DNS<EFBFBD>ؼ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>URL<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
--ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-><EFBFBD>߼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>->DNS<EFBFBD>ؼ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>URL<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1250', '717', '0,1,86,717,', 'dns_keyword_group_configuration', 'DNS<EFBFBD>ؼ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '5090', '/basics/dns/keyword/list', '', '', '1', 'dns:keyword:config', '1', '2019-02-14 15:00:20', '1', '2019-02-14 15:00:20', '', '1', NULL, '0', '0', NULL);
INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1249', '717', '0,1,86,717,', 'url_group_configuration', 'URL<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '5060', '/basics/url/list', '', '', '1', 'http:url:config', '1', '2019-02-14 14:57:10', '1', '2019-02-14 14:57:10', '', '1', NULL, '0', '0', NULL);
INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1250', '717', '0,1,86,717,', 'dns_keyword_group_configuration', 'DNS<EFBFBD>ؼ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '5090', '/basics/dns/keyword/list', '', '', '1', 'dns:keyword:config', '1', '2019-02-14 15:00:20', '1', '2019-02-14 15:00:20', '', '1', NULL, '0', '0', '409');
INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1249', '717', '0,1,86,717,', 'url_group_configuration', 'URL<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '5060', '/basics/url/list', '', '', '1', 'http:url:config', '1', '2019-02-14 14:57:10', '1', '2019-02-14 14:57:10', '', '1', NULL, '0', '0', '111');
INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1248', '1236', '0,1,109,1236,', 'url_group_manage', 'URL<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '500', '/basics/policyGroup/policyGroupList?groupType=11', '', 'fa fa-globe', '1', '', '1', '2019-02-14 14:27:15', '1', '2019-02-14 14:27:15', '', '1', NULL, '0', '0', NULL);
INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1247', '1236', '0,1,109,1236,', 'dns_keyword_group_manage', 'DNS<EFBFBD>ؼ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '30', '/basics/policyGroup/policyGroupList?groupType=12', '', 'fa fa-map', '1', '', '1', '2019-02-14 14:14:56', '1', '2019-02-14 14:14:56', '', '1', NULL, '0', '0', NULL);

View File

@@ -119,13 +119,13 @@
</div>
<div for="action"></div>
</div>
<!-- 600 asn ip、 3IP白名单、 405APP协议IP、 403APP域名特征、 563 APP Payload、 565 APP HTTP、 564 APP DNS、 566 APP SSL -->
<!-- 111:url公共组域配置 、600 asn ip、 3IP白名单、 405APP协议IP、 403APP域名特征、 563 APP Payload、 565 APP HTTP、 564 APP DNS、 566 APP SSL -->
<c:if test="${(cfg.functionId eq 600) || (cfg.functionId eq 3) || (cfg.functionId eq 405) || (cfg.functionId eq 403) || (cfg.functionId eq 563) || (cfg.functionId eq 565) || (cfg.functionId eq 564) || (cfg.functionId eq 566) ||
(cfg.functionId eq 560) }">
(cfg.functionId eq 560) || (cfg.functionId eq 111)}">
<div class="row hidden requestIdSel">
</c:if>
<c:if test="${(cfg.functionId ne 600) && (cfg.functionId ne 3) && (cfg.functionId ne 405) && (cfg.functionId ne 403) && (cfg.functionId ne 563) && (cfg.functionId ne 565) && (cfg.functionId ne 564) && (cfg.functionId ne 566) &&
(cfg.functionId ne 560) }">
(cfg.functionId ne 560) && (cfg.functionId ne 111) }">
<div class="row requestIdSel">
</c:if>
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="letter"/></label>
@@ -273,10 +273,10 @@
</div>
</div>
</div>
<c:if test="${cfg.functionId eq 600 }">
<c:if test="${(cfg.functionId eq 600) || (cfg.functionId eq 111)}">
<div class="modal-footer" style="border-top:0px">
</c:if>
<c:if test="${cfg.functionId ne 600 }">
<c:if test="${(cfg.functionId ne 600) && (cfg.functionId ne 111)}">
<div class="modal-footer">
</c:if>
<button type="button" class="btn red" onclick="importCfg()">

View File

@@ -0,0 +1,327 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="url_group_configuration"></spring:message></title>
<script type="text/javascript">
var defaultIpInfo;
$(function(){
defaultIpInfo=$(".strInfo").clone(true);
// reSort($(defaultIpInfo),-1);
$(".asnIpAdd").click();
$("#cfgFrom").validate({
errorPlacement: function(error,element){
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
},
submitHandler: function(form){
/* $("[name='country']").val($("[name='userRegion1'] option:selected").attr("country"));
$("[name='detail']").val($("[name='userRegion1'] option:selected").attr("detail"));
$("[name='asnIpGroup']").val($("[name='userRegion1'] option:selected").attr("asnIpGroup")); */
loading('onloading...');
form.submit();
},
errorContainer: "#messageBox",
});
});
//业务窗口打开
var addContent = function(obj, contentClassName) {
var showDiv = $(obj).parent().parent().siblings("."+contentClassName).last();
if(showDiv.hasClass("hidden")){
$(showDiv).removeClass("hidden").removeClass(
"disabled");
}else{
var additional=defaultIpInfo.clone();
additional.removeClass("hidden").removeClass(
"disabled");
showDiv.after(additional);
}
var index=0;
$("."+contentClassName).each(function(){
reSort($(this),index);
// $(".tags").attr("id","tags_"+index+"_tagsinput");
index++;
});
$(".selectpicker").selectpicker("render");
}
//业务窗口关闭
var delContent = function(obj,contentClassName) {
if($("."+contentClassName).length==1){
top.$.jBox.tip("<spring:message code='one_more'/>");
return;
}
$(obj).parents("."+contentClassName).remove();
var index=0;
$("."+contentClassName).each(function(){
reSort($(this),index);
index++;
});
}
var reSort=function(obj,index){
$(obj).find("input,select").each(function(){
var name=$(this).attr("name");
if(name != undefined){
if(name.indexOf("urlCommGroupList[")>-1){
var namePrefix="urlCommGroupList[";
var nameSubfix=name.substring(name.indexOf("]"));
var nameNew=namePrefix+index+nameSubfix;
if(nameNew!=name){
$(this).attr("name",nameNew);
$(this).parents(".form-group").find("div[for='"+name+"']").attr("for",nameNew);
}
}
}
})
}
</script>
</head>
<body>
<div class="page-content">
<h3 class="page-title">
<spring:message code="url_group_configuration"></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>
<spring:message code="add"></spring:message>
</div>
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="cfgFrom" action="${ctx}/basics/url/save" method="post" class="form-horizontal">
<input type="hidden" name="functionId" value="${_cfg.functionId}">
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
<input type="hidden" id="compileId" name="compileId" value="0">
<input type="hidden" id="requestId" name="requestId" value="0">
<input type="hidden" id="asnIpGroup" name="asnIpGroup" value="0">
<c:forEach items="${serviceList}" var="service">
<input type="hidden" id="serviceId" name="serviceId" value="${service.serviceId}">
<input type="hidden" id="action" name="action" value="${service.action}">
</c:forEach>
<!-- 配置域类型 -->
<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"
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">
<!-- 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>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="urlGroup"/></label>
<div class="col-md-6">
<%-- <input class="form-control required digits asnMustExists" type="text" name="${cfgName}.cfgKeywords" value="${cfg.cfgKeywords}" ctx="${ctx}"> --%>
<select 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="${policyGroupInfos}" var="urlGroupInfo">
<option value="${urlGroupInfo.groupId}">${urlGroupInfo.groupName}</option>
</c:forEach>
</select>
</div>
<div for="userRegion3"></div>
</div>
</div>
</div>
<!-- desc and action -->
<h4 class="form-section">
<spring:message code="http_url_title" />
<small> <span
class="glyphicon glyphicon-plus asnIpAdd"
onClick="addContent(this,'strInfo')" title="add"></span></small>
</h4>
<div class="row strInfo boxSolid asnIp hidden disabled">
<!-- <input type="hidden" name="asnIpCfgs[0].protocolId" value="0"> -->
<div class="row">
<div class="pull-right">
<span class="glyphicon glyphicon-remove pull-right" title="remove"
onClick="delContent(this,'strInfo');" />
</div>
</div>
<c:forEach items="${regionList}" var="region" varStatus="status">
<%-- <c:set var="cfgName" value="urlCommGroupList[-1]"></c:set> --%>
<%-- <input type="hidden" name="${cfgName}.sourceCompileId" value="${cfg.sourceCompileId }"> --%>
<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 <c:if test="${fn:containsIgnoreCase(region.configServiceType,'domain') }"> domainCheck </c:if> <c:if test="${fn:containsIgnoreCase(region.configServiceType,'url') }"> urlCheck </c:if>" type="text" id="tags_${tabName}${status.index}"
name="urlCommGroupList[-1].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
<c:if test="${fn:containsIgnoreCase(region.configServiceType,'domain') }"> domainCheck </c:if>
<c:if test="${fn:containsIgnoreCase(region.configServiceType,'url') }"> urlCheck </c:if>
"
type="text"
name="urlCommGroupList[-1].cfgKeywords"
>
</div>
</c:if>
<div for="urlCommGroupList[-1].cfgKeywords"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 exprType">
<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,',')}" varStatus="stat" >
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC" >
<c:if test="${exprTypeC.itemCode eq exprType}">
<label class="radio-inline">
<input type="radio"
name="urlCommGroupList[-1].exprType" value="${exprType }"
class="required"
<c:if test="${stat.index == 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="urlCommGroupList[-1].exprType" value="${exprTypeC.itemCode }"
class="required" checked >
<spring:message code="${exprTypeC.itemValue }" />
</label>
</c:if>
</c:forEach>
</c:if>
</div>
<div for="urlCommGroupList[-1].exprType"></div>
</div>
</div>
<div class="col-md-6 matchMethod">
<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="urlCommGroupList[-1].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}"
>
<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="urlCommGroupList[-1].matchMethod"></div>
</div>
</div>
</div>
</c:forEach>
</div>
</div>
<%-- <div class="row">
<button type="button" class="btn btn-red-hollow center-block"
onClick="more(this);" data-click-times="0">
<spring:message code="show_more" />
</button>
</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>

View File

@@ -0,0 +1,311 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="url_group_configuration"></spring:message></title>
<script>
$(document).ready(function() {
//搜索框提示语初始化
if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){
$("#intype").val("${cfg.compileId}");
}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",'');
$("#description").attr("value",'');
$("#searchForm")[0].reset();
});
if($("#exportType").val() != null && $("#exportType").val() != ""){
if($("#intype").val() != null && $("#intype").val() != ""){
$("#exportValue").val($("#intype").val());
}
}
});
var edit=function(url){
var cked = $('tbody tr td input.i-checks:checkbox:checked');
if(cked.val()==1){
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
return;
}
if(cked.length==1){
window.location = url+"&compileId="+cked.attr("id");
}else{
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
return;
}
}
</script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<shiro:hasPermission name="asn:ip:config">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/basics/url/addForm?functionId=${cfg.functionId}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message></button>
<button type="button" class="btn btn-primary import" >
<i class="fa fa-plus"></i>
<spring:message code="import"></spring:message></button>
</shiro:hasPermission>
</div>
<h3 class="page-title">
<spring:message code="url_group_configuration"></spring:message>
</h3>
<h5 class="page-header"></h5>
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/basics/url/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="exportType" type="hidden" value="${cfg.seltype}"/>
<input id="exportValue" type="hidden" value=""/>
<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">
<form:select path="asnIpGroup" class="selectpicker select2 input-small" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code='asn_ip_group'/></form:option>
<c:forEach items="${policyGroups}" var="policyGroup">
<form:option value="${policyGroup.groupId}"><spring:message code='${policyGroup.groupName}'/></form:option>
</c:forEach>
</form:select>
</div> --%>
<div class="pull-left">
<c:set var="state"><spring:message code='group'/></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="cfgKeywords"><spring:message code="URL"></spring:message></form:option>
<%-- <form:option value="action"><spring:message code="block_type"></spring:message></form:option> --%>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
</form:select>
</div>
<input id="intype" class="form-control input-medium" type="text" value="">
<div class="input-group-btn">
<form:select path="isValid" class="selectpicker select2 input-small" >
<form:option value=""><spring:message code="select"/></form:option>
<form:option value="1"><spring:message code="yes"/></form:option>
<form:option value="0"><spring:message code="no"/></form:option>
</form:select>
</div>
</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="asn:ip:config">
<sys:delRow url="${ctx}/basics/asn/updateForm?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/basics/asn/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
</shiro:hasPermission>
<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="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/basics/url/exportUrlComm?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/basics/url/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/basics/url/exportUrlComm?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/basics/url/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="asn: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}/basics/asn/audit?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/basics/asn/audit?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/basics/asn/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-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>
<sys:message content="${message}" type="${messageType }"/>
<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="sort-column r.compile_id" style="display: none;" column="cfg_id" ><spring:message code="cfg_id"/></th>
<th column="config_describe" ><spring:message code="config_describe"/></th>
<th class="sort-column cfg_keywords">URL<spring:message code="key_word"/></th>
<th><spring:message code="is_audit"/></th>
<th column="valid_identifier" ><spring:message code="valid_identifier"/></th>
<th column="creator" ><spring:message code="creator"/></th>
<th column="config_time" class="sort-column create_time"><spring:message code="config_time"/></th>
<th column="editor" ><spring:message code="editor"/></th>
<th column="edit_time" class="sort-column edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th>
<th class="sort-column 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" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="${cfg.isAudit}"></td>
<td>${cfg.compileId }</td>
<td>${cfg.cfgDesc }</td>
<td>${cfg.cfgKeywords }</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>
<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>${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">${page}</div>
</div>
</div>
</div>
</div>
</div>
<c:set var="importPath" value="/basics/url/list?functionId=${cfg.functionId}"/>
<!-- 模板导入start -->
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
</body>
</html>