(1)为了使用批量更新,修改了updateByPrimaryKeySelective方法的方法名为update
(2)多域类配置加入地域IP (3)多域类配置可任选 (4)多域类配置加入批量删除,审核
This commit is contained in:
@@ -325,7 +325,7 @@ public class BaseController {
|
||||
}
|
||||
protected void setSaveOrUpdateProps(Model model,BaseCfg cfg,String areaCfgIds) throws Exception{
|
||||
String tableName=cfg.getTableName();
|
||||
List<AreaIpCfg> areaCfg=cfg.getAreaCfg();
|
||||
List<BaseIpCfg> areaCfg=cfg.getAreaCfg();
|
||||
List<AreaBean> areaIsps=cfg.getAreaIsp();
|
||||
if(Constants.IS_AREA_EFFECTIVE_NO==cfg.getIsAreaEffective()){
|
||||
cfg.setAreaEffectiveIds("");
|
||||
@@ -372,11 +372,11 @@ public class BaseController {
|
||||
Date date=new Date();
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
if(cfg.getCfgId()==null){
|
||||
if(cfg.getCfgId()==null){//新增
|
||||
cfg.setCreatorId(cfg.getCurrentUser().getId());
|
||||
cfg.setCreateTime(date);
|
||||
if(Constants.IS_AREA_EFFECTIVE_YES==cfg.getIsAreaEffective()&&areaCfg!=null){
|
||||
for(AreaIpCfg area:areaCfg){
|
||||
for(BaseIpCfg area:areaCfg){
|
||||
area.setTableName(AreaIpCfg.getTablename());
|
||||
area.setServiceId(serviceId);
|
||||
area.setCompileId(cfg.getCompileId());
|
||||
@@ -400,18 +400,18 @@ public class BaseController {
|
||||
}else if(cfg instanceof ComplexkeywordCfg){
|
||||
complexStringCfgService.addStringCfg((ComplexkeywordCfg)cfg,areaCfg);
|
||||
}
|
||||
}else{
|
||||
}else{//修改
|
||||
cfg.setEditorId(cfg.getCurrentUser().getId());
|
||||
cfg.setEditTime(new Date());
|
||||
List<AreaIpCfg> updateAreaCfg=new ArrayList<>();
|
||||
List<AreaIpCfg> deleteAreaCfg=new ArrayList<>();
|
||||
List<AreaIpCfg> addAreaCfg=new ArrayList<>();
|
||||
List<BaseIpCfg> updateAreaCfg=new ArrayList<>();
|
||||
List<BaseIpCfg> deleteAreaCfg=new ArrayList<>();
|
||||
List<BaseIpCfg> addAreaCfg=new ArrayList<>();
|
||||
String[] cfgIds=null;
|
||||
if(!StringUtils.isBlank(areaCfgIds)){
|
||||
cfgIds=areaCfgIds.split(",");
|
||||
}
|
||||
if(Constants.IS_AREA_EFFECTIVE_YES==cfg.getIsAreaEffective()&&areaCfg!=null){
|
||||
for(AreaIpCfg area:areaCfg){
|
||||
for(BaseIpCfg area:areaCfg){
|
||||
area.setTableName(AreaIpCfg.getTablename());
|
||||
area.setServiceId(serviceId);
|
||||
area.setCompileId(cfg.getCompileId());
|
||||
|
||||
@@ -204,13 +204,15 @@ public class ComplexStringCfgController extends BaseController{
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
List<ComplexkeywordCfg> beans=complexStringCfgService.getList(tableName,ids);
|
||||
List<ComplexkeywordCfg> auditBeans=new ArrayList<>();
|
||||
List<AreaIpCfg> auditAreaBeans=new ArrayList<>();
|
||||
List<BaseIpCfg> auditAreaBeans=new ArrayList<>();
|
||||
Date date=new Date();
|
||||
for(ComplexkeywordCfg bean:beans){
|
||||
ComplexkeywordCfg auditBean=new ComplexkeywordCfg();
|
||||
auditBean.setTableName(tableName);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
auditBean.setCfgId(bean.getCfgId());
|
||||
bean.setTableName(tableName);
|
||||
bean.setMaatTable(maatTable);
|
||||
int audit=bean.getIsAudit().intValue();
|
||||
if(audit==Constants.AUDIT_YES&&isAudit!=Constants.AUDIT_NOT_YES){
|
||||
logger.error("审核通过的配置只能取消审核通过!");
|
||||
@@ -225,18 +227,23 @@ public class ComplexStringCfgController extends BaseController{
|
||||
bean.setIsAudit(isAudit);
|
||||
if(isAudit==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
auditBean.setIsValid(Constants.VALID_NO);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
bean.setIsValid(Constants.VALID_NO);
|
||||
bean.setMaatTable(maatTable);
|
||||
}else if(isAudit==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
auditBean.setIsValid(Constants.VALID_YES);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
bean.setIsValid(Constants.VALID_YES);
|
||||
bean.setMaatTable(maatTable);
|
||||
}
|
||||
List<AreaIpCfg> areaCfg=ipCfgService.getAreaCfgByCompileId(bean.getCompileId());
|
||||
for(AreaIpCfg c:areaCfg){
|
||||
c.setMaatTable(AreaIpCfg.getMaattable());
|
||||
c.setTableName(AreaIpCfg.getTablename());
|
||||
c.setAuditorId(c.getCurrentUser().getId());
|
||||
c.setAuditTime(date);
|
||||
c.setIsAudit(isAudit);
|
||||
if(isAudit==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
c.setIsValid(Constants.VALID_NO);
|
||||
}else if(isAudit==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
c.setIsValid(Constants.VALID_YES);
|
||||
}
|
||||
}
|
||||
bean.setAreaCfg(areaCfg);
|
||||
auditAreaBeans.addAll(areaCfg);
|
||||
@@ -277,7 +284,7 @@ public class ComplexStringCfgController extends BaseController{
|
||||
}
|
||||
}
|
||||
List<ComplexkeywordCfg> complexCfgs=new ArrayList<ComplexkeywordCfg>();
|
||||
List<AreaIpCfg> areaCfgs=new ArrayList<AreaIpCfg>();
|
||||
List<BaseIpCfg> areaCfgs=new ArrayList<BaseIpCfg>();
|
||||
Date date =new Date();
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
for(String compileIdStr:ids.split(",")){
|
||||
|
||||
@@ -31,44 +31,6 @@ import com.nis.web.controller.BaseController;
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/cfg/ip")
|
||||
public class IpCfgController extends BaseController{
|
||||
/**
|
||||
*
|
||||
* cfgList(配置列表)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param model
|
||||
* @param cfgName
|
||||
* @param ipCfg
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
// @RequestMapping(value = {"cfgList"})
|
||||
// @RequiresPermissions("cfg:ip:edit")
|
||||
// public String cfgList(Model model,String cfgName,@ModelAttribute("ipCfg")BaseIpCfg ipCfg,HttpServletRequest request,HttpServletResponse response){
|
||||
// return ipCfgList(model,Constants.CFG_PAGE,cfgName,ipCfg,request,response);
|
||||
// }
|
||||
/**
|
||||
*
|
||||
* auditList(审核列表)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param model
|
||||
* @param cfgName
|
||||
* @param ipCfg
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
// @RequestMapping(value = {"auditList"})
|
||||
// @RequiresPermissions("cfg:ip:audit")
|
||||
// public String auditList(Model model,String cfgName,@ModelAttribute("ipCfg")BaseIpCfg ipCfg,HttpServletRequest request,HttpServletResponse response){
|
||||
// return ipCfgList(model,Constants.AUDIT_PAGE,cfgName,ipCfg,request,response);
|
||||
// }
|
||||
@RequestMapping(value = {"list"})
|
||||
@RequiresPermissions(value={"cfg:ip:view"})
|
||||
public String ipCfgList(Model model,Integer audit,String cfgName,@ModelAttribute("ipCfg")BaseIpCfg ipCfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
@@ -279,13 +241,15 @@ public class IpCfgController extends BaseController{
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
List<BaseIpCfg> beans=ipCfgService.getList(tableName,ids);
|
||||
List<BaseIpCfg> auditBeans=new ArrayList<>();
|
||||
List<AreaIpCfg> auditAreaBeans=new ArrayList<>();
|
||||
List<BaseIpCfg> auditAreaBeans=new ArrayList<>();
|
||||
Date date=new Date();
|
||||
for(BaseIpCfg bean:beans){
|
||||
BaseIpCfg auditBean=new BaseIpCfg();
|
||||
auditBean.setTableName(tableName);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
auditBean.setCfgId(bean.getCfgId());
|
||||
bean.setTableName(tableName);
|
||||
bean.setMaatTable(maatTable);
|
||||
int audit=bean.getIsAudit().intValue();
|
||||
if(audit==Constants.AUDIT_YES&&isAudit!=Constants.AUDIT_NOT_YES){
|
||||
logger.error("审核通过的配置只能取消审核通过!");
|
||||
@@ -300,18 +264,23 @@ public class IpCfgController extends BaseController{
|
||||
bean.setIsAudit(isAudit);
|
||||
if(isAudit==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
auditBean.setIsValid(Constants.VALID_NO);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
bean.setIsValid(Constants.VALID_NO);
|
||||
bean.setMaatTable(maatTable);
|
||||
}else if(isAudit==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
auditBean.setIsValid(Constants.VALID_YES);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
bean.setIsValid(Constants.VALID_YES);
|
||||
bean.setMaatTable(maatTable);
|
||||
}
|
||||
List<AreaIpCfg> areaCfg=ipCfgService.getAreaCfgByCompileId(bean.getCompileId());
|
||||
for(AreaIpCfg c:areaCfg){
|
||||
c.setMaatTable(AreaIpCfg.getMaattable());
|
||||
c.setTableName(AreaIpCfg.getTablename());
|
||||
c.setAuditorId(c.getCurrentUser().getId());
|
||||
c.setAuditTime(date);
|
||||
c.setIsAudit(isAudit);
|
||||
if(isAudit==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
c.setIsValid(Constants.VALID_NO);
|
||||
}else if(isAudit==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
c.setIsValid(Constants.VALID_YES);
|
||||
}
|
||||
}
|
||||
bean.setAreaCfg(areaCfg);
|
||||
auditAreaBeans.addAll(areaCfg);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,5 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -12,9 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.NumBoundaryCfg;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.main.ConvertTool;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.controller.BaseController;
|
||||
@@ -136,8 +133,8 @@ public class NumCfgController extends BaseController{
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"auditCfg"})
|
||||
public String auditStringCfg(String cfgName,NumBoundaryCfg cfg,Model model) {
|
||||
@RequestMapping(value = {"audit"})
|
||||
public String auditCfg(String cfgName,NumBoundaryCfg cfg,Model model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("audit", Constants.AUDIT_PAGE);
|
||||
model.addAttribute("cfgType","num");
|
||||
@@ -190,8 +187,8 @@ public class NumCfgController extends BaseController{
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"deleteCfg"})
|
||||
public String deleteStringCfg(int action,long cfgId,String cfgName,Integer serviceId,Model model) {
|
||||
@RequestMapping(value = {"delete"})
|
||||
public String deleteCfg(int action,long cfgId,String cfgName,Integer serviceId,Model model) {
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
|
||||
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.controller.BaseController;
|
||||
@@ -221,13 +222,15 @@ public class StringCfgController extends BaseController{
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
List<BaseStringCfg> beans=stringCfgService.getList(tableName,ids);
|
||||
List<BaseStringCfg> auditBeans=new ArrayList<>();
|
||||
List<AreaIpCfg> auditAreaBeans=new ArrayList<>();
|
||||
List<BaseIpCfg> auditAreaBeans=new ArrayList<>();
|
||||
Date date=new Date();
|
||||
for(BaseStringCfg bean:beans){
|
||||
BaseStringCfg auditBean=new BaseStringCfg();
|
||||
auditBean.setTableName(tableName);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
auditBean.setCfgId(bean.getCfgId());
|
||||
bean.setTableName(tableName);
|
||||
bean.setMaatTable(maatTable);
|
||||
int audit=bean.getIsAudit().intValue();
|
||||
if(audit==Constants.AUDIT_YES&&isAudit!=Constants.AUDIT_NOT_YES){
|
||||
logger.error("审核通过的配置只能取消审核通过!");
|
||||
@@ -242,18 +245,23 @@ public class StringCfgController extends BaseController{
|
||||
bean.setIsAudit(isAudit);
|
||||
if(isAudit==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
auditBean.setIsValid(Constants.VALID_NO);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
bean.setIsValid(Constants.VALID_NO);
|
||||
bean.setMaatTable(maatTable);
|
||||
}else if(isAudit==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
auditBean.setIsValid(Constants.VALID_YES);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
bean.setIsValid(Constants.VALID_YES);
|
||||
bean.setMaatTable(maatTable);
|
||||
}
|
||||
List<AreaIpCfg> areaCfg=ipCfgService.getAreaCfgByCompileId(bean.getCompileId());
|
||||
for(AreaIpCfg c:areaCfg){
|
||||
c.setMaatTable(AreaIpCfg.getMaattable());
|
||||
c.setTableName(AreaIpCfg.getTablename());
|
||||
c.setAuditorId(c.getCurrentUser().getId());
|
||||
c.setAuditTime(date);
|
||||
c.setIsAudit(isAudit);
|
||||
if(isAudit==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
c.setIsValid(Constants.VALID_NO);
|
||||
}else if(isAudit==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
c.setIsValid(Constants.VALID_YES);
|
||||
}
|
||||
}
|
||||
bean.setAreaCfg(areaCfg);
|
||||
auditAreaBeans.addAll(areaCfg);
|
||||
@@ -297,7 +305,7 @@ public class StringCfgController extends BaseController{
|
||||
}
|
||||
model.addAttribute("tableName", tableName);
|
||||
List<BaseStringCfg> stringCfgs=new ArrayList<BaseStringCfg>();
|
||||
List<AreaIpCfg> areaCfgs=new ArrayList<AreaIpCfg>();
|
||||
List<BaseIpCfg> areaCfgs=new ArrayList<BaseIpCfg>();
|
||||
Date date =new Date();
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
for(String compileIdStr:ids.split(",")){
|
||||
|
||||
@@ -20,7 +20,7 @@ public interface ComplexStringCfgDao extends CrudDao<ComplexkeywordCfg>{
|
||||
public List<ComplexkeywordCfg> getList(@Param("tableName")String tableName,@Param("ids")String ids) ;
|
||||
public List<ComplexkeywordCfg> findList(ComplexkeywordCfg entity) ;
|
||||
public int insert(ComplexkeywordCfg entity) ;
|
||||
public int updateByPrimaryKeySelective(ComplexkeywordCfg entity) ;
|
||||
public int update(ComplexkeywordCfg entity) ;
|
||||
public int updateValid(ComplexkeywordCfg entity) ;
|
||||
public int audit(ComplexkeywordCfg entity) ;
|
||||
public int getIsValid(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
<include refid="ComplexkeywordCfg_Value_List" />
|
||||
)
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
<update id="update" parameterType="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
update ${tableName}
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
|
||||
@@ -20,7 +20,7 @@ public interface IpCfgDao extends CrudDao<BaseIpCfg>{
|
||||
public List<BaseIpCfg> findList(BaseIpCfg entity) ;
|
||||
public List<BaseIpCfg> getList(@Param("tableName")String tableName,@Param("ids")String ids) ;
|
||||
public int insert(BaseIpCfg entity) ;
|
||||
public int updateByPrimaryKeySelective(BaseIpCfg entity) ;
|
||||
public int update(BaseIpCfg entity) ;
|
||||
public int updateValid(BaseIpCfg entity) ;
|
||||
public int audit(BaseIpCfg entity) ;
|
||||
public int getIsValid(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
|
||||
@@ -441,7 +441,7 @@
|
||||
<include refid="BaseIpCfg_Value_List" />
|
||||
)
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.nis.domain.configuration.BaseIpCfg" >
|
||||
<update id="update" parameterType="com.nis.domain.configuration.BaseIpCfg" >
|
||||
update ${tableName}
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
|
||||
@@ -19,7 +19,7 @@ public interface StringCfgDao extends CrudDao<BaseStringCfg>{
|
||||
public BaseStringCfg get(BaseStringCfg entity) ;
|
||||
public List<BaseStringCfg> findList(BaseStringCfg entity) ;
|
||||
public int insert(BaseStringCfg entity) ;
|
||||
public int updateByPrimaryKeySelective(BaseStringCfg entity) ;
|
||||
public int update(BaseStringCfg entity) ;
|
||||
public int updateValid(BaseStringCfg entity) ;
|
||||
public int audit(BaseStringCfg entity) ;
|
||||
public int getIsValid(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
<include refid="BaseStringCfg_Value_List" />
|
||||
)
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
<update id="update" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName}
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
|
||||
@@ -138,7 +138,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public void saveIpBatch(List<AreaIpCfg> areaIpCfgs) {
|
||||
public void saveIpBatch(List<BaseIpCfg> areaIpCfgs) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
@@ -189,7 +189,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public void updateIpBatch(List<AreaIpCfg> areaCfg) {
|
||||
public void updateIpBatch(List<BaseIpCfg> areaCfg) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
@@ -267,7 +267,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public void auditIpBatch(List<AreaIpCfg> data) {
|
||||
public void auditIpBatch(List<BaseIpCfg> data) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
@@ -292,7 +292,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public void deleteIpBatch(List<AreaIpCfg> data) {
|
||||
public void deleteIpBatch(List<BaseIpCfg> data) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
@@ -320,7 +320,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public boolean sendToMaatConvertorBatch(int operation,List<BaseCfg[]> cfgs) throws Exception{
|
||||
public boolean sendToMaatConvertorBatch(int operation,List<List<BaseCfg>> cfgs) throws Exception{
|
||||
if(cfgs==null){
|
||||
throw new RuntimeException("转换出错,配置为空");
|
||||
}
|
||||
@@ -330,7 +330,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
.create();
|
||||
if(Constants.AUDIT_NOT_YES==operation){
|
||||
List<ToMaatUnAuditBean> beans=new ArrayList<ToMaatUnAuditBean>();
|
||||
for(BaseCfg[] cfg:cfgs){
|
||||
for(List<BaseCfg> cfg:cfgs){
|
||||
ToMaatUnAuditBean toMaatUnAuditBean=new ToMaatUnAuditBean();
|
||||
toMaatUnAuditBean.setServiceCfg(new ArrayList<UnAuditBean>());
|
||||
for(BaseCfg c:cfg){
|
||||
@@ -364,7 +364,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
return new ConvertTool().setConfigInValid(json);
|
||||
}else{
|
||||
List<ToMaatBean> beans=new ArrayList<ToMaatBean>();
|
||||
for(BaseCfg[] cfg:cfgs){
|
||||
for(List<BaseCfg> cfg:cfgs){
|
||||
int compileId=0;
|
||||
ToMaatBean toMaatBean=new ToMaatBean();
|
||||
toMaatBean.setServiceCfg(new ArrayList<MaatCfg>());
|
||||
@@ -491,7 +491,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
}
|
||||
}
|
||||
toMaatBean.getServiceCfg().add(maatCfg);
|
||||
BaseCfg baseCfg=(BaseCfg)cfg[0];
|
||||
BaseCfg baseCfg=cfg.get(0);
|
||||
if(compileId==0){
|
||||
throw new RuntimeException("转换出错,未获取到正确的compileId");
|
||||
}else{
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -18,10 +14,9 @@ import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.configuration.AppComplexKeywordCfg;
|
||||
import com.nis.domain.configuration.AppIdCfg;
|
||||
import com.nis.domain.configuration.AppStringCfg;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.AppIdCfg.AppFeaturesIndex;
|
||||
import com.nis.domain.configuration.AppStringCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.maat.AppMaatCfg;
|
||||
import com.nis.domain.specific.ConfigGroupInfo;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
@@ -212,7 +207,7 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
c.setIsValid(cfg.getIsValid());
|
||||
complexStringCfgDao.insert(c);
|
||||
}else{
|
||||
complexStringCfgDao.updateByPrimaryKeySelective(c);
|
||||
complexStringCfgDao.update(c);
|
||||
}
|
||||
|
||||
|
||||
@@ -248,7 +243,7 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
s.setIsValid(cfg.getIsValid());
|
||||
stringCfgDao.insert(s);
|
||||
}else{
|
||||
stringCfgDao.updateByPrimaryKeySelective(s);
|
||||
stringCfgDao.update(s);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int addStringCfg(ComplexkeywordCfg cfg,List<AreaIpCfg> areaIpCfgs){
|
||||
public int addStringCfg(ComplexkeywordCfg cfg,List<BaseIpCfg> areaIpCfgs){
|
||||
if(areaIpCfgs!=null&&areaIpCfgs.size()>0){
|
||||
this.saveIpBatch(areaIpCfgs);
|
||||
}
|
||||
@@ -53,7 +53,7 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int updateStringCfg(ComplexkeywordCfg cfg,List<AreaIpCfg> addAreaCfg,List<AreaIpCfg> updateAreaCfg,List<AreaIpCfg> deleteAreaCfgs){
|
||||
public int updateStringCfg(ComplexkeywordCfg cfg,List<BaseIpCfg> addAreaCfg,List<BaseIpCfg> updateAreaCfg,List<BaseIpCfg> deleteAreaCfgs){
|
||||
if(addAreaCfg!=null&&addAreaCfg.size()>0){
|
||||
this.saveIpBatch(addAreaCfg);
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
|
||||
if(deleteAreaCfgs!=null&&deleteAreaCfgs.size()>0){
|
||||
this.deleteIpBatch(deleteAreaCfgs);
|
||||
}
|
||||
return complexStringCfgDao.updateByPrimaryKeySelective(cfg);
|
||||
return complexStringCfgDao.update(cfg);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -77,11 +77,11 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditStringCfg(int isAduit,List<ComplexkeywordCfg> auditCfg,List<AreaIpCfg> areaCfg,List<ComplexkeywordCfg> sendCfg) throws Exception{
|
||||
List<BaseCfg[]> sendCfgs=new ArrayList<BaseCfg[]>();
|
||||
public void auditStringCfg(int isAduit,List<ComplexkeywordCfg> auditCfg,List<BaseIpCfg> areaCfg,List<ComplexkeywordCfg> sendCfg) throws Exception{
|
||||
List<List<BaseCfg>> sendCfgs=new ArrayList<List<BaseCfg>>();
|
||||
for(ComplexkeywordCfg c:sendCfg){
|
||||
BaseCfg[] cArr=new BaseCfg[1];
|
||||
cArr[0]=c;
|
||||
List<BaseCfg> cArr=new ArrayList<>();
|
||||
cArr.add(c);
|
||||
sendCfgs.add(cArr);
|
||||
}
|
||||
if(Constants.AUDIT_NOT_YES==isAduit||
|
||||
@@ -110,7 +110,7 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void deleteStringCfg(List<ComplexkeywordCfg> cfgs,List<AreaIpCfg> areaCfg){
|
||||
public void deleteStringCfg(List<ComplexkeywordCfg> cfgs,List<BaseIpCfg> areaCfg){
|
||||
if(areaCfg!=null&&areaCfg.size()>0){
|
||||
this.deleteIpBatch(areaCfg);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int addIpCfg(BaseIpCfg baseIpCfg,List<AreaIpCfg> areaIpCfgs){
|
||||
public int addIpCfg(BaseIpCfg baseIpCfg,List<BaseIpCfg> areaIpCfgs){
|
||||
if(areaIpCfgs!=null&&areaIpCfgs.size()>0){
|
||||
this.saveIpBatch(areaIpCfgs);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int updateIpCfg(BaseIpCfg baseIpCfg,List<AreaIpCfg> addAreaCfg,List<AreaIpCfg> updateAreaCfg,List<AreaIpCfg> deleteAreaCfgs){
|
||||
public int updateIpCfg(BaseIpCfg baseIpCfg,List<BaseIpCfg> addAreaCfg,List<BaseIpCfg> updateAreaCfg,List<BaseIpCfg> deleteAreaCfgs){
|
||||
if(addAreaCfg!=null&&addAreaCfg.size()>0){
|
||||
this.saveIpBatch(addAreaCfg);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
if(deleteAreaCfgs!=null&&deleteAreaCfgs.size()>0){
|
||||
this.deleteIpBatch(deleteAreaCfgs);
|
||||
}
|
||||
return ipCfgDao.updateByPrimaryKeySelective(baseIpCfg);
|
||||
return ipCfgDao.update(baseIpCfg);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -78,11 +78,11 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditIpCfg(int isAduit,List<BaseIpCfg> auditCfg,List<AreaIpCfg> areaCfg,List<BaseIpCfg> sendCfg) throws Exception{
|
||||
List<BaseCfg[]> sendCfgs=new ArrayList<BaseCfg[]>();
|
||||
public void auditIpCfg(int isAduit,List<BaseIpCfg> auditCfg,List<BaseIpCfg> areaCfg,List<BaseIpCfg> sendCfg) throws Exception{
|
||||
List<List<BaseCfg>> sendCfgs=new ArrayList<List<BaseCfg>>();
|
||||
for(BaseIpCfg c:sendCfg){
|
||||
BaseCfg[] cArr=new BaseCfg[1];
|
||||
cArr[0]=c;
|
||||
List<BaseCfg> cArr=new ArrayList<>();
|
||||
cArr.add(c);
|
||||
sendCfgs.add(cArr);
|
||||
}
|
||||
if(Constants.AUDIT_NOT_YES==isAduit||
|
||||
|
||||
@@ -3,6 +3,9 @@ package com.nis.web.service.configuration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.session.ExecutorType;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -16,12 +19,14 @@ import com.nis.domain.configuration.MultipleCfg;
|
||||
import com.nis.domain.configuration.MultipleSearchCfg;
|
||||
import com.nis.domain.configuration.NumBoundaryCfg;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.configuration.ComplexStringCfgDao;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
import com.nis.web.dao.configuration.MultipleCfgDao;
|
||||
import com.nis.web.dao.configuration.NumCfgDao;
|
||||
import com.nis.web.dao.configuration.StringCfgDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
import com.nis.web.service.SpringContextHolder;
|
||||
|
||||
/**
|
||||
* 多域相关配置事务类
|
||||
@@ -51,98 +56,112 @@ public class MultipleCfgService extends CrudService<MultipleCfgDao,MultipleSearc
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int addCfg(MultipleCfg cfg){
|
||||
if(cfg==null) return 0;
|
||||
if(cfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
|
||||
ipCfgDao.insert(_cfg);
|
||||
public void addCfg(MultipleCfg cfg){
|
||||
if(cfg!=null) {
|
||||
if(cfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
|
||||
ipCfgDao.insert(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
|
||||
stringCfgDao.insert(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
|
||||
numCfgDao.insert(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
|
||||
complexStringCfgDao.insert(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getAreaCfg()!=null&&cfg.getAreaCfg().size()>0){
|
||||
List<BaseIpCfg> areaCfg=new ArrayList<>();
|
||||
areaCfg.addAll(cfg.getAreaCfg());
|
||||
this.saveIpBatch(areaCfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
|
||||
stringCfgDao.insert(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
|
||||
numCfgDao.insert(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
|
||||
complexStringCfgDao.insert(_cfg);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int updateCfg(MultipleCfg cfg,List<BaseCfg> deleteCfg){
|
||||
if(cfg==null) return 0;
|
||||
if(cfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
|
||||
if(_cfg.getCfgId()==null){//修改配置时用户可能希望新增IP配置,此时新增的IP配置无配置ID
|
||||
ipCfgDao.insert(_cfg);
|
||||
}else{
|
||||
ipCfgDao.updateByPrimaryKeySelective(_cfg);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(cfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
|
||||
stringCfgDao.updateByPrimaryKeySelective(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
|
||||
numCfgDao.updateByPrimaryKeySelective(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
|
||||
complexStringCfgDao.updateByPrimaryKeySelective(_cfg);
|
||||
}
|
||||
}
|
||||
if(deleteCfg!=null&&deleteCfg.size()>0){
|
||||
for(BaseCfg _cfg:deleteCfg){
|
||||
if(_cfg instanceof BaseIpCfg){
|
||||
ipCfgDao.deleteByCompileId((BaseIpCfg)_cfg);
|
||||
}else if(_cfg instanceof BaseStringCfg){
|
||||
stringCfgDao.deleteByCompileId((BaseStringCfg)_cfg);
|
||||
}else if(_cfg instanceof NumBoundaryCfg){
|
||||
numCfgDao.deleteByCompileId((NumBoundaryCfg)_cfg);
|
||||
}else if(_cfg instanceof ComplexkeywordCfg){
|
||||
complexStringCfgDao.deleteByCompileId((ComplexkeywordCfg)_cfg);
|
||||
public void updateCfg(MultipleCfg cfg,List<BaseCfg> deleteCfg,List<BaseIpCfg> addAreaCfg,List<BaseIpCfg> updateAreaCfg,List<BaseIpCfg> deleteAreaCfgs){
|
||||
if(cfg!=null){
|
||||
if(cfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
|
||||
if(_cfg.getCfgId()==null){//修改配置时用户可能希望新增IP配置,此时新增的IP配置无配置ID
|
||||
ipCfgDao.insert(_cfg);
|
||||
}else{
|
||||
ipCfgDao.update(_cfg);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(cfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
|
||||
if(_cfg.getCfgId()==null){
|
||||
stringCfgDao.insert(_cfg);
|
||||
}else
|
||||
stringCfgDao.update(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
|
||||
if(_cfg.getCfgId()==null){
|
||||
numCfgDao.insert(_cfg);
|
||||
}else
|
||||
numCfgDao.updateByPrimaryKeySelective(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
|
||||
if(_cfg.getCfgId()==null){
|
||||
complexStringCfgDao.insert(_cfg);
|
||||
}else
|
||||
complexStringCfgDao.update(_cfg);
|
||||
}
|
||||
}
|
||||
if(deleteCfg!=null&&deleteCfg.size()>0){
|
||||
for(BaseCfg _cfg:deleteCfg){
|
||||
if(_cfg instanceof BaseIpCfg){
|
||||
ipCfgDao.deleteByCompileId((BaseIpCfg)_cfg);
|
||||
}else if(_cfg instanceof BaseStringCfg){
|
||||
stringCfgDao.deleteByCompileId((BaseStringCfg)_cfg);
|
||||
}else if(_cfg instanceof NumBoundaryCfg){
|
||||
numCfgDao.deleteByCompileId((NumBoundaryCfg)_cfg);
|
||||
}else if(_cfg instanceof ComplexkeywordCfg){
|
||||
complexStringCfgDao.deleteByCompileId((ComplexkeywordCfg)_cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(addAreaCfg!=null&&addAreaCfg.size()>0){
|
||||
this.saveIpBatch(addAreaCfg);
|
||||
}
|
||||
if(updateAreaCfg!=null&&updateAreaCfg.size()>0){
|
||||
this.updateIpBatch(updateAreaCfg);
|
||||
}
|
||||
if(deleteAreaCfgs!=null&&deleteAreaCfgs.size()>0){
|
||||
this.deleteIpBatch(deleteAreaCfgs);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int deleteCfg(MultipleCfg cfg){
|
||||
if(cfg==null) return 0;
|
||||
if(cfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
|
||||
ipCfgDao.deleteByCompileId(_cfg);
|
||||
}
|
||||
public void deleteCfg(List<BaseIpCfg> delIpCfgs,List<BaseStringCfg> delStringCfgs,List<NumBoundaryCfg> delNumCfgs,List<ComplexkeywordCfg> delComplexCfgs){
|
||||
if(delIpCfgs!=null&&delIpCfgs.size()>0){
|
||||
this.deleteIpBatch(delIpCfgs);
|
||||
}
|
||||
if(cfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
|
||||
stringCfgDao.deleteByCompileId(_cfg);
|
||||
}
|
||||
if(delStringCfgs!=null&&delStringCfgs.size()>0){
|
||||
this.deleteStringBatch(delStringCfgs);
|
||||
}
|
||||
if(cfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
|
||||
numCfgDao.deleteByCompileId(_cfg);
|
||||
}
|
||||
if(delNumCfgs!=null&&delNumCfgs.size()>0){
|
||||
this.deleteNumBatch(delNumCfgs);
|
||||
}
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
|
||||
complexStringCfgDao.deleteByCompileId(_cfg);
|
||||
}
|
||||
if(delComplexCfgs!=null&&delComplexCfgs.size()>0){
|
||||
this.deleteComplexBatch(delComplexCfgs);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -156,93 +175,72 @@ public class MultipleCfgService extends CrudService<MultipleCfgDao,MultipleSearc
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public boolean auditCfg(MultipleCfg sendCfg,MultipleCfg cfg) throws Exception{
|
||||
int should=0;
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
should+=cfg.getComplexCfg().size();
|
||||
}
|
||||
if(cfg.getStringCfg()!=null){
|
||||
should+=cfg.getStringCfg().size();
|
||||
}
|
||||
if(cfg.getNumCfg()!=null){
|
||||
should+=cfg.getNumCfg().size();
|
||||
}
|
||||
if(cfg.getIpCfg()!=null){
|
||||
should+=cfg.getIpCfg().size();
|
||||
}
|
||||
int result=0;
|
||||
if(Constants.AUDIT_YES==cfg.getIsAudit()||Constants.AUDIT_NOT_YES==cfg.getIsAudit()){
|
||||
List<BaseCfg> cfgs=new ArrayList<BaseCfg>();
|
||||
if(sendCfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:sendCfg.getIpCfg().values()){
|
||||
cfgs.add(_cfg);
|
||||
}
|
||||
}
|
||||
if(sendCfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:sendCfg.getStringCfg().values()){
|
||||
cfgs.add(_cfg);
|
||||
}
|
||||
}
|
||||
if(sendCfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:sendCfg.getNumCfg().values()){
|
||||
cfgs.add(_cfg);
|
||||
}
|
||||
}
|
||||
if(sendCfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:sendCfg.getComplexCfg().values()){
|
||||
cfgs.add(_cfg);
|
||||
}
|
||||
}
|
||||
BaseCfg[] cfgArray=new BaseCfg[cfgs.size()];
|
||||
cfgs.toArray(cfgArray);
|
||||
if(this.sendToMaatConvertor(cfg.getIsAudit(), null, cfgArray)){
|
||||
if(cfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
|
||||
result+=ipCfgDao.audit(_cfg);
|
||||
public void auditCfg(int isAudit,List<MultipleCfg> sendCfgs,List<BaseIpCfg> auduitIpCfgs,
|
||||
List<BaseStringCfg> auduitStringCfgs,List<NumBoundaryCfg> auduitNumCfgs,List<ComplexkeywordCfg> auduitComplexCfgs) throws Exception{
|
||||
if(Constants.AUDIT_YES==isAudit||Constants.AUDIT_NOT_YES==isAudit){
|
||||
List<List<BaseCfg>> cfgs=new ArrayList<List<BaseCfg>>();
|
||||
for(MultipleCfg sendCfg:sendCfgs){
|
||||
List<BaseCfg> cfg=new ArrayList<>();
|
||||
if(sendCfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:sendCfg.getIpCfg().values()){
|
||||
cfg.add(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
|
||||
result+=stringCfgDao.audit(_cfg);
|
||||
if(sendCfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:sendCfg.getStringCfg().values()){
|
||||
cfg.add(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
|
||||
result+=numCfgDao.audit(_cfg);
|
||||
if(sendCfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:sendCfg.getNumCfg().values()){
|
||||
cfg.add(_cfg);
|
||||
}
|
||||
}
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
|
||||
result+=complexStringCfgDao.audit(_cfg);
|
||||
if(sendCfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:sendCfg.getComplexCfg().values()){
|
||||
cfg.add(_cfg);
|
||||
}
|
||||
}
|
||||
//设置区域ip
|
||||
if(sendCfg.getAreaCfg()!=null){
|
||||
if(cfg.size()>0){
|
||||
cfg.get(0).setAreaCfg(sendCfg.getAreaCfg());
|
||||
}else{
|
||||
throw new RuntimeException("发送至maat异常,没有有效的配置!");
|
||||
}
|
||||
}
|
||||
cfgs.add(cfg);
|
||||
}
|
||||
if(this.sendToMaatConvertorBatch(isAudit, cfgs)){
|
||||
if(auduitIpCfgs!=null&&auduitIpCfgs.size()>0){
|
||||
this.auditIpBatch(auduitIpCfgs);
|
||||
}
|
||||
if(auduitStringCfgs!=null&&auduitStringCfgs.size()>0){
|
||||
this.auditStringBatch(auduitStringCfgs);
|
||||
}
|
||||
if(auduitNumCfgs!=null&&auduitNumCfgs.size()>0){
|
||||
this.auditNumBatch(auduitNumCfgs);
|
||||
}
|
||||
if(auduitComplexCfgs!=null&&auduitComplexCfgs.size()>0){
|
||||
this.auditComplexBatch(auduitComplexCfgs);
|
||||
}
|
||||
}else{
|
||||
result=0;
|
||||
throw new RuntimeException("发送至maat失败,返回false!");
|
||||
}
|
||||
|
||||
}else{
|
||||
if(cfg.getIpCfg()!=null){
|
||||
for(BaseIpCfg _cfg:cfg.getIpCfg().values()){
|
||||
result+=ipCfgDao.audit(_cfg);
|
||||
}
|
||||
if(auduitIpCfgs!=null&&auduitIpCfgs.size()>0){
|
||||
this.auditIpBatch(auduitIpCfgs);
|
||||
}
|
||||
if(cfg.getStringCfg()!=null){
|
||||
for(BaseStringCfg _cfg:cfg.getStringCfg().values()){
|
||||
result+=stringCfgDao.audit(_cfg);
|
||||
}
|
||||
if(auduitStringCfgs!=null&&auduitStringCfgs.size()>0){
|
||||
this.auditStringBatch(auduitStringCfgs);
|
||||
}
|
||||
if(cfg.getNumCfg()!=null){
|
||||
for(NumBoundaryCfg _cfg:cfg.getNumCfg().values()){
|
||||
result+=numCfgDao.audit(_cfg);
|
||||
}
|
||||
if(auduitNumCfgs!=null&&auduitNumCfgs.size()>0){
|
||||
this.auditNumBatch(auduitNumCfgs);
|
||||
}
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
for(ComplexkeywordCfg _cfg:cfg.getComplexCfg().values()){
|
||||
result+=complexStringCfgDao.audit(_cfg);
|
||||
}
|
||||
if(auduitComplexCfgs!=null&&auduitComplexCfgs.size()>0){
|
||||
this.auditComplexBatch(auduitComplexCfgs);
|
||||
}
|
||||
}
|
||||
return should==result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -252,5 +250,100 @@ public class MultipleCfgService extends CrudService<MultipleCfgDao,MultipleSearc
|
||||
public Page<MultipleSearchCfg> findPage(Page<MultipleSearchCfg> page, MultipleSearchCfg entity) {
|
||||
return super.findPage(page, entity);
|
||||
}
|
||||
|
||||
private void deleteStringBatch(List<BaseStringCfg> data) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < data.size();index++){
|
||||
BaseStringCfg t = data.get(index);
|
||||
((CrudDao<BaseStringCfg>) batchSqlSession.getMapper(StringCfgDao.class)).delete(t);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
private void deleteComplexBatch(List<ComplexkeywordCfg> data) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < data.size();index++){
|
||||
ComplexkeywordCfg t = data.get(index);
|
||||
((CrudDao<ComplexkeywordCfg>) batchSqlSession.getMapper(ComplexStringCfgDao.class)).delete(t);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
private void deleteNumBatch(List<NumBoundaryCfg> data) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < data.size();index++){
|
||||
NumBoundaryCfg t = data.get(index);
|
||||
((CrudDao<NumBoundaryCfg>) batchSqlSession.getMapper(NumCfgDao.class)).delete(t);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
private void auditStringBatch(List<BaseStringCfg> data) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < data.size();index++){
|
||||
BaseStringCfg t = data.get(index);
|
||||
((CrudDao<BaseStringCfg>) batchSqlSession.getMapper(StringCfgDao.class)).audit(t);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
private void auditNumBatch(List<NumBoundaryCfg> data) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < data.size();index++){
|
||||
NumBoundaryCfg t = data.get(index);
|
||||
((CrudDao<NumBoundaryCfg>) batchSqlSession.getMapper(NumCfgDao.class)).audit(t);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
private void auditComplexBatch(List<ComplexkeywordCfg> data) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < data.size();index++){
|
||||
ComplexkeywordCfg t = data.get(index);
|
||||
((CrudDao<ComplexkeywordCfg>) batchSqlSession.getMapper(ComplexStringCfgDao.class)).audit(t);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.NumBoundaryCfg;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.dao.configuration.NumCfgDao;
|
||||
@@ -32,7 +33,7 @@ public class NumCfgService extends CrudService<NumCfgDao,NumBoundaryCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int addNumCfg(NumBoundaryCfg cfg,List<AreaIpCfg> areaIpCfgs){
|
||||
public int addNumCfg(NumBoundaryCfg cfg,List<BaseIpCfg> areaIpCfgs){
|
||||
if(areaIpCfgs!=null&&areaIpCfgs.size()>0){
|
||||
this.saveIpBatch(areaIpCfgs);
|
||||
}
|
||||
@@ -49,7 +50,7 @@ public class NumCfgService extends CrudService<NumCfgDao,NumBoundaryCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int updateNumCfg(NumBoundaryCfg cfg,List<AreaIpCfg> addAreaCfg,List<AreaIpCfg> updateAreaCfg,List<AreaIpCfg> deleteAreaCfgs){
|
||||
public int updateNumCfg(NumBoundaryCfg cfg,List<BaseIpCfg> addAreaCfg,List<BaseIpCfg> updateAreaCfg,List<BaseIpCfg> deleteAreaCfgs){
|
||||
if(addAreaCfg!=null&&addAreaCfg.size()>0){
|
||||
this.saveIpBatch(addAreaCfg);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class StringCfgService extends CrudService<StringCfgDao,BaseStringCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int addStringCfg(BaseStringCfg baseStringCfg,List<AreaIpCfg> areaIpCfgs){
|
||||
public int addStringCfg(BaseStringCfg baseStringCfg,List<BaseIpCfg> areaIpCfgs){
|
||||
if(areaIpCfgs!=null&&areaIpCfgs.size()>0){
|
||||
this.saveIpBatch(areaIpCfgs);
|
||||
}
|
||||
@@ -53,7 +53,7 @@ public class StringCfgService extends CrudService<StringCfgDao,BaseStringCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int updateStringCfg(BaseStringCfg baseStringCfg,List<AreaIpCfg> addAreaCfg,List<AreaIpCfg> updateAreaCfg,List<AreaIpCfg> deleteAreaCfgs){
|
||||
public int updateStringCfg(BaseStringCfg baseStringCfg,List<BaseIpCfg> addAreaCfg,List<BaseIpCfg> updateAreaCfg,List<BaseIpCfg> deleteAreaCfgs){
|
||||
if(addAreaCfg!=null&&addAreaCfg.size()>0){
|
||||
this.saveIpBatch(addAreaCfg);
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class StringCfgService extends CrudService<StringCfgDao,BaseStringCfg> {
|
||||
if(deleteAreaCfgs!=null&&deleteAreaCfgs.size()>0){
|
||||
this.deleteIpBatch(deleteAreaCfgs);
|
||||
}
|
||||
return stringCfgDao.updateByPrimaryKeySelective(baseStringCfg);
|
||||
return stringCfgDao.update(baseStringCfg);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -77,11 +77,11 @@ public class StringCfgService extends CrudService<StringCfgDao,BaseStringCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditStringCfg(int isAduit,List<BaseStringCfg> auditCfg,List<AreaIpCfg> areaCfg,List<BaseStringCfg> sendCfg) throws Exception{
|
||||
List<BaseCfg[]> sendCfgs=new ArrayList<BaseCfg[]>();
|
||||
public void auditStringCfg(int isAduit,List<BaseStringCfg> auditCfg,List<BaseIpCfg> areaCfg,List<BaseStringCfg> sendCfg) throws Exception{
|
||||
List<List<BaseCfg>> sendCfgs=new ArrayList<List<BaseCfg>>();
|
||||
for(BaseStringCfg c:sendCfg){
|
||||
BaseStringCfg[] cArr=new BaseStringCfg[1];
|
||||
cArr[0]=c;
|
||||
List<BaseCfg> cArr=new ArrayList<>();
|
||||
cArr.add(c);
|
||||
sendCfgs.add(cArr);
|
||||
}
|
||||
if(Constants.AUDIT_NOT_YES==isAduit||
|
||||
@@ -107,7 +107,7 @@ public class StringCfgService extends CrudService<StringCfgDao,BaseStringCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void deleteStringCfg(List<BaseStringCfg> stringCfg,List<AreaIpCfg> areaCfg){
|
||||
public void deleteStringCfg(List<BaseStringCfg> stringCfg,List<BaseIpCfg> areaCfg){
|
||||
if(areaCfg!=null&&areaCfg.size()>0){
|
||||
this.deleteIpBatch(areaCfg);
|
||||
}
|
||||
|
||||
@@ -163,6 +163,7 @@ function delAreaIsp(obj){
|
||||
<div class="container-fluid hidden">
|
||||
<div class="row">
|
||||
<input type="hidden" id="_areaCfg.isAreaEffective" value="${_areaCfg.isAreaEffective}">
|
||||
<input id="_areaCfg.cfgId" type="hidden" value="${_areaCfg.cfgId}">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove" title="remove" onClick="delAreaIp(this);"/>
|
||||
</div>
|
||||
@@ -306,6 +307,7 @@ function delAreaIsp(obj){
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<input type="hidden" name="areaCfg[${status.index}].isAreaEffective" value="${areaCfg.isAreaEffective}">
|
||||
<input name="areaCfg[${status.index}].cfgId" type="hidden" value="${areaCfg.cfgId}">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove" title="remove" onClick="delAreaIp(this);"/>
|
||||
</div>
|
||||
|
||||
@@ -11,16 +11,6 @@
|
||||
<div for="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="match_area"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="district" value="${_cfg.district}">
|
||||
</div>
|
||||
<div for="district"></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="key_word"/></label>
|
||||
|
||||
@@ -1,35 +1,6 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<h3 class="form-section"><spring:message code="basic_config"/></h3>
|
||||
<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="whether_area_block"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="1"
|
||||
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
|
||||
class="required"><spring:message code="yes"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="0"
|
||||
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
|
||||
class="required"><spring:message code="no"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isAreaEffective"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><spring:message code="area_effect_id"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="areaEffectiveIds" value="${_cfg.ipCfg.areaEffectiveIds}">
|
||||
</div>
|
||||
<div for="areaEffectiveIds"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
@@ -125,20 +96,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">生效范围</label>
|
||||
<div class="col-md-6">
|
||||
<select class="form-control">
|
||||
<option>Country 1</option>
|
||||
<option>Country 2</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
@@ -13,30 +13,17 @@ $(function(){
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<h3 class="form-section">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<spring:message code="${mainTableDesc}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<spring:message code="${otherTable.tableDesc}"/>
|
||||
</c:when>
|
||||
<c:otherwise>增强字符串<spring:message code="block_config"/></c:otherwise>
|
||||
</c:choose>
|
||||
<!-- <small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".complexCfg" title="add"></span></small> --></h3>
|
||||
<div class="row complexCfg">
|
||||
<h3 class="form-section"><spring:message code="${tableInfo.tableDesc}"/>
|
||||
<small><span style="margin-left:10px"><input type="checkbox" name="cfgSelect" value="complexCfg"
|
||||
<c:if test="${_cfg.complexCfg[tableInfo.tableName]!= null and _cfg.complexCfg[tableInfo.tableName].cfgId != null}">checked</c:if>
|
||||
/> <spring:message code="optional"/></span></small>
|
||||
</h3>
|
||||
<div class="row complexCfg collapse">
|
||||
<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">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<input name="complexCfg[${mainTable}].cfgDesc" type="text" class="form-control" value="${_cfg.complexCfg[mainTable].cfgDesc}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<input name="complexCfg[${otherTable.tableName}].cfgDesc" type="text" class="form-control" value="${_cfg.complexCfg[otherTable.tableName].cfgDesc}"/>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input name="complexCfg[${tableInfo.tableName}].cfgDesc" type="text" class="form-control" value="${_cfg.complexCfg[tableInfo.tableName].cfgDesc}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -44,183 +31,79 @@ $(function(){
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_area"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<select name="complexCfg[${mainTable}].district" class="district selectpicker select2 form-control required">
|
||||
<option value=""><spring:message code='select'/></option>
|
||||
<c:forEach items="${fns:getFeaturesDictData(mainTable)}" var="district">
|
||||
<option value="${district.itemValue}"
|
||||
<c:if test="${_cfg.complexCfg[mainTable].district eq district.itemValue}">selected</c:if>
|
||||
>${district.itemValue}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<select name="complexCfg[${otherTable.tableName}].district" class="district selectpicker select2 form-control required">
|
||||
<option value=""><spring:message code='select'/></option>
|
||||
<c:forEach items="${fns:getFeaturesDictData(otherTable.tableName)}" var="district">
|
||||
<option value="${district.itemValue}"
|
||||
<c:if test="${_cfg.complexCfg[otherTable.tableName].district eq district.itemValue}">selected</c:if>
|
||||
>${district.itemValue}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input type="hidden" name="" placeholder="请输入自定义域" class="otherValue form-control" value="${_cfg.complexCfg[mainTable].district}"/>
|
||||
<select name="complexCfg[${tableInfo.tableName}].district" class="district selectpicker select2 form-control required">
|
||||
<option value=""><spring:message code='select'/></option>
|
||||
<c:forEach items="${fns:getFeaturesDictData(tableInfo.tableName)}" var="district">
|
||||
<option value="${district.itemValue}"
|
||||
<c:if test="${_cfg.complexCfg[tableInfo.tableName].district eq district.itemValue}">selected</c:if>
|
||||
>${district.itemValue}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="" placeholder="请输入自定义域" class="otherValue form-control" value="${_cfg.complexCfg[tableInfo.tableName].district}"/>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<div for="complexCfg[${mainTable}].district"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<div for="complexCfg[${otherTable.tableName}].district"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="complexCfg[${tableInfo.tableName}].district"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row complexCfg">
|
||||
<div class="row complexCfg collapse">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<input name="complexCfg[${mainTable}].keywords" type="text" class="form-control required" value="${_cfg.complexCfg[mainTable].keywords}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<input name="complexCfg[${otherTable.tableName}].keywords" type="text" class="form-control required" value="${_cfg.complexCfg[otherTable.tableName].keywords}"/>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input name="complexCfg[${tableInfo.tableName}].keywords" type="text" class="form-control required" value="${_cfg.complexCfg[tableInfo.tableName].keywords}"/>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<div for="complexCfg[${mainTable}].keywords"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<div for="complexCfg[${otherTable.tableName}].keywords"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="complexCfg[${tableInfo.tableName}].keywords"></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="expression_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="complexCfg[${mainTable}].exprType" value="1"
|
||||
<c:if test="${_cfg.complexCfg[mainTable].exprType==1}">checked</c:if>
|
||||
class="required"/><spring:message code="and"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="complexCfg[${mainTable}].exprType" value="0"
|
||||
<c:if test="${_cfg.complexCfg[mainTable].exprType==0}">checked</c:if>
|
||||
class="required"/><spring:message code="null"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="complexCfg[${otherTable.tableName}].exprType" value="1"
|
||||
<c:if test="${_cfg.complexCfg[otherTable.tableName].exprType==1}">checked</c:if>
|
||||
class="required"/><spring:message code="and"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="complexCfg[${otherTable.tableName}].exprType" value="0"
|
||||
<c:if test="${_cfg.complexCfg[otherTable.tableName].exprType==0}">checked</c:if>
|
||||
class="required"/><spring:message code="null"/>
|
||||
</label>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="complexCfg[${tableInfo.tableName}].exprType" value="1"
|
||||
<c:if test="${_cfg.complexCfg[tableInfo.tableName].exprType==1}">checked</c:if>
|
||||
class="required"/><spring:message code="and"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="complexCfg[${tableInfo.tableName}].exprType" value="0"
|
||||
<c:if test="${_cfg.complexCfg[tableInfo.tableName].exprType==0}">checked</c:if>
|
||||
class="required"/><spring:message code="null"/>
|
||||
</label>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<div for="complexCfg[${mainTable}].exprType"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<div for="complexCfg[${otherTable.tableName}].exprType"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="complexCfg[${tableInfo.tableName}].exprType"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row complexCfg">
|
||||
<div class="row complexCfg collapse">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<select name="complexCfg[${mainTable}].matchMethod" class="selectpicker select2 form-control required" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.complexCfg[mainTable].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.complexCfg[mainTable].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.complexCfg[mainTable].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.complexCfg[mainTable].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
|
||||
</select>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<select name="complexCfg[${otherTable.tableName}].matchMethod" class="selectpicker select2 form-control required" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.complexCfg[otherTable.tableName].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.complexCfg[otherTable.tableName].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.complexCfg[otherTable.tableName].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.complexCfg[otherTable.tableName].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
|
||||
</select>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<select name="complexCfg[${tableInfo.tableName}].matchMethod" class="selectpicker select2 form-control required" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.complexCfg[tableInfo.tableName].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.complexCfg[tableInfo.tableName].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.complexCfg[tableInfo.tableName].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.complexCfg[tableInfo.tableName].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<div for="complexCfg[${mainTable}].matchMethod"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<div for="complexCfg[${otherTable.tableName}].matchMethod"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="complexCfg[${tableInfo.tableName}].matchMethod"></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="whether_hexbinary"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<select name="complexCfg[${mainTable}].isHexbin" class="selectpicker select2 form-control required" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.complexCfg[mainTable].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.complexCfg[mainTable].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.complexCfg[mainTable].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<select name="complexCfg[${otherTable.tableName}].isHexbin" class="selectpicker select2 form-control required" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.complexCfg[otherTable.tableName].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.complexCfg[otherTable.tableName].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.complexCfg[otherTable.tableName].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<select name="complexCfg[${tableInfo.tableName}].isHexbin" class="selectpicker select2 form-control required" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.complexCfg[tableInfo.tableName].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.complexCfg[tableInfo.tableName].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.complexCfg[tableInfo.tableName].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<div for="complexCfg[${mainTable}].isHexbin"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<div for="complexCfg[${otherTable.tableName}].isHexbin"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="complexCfg[${tableInfo.tableName}].isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<input name="complexCfg[${mainTable}].cfgId" type="hidden" value="${_cfg.complexCfg[mainTable].cfgId}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<input name="complexCfg[${otherTable.tableName}].cfgId" type="hidden" value="${_cfg.complexCfg[otherTable.tableName].cfgId}"/>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input name="complexCfg[${tableInfo.tableName}].cfgId" type="hidden" value="${_cfg.complexCfg[tableInfo.tableName].cfgId}"/>
|
||||
</div>
|
||||
<!--/row-->
|
||||
@@ -1,29 +1,16 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<h3 class="form-section">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<spring:message code="${mainTableDesc}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<spring:message code="${otherTable.tableDesc}"/>
|
||||
</c:when>
|
||||
<c:otherwise>IP<spring:message code="block_config"/></c:otherwise>
|
||||
</c:choose>
|
||||
<small><span style="margin-left:10px"><input type="checkbox" id="ipSelect" <c:if test="${_cfg.ipCfg[mainTable]!= null and _cfg.ipCfg[mainTable].cfgId != null}">checked</c:if> <c:if test="${_cfg.ipCfg[otherTable.tableName]!= null and _cfg.ipCfg[otherTable.tableName].cfgId != null}">checked</c:if>/> 可选</span><!-- <span class="glyphicon glyphicon-plus" data-toggle="collapse" data-target=".ipCfg" title="add"></span> --></small></h3>
|
||||
<spring:message code="${tableInfo.tableDesc}"/>
|
||||
<small><span style="margin-left:10px"><input type="checkbox" id="ipSelect" value="ipCfg"
|
||||
<c:if test="${_cfg.ipCfg[tableInfo.tableName]!= null and _cfg.ipCfg[tableInfo.tableName].cfgId != null}">checked</c:if>
|
||||
/> <spring:message code="optional"/></span></small></h3>
|
||||
<div class="row ipCfg collapse">
|
||||
<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">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<input class="form-control" type="text" name="ipCfg[${mainTable}].cfgDesc" value="${_cfg.ipCfg[mainTable].cfgDesc}">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].cfgDesc" value="${_cfg.ipCfg[otherTable.tableName].cfgDesc}">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input class="form-control" type="text" name="ipCfg[${tableInfo.tableName}].cfgDesc" value="${_cfg.ipCfg[tableInfo.tableName].cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -31,29 +18,12 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<select name="ipCfg[${mainTable}].ipType" class="ipType selectpicker show-tick form-control required">
|
||||
<option value="4" <c:if test="${_cfg.ipCfg[mainTable].ipType==4}">selected</c:if> >V4</option>
|
||||
<option value="6" <c:if test="${_cfg.ipCfg[mainTable].ipType==6}">selected</c:if>>V6</option>
|
||||
</select>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<select name="ipCfg[${otherTable.tableName}].ipType" class="ipType selectpicker show-tick form-control required" title=<spring:message code="select"/>>
|
||||
<option value="4" <c:if test="${_cfg.ipCfg[otherTable.tableName].ipType==4}">selected</c:if> >V4</option>
|
||||
<option value="6" <c:if test="${_cfg.ipCfg[otherTable.tableName].ipType==6}">selected</c:if>>V6</option>
|
||||
</select>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<select name="ipCfg[${tableInfo.tableName}].ipType" class="ipType selectpicker show-tick form-control required">
|
||||
<option value="4" <c:if test="${_cfg.ipCfg[tableInfo.tableName].ipType==4}">selected</c:if> >V4</option>
|
||||
<option value="6" <c:if test="${_cfg.ipCfg[tableInfo.tableName].ipType==6}">selected</c:if>>V6</option>
|
||||
</select>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].ipType"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].ipType"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="ipCfg[${tableInfo.tableName}].ipType"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -62,46 +32,18 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<input class="form-control required ipCheck" type="text" name="ipCfg[${mainTable}].srcIp" value="${_cfg.ipCfg[mainTable].srcIp}">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<input class="form-control required ipCheck" type="text" name="ipCfg[${otherTable.tableName}].srcIp" value="${_cfg.ipCfg[otherTable.tableName].srcIp}">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input class="form-control required ipCheck" type="text" name="ipCfg[${tableInfo.tableName}].srcIp" value="${_cfg.ipCfg[tableInfo.tableName].srcIp}">
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].srcIp"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].srcIp"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="ipCfg[${tableInfo.tableName}].srcIp"></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="client_address_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<input class="form-control required" type="text" name="ipCfg[${mainTable}].srcIpMask" value="${_cfg.ipCfg[mainTable].srcIpMask}">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<input class="form-control required" type="text" name="ipCfg[${otherTable.tableName}].srcIpMask" value="${_cfg.ipCfg[otherTable.tableName].srcIpMask}">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input class="form-control required" type="text" name="ipCfg[${tableInfo.tableName}].srcIpMask" value="${_cfg.ipCfg[tableInfo.tableName].srcIpMask}">
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].srcIpMask"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].srcIpMask"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="ipCfg[${tableInfo.tableName}].srcIpMask"></div>
|
||||
<div for="srcIpMask"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -111,46 +53,18 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<input class="form-control required" range="[0,65535]" type="text" name="ipCfg[${mainTable}].srcPort" value="${_cfg.ipCfg[mainTable].srcPort}">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<input class="form-control required" range="[0,65535]" type="text" name="ipCfg[${otherTable.tableName}].srcPort" value="${_cfg.ipCfg[otherTable.tableName].srcPort}">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input class="form-control required" range="[0,65535]" type="text" name="ipCfg[${tableInfo.tableName}].srcPort" value="${_cfg.ipCfg[tableInfo.tableName].srcPort}">
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].srcPort"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].srcPort"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="ipCfg[${tableInfo.tableName}].srcPort"></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="client_port_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<input class="form-control required" type="text" name="ipCfg[${mainTable}].srcPortMask" range="[0,65535]" value="${_cfg.ipCfg[mainTable].srcPortMask}">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<input class="form-control required" type="text" name="ipCfg[${otherTable.tableName}].srcPortMask" range="[0,65535]" value="${_cfg.ipCfg[otherTable.tableName].srcPortMask}">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input class="form-control required" type="text" name="ipCfg[${tableInfo.tableName}].srcPortMask" range="[0,65535]" value="${_cfg.ipCfg[tableInfo.tableName].srcPortMask}">
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].srcPortMask"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].srcPortMask"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="ipCfg[${tableInfo.tableName}].srcPortMask"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -159,46 +73,18 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<input class="form-control required ipCheck" type="text" name="ipCfg[${mainTable}].dstIp" value="${_cfg.ipCfg[mainTable].dstIp}">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<input class="form-control required ipCheck" type="text" name="ipCfg[${otherTable.tableName}].dstIp" value="${_cfg.ipCfg[otherTable.tableName].dstIp}">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input class="form-control required ipCheck" type="text" name="ipCfg[${tableInfo.tableName}].dstIp" value="${_cfg.ipCfg[tableInfo.tableName].dstIp}">
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].dstIp"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].dstIp"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="ipCfg[${tableInfo.tableName}].dstIp"></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="server_address_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<input class="form-control required" type="text" name="ipCfg[${mainTable}].dstIpMask" value="${_cfg.ipCfg[mainTable].dstIpMask}">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<input class="form-control required" type="text" name="ipCfg[${otherTable.tableName}].dstIpMask" value="${_cfg.ipCfg[otherTable.tableName].dstIpMask}">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input class="form-control required" type="text" name="ipCfg[${tableInfo.tableName}].dstIpMask" value="${_cfg.ipCfg[tableInfo.tableName].dstIpMask}">
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].dstIpMask"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].dstIpMask"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="ipCfg[${tableInfo.tableName}].dstIpMask"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -207,46 +93,18 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<input class="form-control required" type="text" name="ipCfg[${mainTable}].dstPort" value="${_cfg.ipCfg[mainTable].dstPort}" range="[0,65535]">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<input class="form-control required" type="text" name="ipCfg[${otherTable.tableName}].dstPort" value="${_cfg.ipCfg[otherTable.tableName].dstPort}" range="[0,65535]">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input class="form-control required" type="text" name="ipCfg[${tableInfo.tableName}].dstPort" value="${_cfg.ipCfg[tableInfo.tableName].dstPort}" range="[0,65535]">
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].dstPort"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].dstPort"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="ipCfg[${tableInfo.tableName}].dstPort"></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="server_port_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<input class="form-control required" type="text" name="ipCfg[${mainTable}].dstPortMask" range="[0,65535]" value="${_cfg.ipCfg[mainTable].dstPortMask}">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<input class="form-control required" type="text" name="ipCfg[${otherTable.tableName}].dstPortMask" range="[0,65535]" value="${_cfg.ipCfg[otherTable.tableName].dstPortMask}">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input class="form-control required" type="text" name="ipCfg[${tableInfo.tableName}].dstPortMask" range="[0,65535]" value="${_cfg.ipCfg[tableInfo.tableName].dstPortMask}">
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].dstPortMask"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].dstPortMask"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="ipCfg[${tableInfo.tableName}].dstPortMask"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -255,75 +113,30 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<select name="ipCfg[${mainTable}].direction" class="selectpicker show-tick form-control required" title=<spring:message code="select"/>>
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.ipCfg[mainTable].direction==0}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${_cfg.ipCfg[mainTable].direction==1}">selected</c:if>><spring:message code="oneway"/></option>
|
||||
</select>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<select name="ipCfg[${otherTable.tableName}].direction" class="selectpicker show-tick form-control required" title=<spring:message code="select"/>>
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.ipCfg[otherTable.tableName].direction==0}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${_cfg.ipCfg[otherTable.tableName].direction==1}">selected</c:if>><spring:message code="oneway"/></option>
|
||||
</select>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<select name="ipCfg[${tableInfo.tableName}].direction" class="selectpicker show-tick form-control required" title=<spring:message code="select"/>>
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.ipCfg[tableInfo.tableName].direction==0}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${_cfg.ipCfg[tableInfo.tableName].direction==1}">selected</c:if>><spring:message code="oneway"/></option>
|
||||
</select>
|
||||
<%-- <input class="form-control" type="text" name="direction" value="${_cfg.ipCfg.direction}"> --%>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].direction"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].direction"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="ipCfg[${tableInfo.tableName}].direction"></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="protocol"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<select name="ipCfg[${mainTable}].protocol" class="selectpicker show-tick form-control" required title=<spring:message code="select"/>>
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="6" <c:if test="${_cfg.ipCfg[mainTable].protocol==6}">selected</c:if>>TCP</option>
|
||||
<option value="17" <c:if test="${_cfg.ipCfg[mainTable].protocol==17}">selected</c:if>>UDP</option>
|
||||
<option value="0" <c:if test="${_cfg.ipCfg[mainTable].protocol==0}">selected</c:if>><spring:message code="arbitrary"/></option>
|
||||
</select>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<select name="ipCfg[${otherTable.tableName}].protocol" class="selectpicker show-tick form-control required" title=<spring:message code="select"/>>
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="6" <c:if test="${_cfg.ipCfg[otherTable.tableName].protocol==6}">selected</c:if>>TCP</option>
|
||||
<option value="17" <c:if test="${_cfg.ipCfg[otherTable.tableName].protocol==17}">selected</c:if>>UDP</option>
|
||||
<option value="0" <c:if test="${_cfg.ipCfg[otherTable.tableName].protocol==0}">selected</c:if>><spring:message code="arbitrary"/></option>
|
||||
</select>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<select name="ipCfg[${tableInfo.tableName}].protocol" class="selectpicker show-tick form-control" required title=<spring:message code="select"/>>
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="6" <c:if test="${_cfg.ipCfg[tableInfo.tableName].protocol==6}">selected</c:if>>TCP</option>
|
||||
<option value="17" <c:if test="${_cfg.ipCfg[tableInfo.tableName].protocol==17}">selected</c:if>>UDP</option>
|
||||
<option value="0" <c:if test="${_cfg.ipCfg[tableInfo.tableName].protocol==0}">selected</c:if>><spring:message code="arbitrary"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].protocol"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].protocol"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="ipCfg[${tableInfo.tableName}].protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<input type="hidden" name="ipCfg[${mainTable}].protocolId" value="${_cfg.ipCfg[mainTable].protocolId}">
|
||||
<input name="ipCfg[${mainTable}].cfgId" type="hidden" value="${_cfg.ipCfg[mainTable].cfgId}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<input type="hidden" name="ipCfg[${otherTable.tableName}].protocolId" value="${_cfg.ipCfg[otherTable.tableName].protocolId}">
|
||||
<input name="ipCfg[${otherTable.tableName}].cfgId" type="hidden" value="${_cfg.ipCfg[otherTable.tableName].cfgId}"/>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input type="hidden" name="ipCfg[${tableInfo.tableName}].protocolId" value="${_cfg.ipCfg[tableInfo.tableName].protocolId}">
|
||||
<input name="ipCfg[${tableInfo.tableName}].cfgId" type="hidden" value="${_cfg.ipCfg[tableInfo.tableName].cfgId}"/>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +1,14 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<h3 class="form-section">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '3' and otherTable==null}">
|
||||
<spring:message code="${mainTableDesc}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '3'}">
|
||||
<spring:message code="${otherTable.tableDesc}"/>
|
||||
</c:when>
|
||||
<c:otherwise>数值<spring:message code="block_config"/></c:otherwise>
|
||||
</c:choose>
|
||||
<spring:message code="${tableInfo.tableDesc}"/>
|
||||
<small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".numCfg" title="add"></span></small></h3>
|
||||
<div class="row numCfg collapse">
|
||||
<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">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '3' and otherTable==null}">
|
||||
<input name="numCfg[${mainTable}].cfgDesc" type="text" class="form-control" value="${_cfg.numCfg[mainTable].cfgDesc}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '3'}">
|
||||
<input name="numCfg[${otherTable.tableName}].cfgDesc" type="text" class="form-control" value="${_cfg.numCfg[otherTable.tableName].cfgDesc}"/>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input name="numCfg[${tableInfo.tableName}].cfgDesc" type="text" class="form-control" value="${_cfg.numCfg[tableInfo.tableName].cfgDesc}"/>
|
||||
</div>
|
||||
<div for="cfgDesc"></div>
|
||||
</div>
|
||||
@@ -32,14 +17,7 @@
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_area"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '3' and otherTable==null}">
|
||||
<input type="text" name="numCfg[${mainTable}].lowBounadry" value="${_cfg.numCfg[mainTable].lowBounadry}">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '3'}">
|
||||
<input type="text" name="numCfg[${otherTable.tableName}].lowBounadry" value="${_cfg.numCfg[otherTable.tableName].lowBounadry}">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input type="text" name="numCfg[${tableInfo.tableName}].lowBounadry" value="${_cfg.numCfg[tableInfo.tableName].lowBounadry}">
|
||||
</div>
|
||||
<div for="district"></div>
|
||||
</div>
|
||||
@@ -50,14 +28,7 @@
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '3' and otherTable==null}">
|
||||
<input type="text" name="numCfg[${mainTable}].upBounadry" value="${_cfg.numCfg[mainTable].upBounadry}">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '3'}">
|
||||
<input type="text" name="numCfg[${otherTable.tableName}].upBounadry" value="${_cfg.numCfg[otherTable.tableName].upBounadry}">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input type="text" name="numCfg[${tableInfo.tableName}].upBounadry" value="${_cfg.numCfg[tableInfo.tableName].upBounadry}">
|
||||
</div>
|
||||
<div for="keywords"></div>
|
||||
</div>
|
||||
@@ -66,32 +37,16 @@
|
||||
<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:choose>
|
||||
<c:when test="${mainTableType eq '3' and otherTable==null}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="numCfg[${mainTable}].exprType" value="1"
|
||||
<c:if test="${_cfg.numCfg[mainTable].exprType==1}">checked</c:if>
|
||||
><spring:message code="and"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="numCfg[${mainTable}].exprType" value="0"
|
||||
<c:if test="${_cfg.numCfg[mainTable].exprType==0}">checked</c:if>
|
||||
><spring:message code="null"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '3'}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="numCfg[${otherTable.tableName}].exprType" value="1"
|
||||
<c:if test="${_cfg.numCfg[otherTable.tableName].exprType==1}">checked</c:if>
|
||||
><spring:message code="and"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="numCfg[${otherTable.tableName}].exprType" value="0"
|
||||
<c:if test="${_cfg.numCfg[otherTable.tableName].exprType==0}">checked</c:if>
|
||||
><spring:message code="null"/>
|
||||
</label>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="numCfg[${tableInfo.tableName}].exprType" value="1"
|
||||
<c:if test="${_cfg.numCfg[tableInfo.tableName].exprType==1}">checked</c:if>
|
||||
><spring:message code="and"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="numCfg[${tableInfo.tableName}].exprType" value="0"
|
||||
<c:if test="${_cfg.numCfg[tableInfo.tableName].exprType==0}">checked</c:if>
|
||||
><spring:message code="null"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isAreaEffective"></div>
|
||||
</div>
|
||||
@@ -102,26 +57,13 @@
|
||||
<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">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '3' and otherTable==null}">
|
||||
<select name="numCfg[${mainTable}].matchMethod" class="selectpicker select2 form-control" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.numCfg[mainTable].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.numCfg[mainTable].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.numCfg[mainTable].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.numCfg[mainTable].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
|
||||
</select>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '3'}">
|
||||
<select name="numCfg[${otherTable.tableName}].matchMethod" class="selectpicker select2 form-control" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.numCfg[otherTable.tableName].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.numCfg[otherTable.tableName].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.numCfg[otherTable.tableName].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.numCfg[otherTable.tableName].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
|
||||
</select>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<select name="numCfg[${tableInfo.tableName}].matchMethod" class="selectpicker select2 form-control" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.numCfg[tableInfo.tableName].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.numCfg[tableInfo.tableName].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.numCfg[tableInfo.tableName].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.numCfg[tableInfo.tableName].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
@@ -130,34 +72,15 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '3' and otherTable==null}">
|
||||
<select name="numCfg[${mainTable}].isHexbin" class="selectpicker select2 form-control" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.numCfg[mainTable].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.numCfg[mainTable].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.numCfg[mainTable].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '3'}">
|
||||
<select name="numCfg[${otherTable.tableName}].isHexbin" class="selectpicker select2 form-control" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.numCfg[otherTable.tableName].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.numCfg[otherTable.tableName].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.numCfg[otherTable.tableName].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<select name="numCfg[${tableInfo.tableName}].isHexbin" class="selectpicker select2 form-control" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.numCfg[tableInfo.tableName].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.numCfg[tableInfo.tableName].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.numCfg[tableInfo.tableName].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '3' and otherTable==null}">
|
||||
<input name="numCfg[${mainTable}].cfgId" type="hidden" value="${_cfg.numCfg[mainTable].cfgId}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '3'}">
|
||||
<input name="numCfg[${otherTable.tableName}].cfgId" type="hidden" value="${_cfg.numCfg[otherTable.tableName].cfgId}"/>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input name="numCfg[${tableInfo.tableName}].cfgId" type="hidden" value="${_cfg.numCfg[tableInfo.tableName].cfgId}"/>
|
||||
</div>
|
||||
<!--/row-->
|
||||
@@ -1,29 +1,17 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<h3 class="form-section">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<spring:message code="${mainTableDesc}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<spring:message code="${otherTable.tableDesc}"/>
|
||||
</c:when>
|
||||
<c:otherwise>字符串<spring:message code="block_config"/></c:otherwise>
|
||||
</c:choose>
|
||||
<!-- <small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".stringCfg" title="add"></span></small> --></h3>
|
||||
<div class="row stringCfg">
|
||||
<spring:message code="${tableInfo.tableDesc}"/>
|
||||
<small><span style="margin-left:10px"><input type="checkbox" name="cfgSelect" value="stringCfg"
|
||||
<c:if test="${_cfg.stringCfg[tableInfo.tableName]!= null and _cfg.stringCfg[tableInfo.tableName].cfgId != null}">checked</c:if>
|
||||
/> <spring:message code="optional"/></span></small>
|
||||
</h3>
|
||||
<div class="row stringCfg collapse">
|
||||
<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">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<input class="form-control" type="text" name="stringCfg[${mainTable}].cfgDesc" value="${_cfg.stringCfg[mainTable].cfgDesc}">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<input class="form-control" type="text" name="stringCfg[${otherTable.tableName}].cfgDesc" value="${_cfg.stringCfg[otherTable.tableName].cfgDesc}">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input class="form-control" type="text" name="stringCfg[${tableInfo.tableName}].cfgDesc" value="${_cfg.stringCfg[tableInfo.tableName].cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -31,145 +19,62 @@
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<input class="form-control required" type="text" name="stringCfg[${mainTable}].cfgKeywords" value="${_cfg.stringCfg[mainTable].cfgKeywords}">
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<input class="form-control required" type="text" name="stringCfg[${otherTable.tableName}].cfgKeywords" value="${_cfg.stringCfg[otherTable.tableName].cfgKeywords}">
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input class="form-control required" type="text" name="stringCfg[${tableInfo.tableName}].cfgKeywords" value="${_cfg.stringCfg[tableInfo.tableName].cfgKeywords}">
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<div for="stringCfg[${mainTable}].cfgKeywords"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<div for="stringCfg[${otherTable.tableName}].cfgKeywords"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="stringCfg[${tableInfo.tableName}].cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row stringCfg">
|
||||
<div class="row stringCfg collapse">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stringCfg[${mainTable}].exprType" value="1"
|
||||
<c:if test="${_cfg.stringCfg[mainTable].exprType==1}">checked</c:if>
|
||||
class="required"><spring:message code="and"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stringCfg[${mainTable}].exprType" value="0"
|
||||
<c:if test="${_cfg.stringCfg[mainTable].exprType==0}">checked</c:if>
|
||||
class="required"><spring:message code="null"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stringCfg[${otherTable.tableName}].exprType" value="1"
|
||||
<c:if test="${_cfg.stringCfg[otherTable.tableName].exprType==1}">checked</c:if>
|
||||
class="required"><spring:message code="and"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stringCfg[${otherTable.tableName}].exprType" value="0"
|
||||
<c:if test="${_cfg.stringCfg[otherTable.tableName].exprType==0}">checked</c:if>
|
||||
class="required"><spring:message code="null"/>
|
||||
</label>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stringCfg[${tableInfo.tableName}].exprType" value="1"
|
||||
<c:if test="${_cfg.stringCfg[tableInfo.tableName].exprType==1}">checked</c:if>
|
||||
class="required"><spring:message code="and"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stringCfg[${tableInfo.tableName}].exprType" value="0"
|
||||
<c:if test="${_cfg.stringCfg[tableInfo.tableName].exprType==0}">checked</c:if>
|
||||
class="required"><spring:message code="null"/>
|
||||
</label>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<div for="stringCfg[${mainTable}].exprType"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<div for="stringCfg[${otherTable.tableName}].exprType"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="stringCfg[${tableInfo.tableName}].exprType"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<select name="stringCfg[${mainTable}].matchMethod" class="selectpicker select2 form-control required">
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.stringCfg[mainTable].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.stringCfg[mainTable].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.stringCfg[mainTable].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.stringCfg[mainTable].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
|
||||
</select>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<select name="stringCfg[${otherTable.tableName}].matchMethod" class="selectpicker select2 form-control required">
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.stringCfg[otherTable.tableName].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.stringCfg[otherTable.tableName].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.stringCfg[otherTable.tableName].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.stringCfg[otherTable.tableName].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
|
||||
</select>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<select name="stringCfg[${tableInfo.tableName}].matchMethod" class="selectpicker select2 form-control required">
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.stringCfg[tableInfo.tableName].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.stringCfg[tableInfo.tableName].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.stringCfg[tableInfo.tableName].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.stringCfg[tableInfo.tableName].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<div for="stringCfg[${mainTable}].matchMethod"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<div for="stringCfg[${otherTable.tableName}].matchMethod"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="stringCfg[${tableInfo.tableName}].matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row stringCfg">
|
||||
<div class="row stringCfg collapse">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<select name="stringCfg[${mainTable}].isHexbin" class="selectpicker select2 form-control required" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.stringCfg[mainTable].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.stringCfg[mainTable].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.stringCfg[mainTable].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<select name="stringCfg[${otherTable.tableName}].isHexbin" class="selectpicker select2 form-control required" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.stringCfg[otherTable.tableName].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.stringCfg[otherTable.tableName].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.stringCfg[otherTable.tableName].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<select name="stringCfg[${tableInfo.tableName}].isHexbin" class="selectpicker select2 form-control required" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.stringCfg[tableInfo.tableName].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.stringCfg[tableInfo.tableName].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.stringCfg[tableInfo.tableName].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<div for="stringCfg[${mainTable}].isHexbin"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<div for="stringCfg[${otherTable.tableName}].isHexbin"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="stringCfg[${tableInfo.tableName}].isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<input name="stringCfg[${mainTable}].cfgId" type="hidden" value="${_cfg.stringCfg[mainTable].cfgId}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<input name="stringCfg[${otherTable.tableName}].cfgId" type="hidden" value="${_cfg.stringCfg[otherTable.tableName].cfgId}"/>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input name="stringCfg[${tableInfo.tableName}].cfgId" type="hidden" value="${_cfg.stringCfg[tableInfo.tableName].cfgId}"/>
|
||||
</div>
|
||||
<!--/row-->
|
||||
@@ -5,33 +5,136 @@
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
switchIpType($("select[name$='ipType']"));
|
||||
areaControlInit();
|
||||
$("[name^='ipCfg']").attr("disabled",true);
|
||||
$("[name^='stringCfg']").attr("disabled",true);
|
||||
$("[name^='numCfg']").attr("disabled",true);
|
||||
$("[name^='complexCfg']").attr("disabled",true);
|
||||
if($("#ipSelect").is(":checked")){
|
||||
$("[name^='ipCfg']").removeProp("disabled");
|
||||
//解决select插件disbale后无法恢复
|
||||
$(".bootstrap-select").removeClass("disabled");
|
||||
$(".bootstrap-select button").removeClass("disabled");
|
||||
$(".collapse").addClass("in");
|
||||
$(".ipCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".ipCfg").find(".bootstrap-select button").removeClass("disabled");
|
||||
$(".ipCfg").addClass("in");
|
||||
}
|
||||
|
||||
$("[name='cfgSelect']:checked").each(function(){
|
||||
var row=$(this).parents(".form-section").next();
|
||||
if(row.hasClass("complexCfg")){
|
||||
$("[name^='complexCfg']").removeProp("disabled");
|
||||
//解决select插件disbale后无法恢复
|
||||
$(".complexCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".complexCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".complexCfg").find(".bootstrap-select button").removeClass("disabled");
|
||||
$(".complexCfg").addClass("in");
|
||||
}else if(row.hasClass("stringCfg")){
|
||||
$("[name^='stringCfg']").removeProp("disabled");
|
||||
//解决select插件disbale后无法恢复
|
||||
$(".stringCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".stringCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".stringCfg").find(".bootstrap-select button").removeClass("disabled");
|
||||
$(".stringCfg").addClass("in");
|
||||
}else if(row.hasClass("ipCfg")){
|
||||
$("[name^='ipCfg']").removeProp("disabled");
|
||||
//解决select插件disbale后无法恢复
|
||||
$(".ipCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".ipCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".ipCfg").find(".bootstrap-select button").removeClass("disabled");
|
||||
$(".ipCfg").addClass("in");
|
||||
}
|
||||
});
|
||||
$("input[name='isAreaEffective']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if(val==1){
|
||||
$(".areaType").removeClass("hidden");
|
||||
if($("input[name='areaType']:checked").val()==1){//areaISP
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
}else if($("input[name='areaType']:checked").val()==0){//areaIp
|
||||
$("#areaIp").removeClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$(".areaType").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
if(val==0){
|
||||
$("#areaIp").removeClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}else{
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
var len=$("[name='cfgSelect']:checked").length;
|
||||
if(len==0){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox"
|
||||
});
|
||||
$("[name='cfgSelect']").change(function(){
|
||||
var row=$(this).parents(".form-section").next();
|
||||
if($(this).prop("checked")){
|
||||
if(row.hasClass("complexCfg")){
|
||||
$("[name^='complexCfg']").removeProp("disabled");
|
||||
//解决select插件disbale后无法恢复
|
||||
$(".complexCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".complexCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".complexCfg").find(".bootstrap-select button").removeClass("disabled");
|
||||
$(".complexCfg").addClass("in");
|
||||
}else if(row.hasClass("stringCfg")){
|
||||
$("[name^='stringCfg']").removeProp("disabled");
|
||||
//解决select插件disbale后无法恢复
|
||||
$(".stringCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".stringCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".stringCfg").find(".bootstrap-select button").removeClass("disabled");
|
||||
$(".stringCfg").addClass("in");
|
||||
}else if(row.hasClass("ipCfg")){
|
||||
$("[name^='ipCfg']").removeProp("disabled");
|
||||
//解决select插件disbale后无法恢复
|
||||
$(".ipCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".ipCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".ipCfg").find(".bootstrap-select button").removeClass("disabled");
|
||||
$(".ipCfg").addClass("in");
|
||||
}
|
||||
}else{
|
||||
if(row.hasClass("complexCfg")){
|
||||
$(".complexCfg").removeClass("in");
|
||||
$("[name^='complexCfg']").attr("disabled",true);
|
||||
}else if(row.hasClass("stringCfg")){
|
||||
$(".stringCfg").removeClass("in");
|
||||
$("[name^='stringCfg']").attr("disabled",true);
|
||||
}else if(row.hasClass("ipCfg")){
|
||||
$(".ipCfg").removeClass("in");
|
||||
$("[name^='ipCfg']").attr("disabled",true);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#ipSelect").change(function(){
|
||||
if($(this).prop("checked")){
|
||||
$("[name^='ipCfg']").removeProp("disabled");
|
||||
//解决select插件disbale后无法恢复
|
||||
$(".bootstrap-select").removeClass("disabled");
|
||||
$(".bootstrap-select button").removeClass("disabled");
|
||||
$(".collapse").addClass("in");
|
||||
$(".ipCfg").find(".bootstrap-select").removeClass("disabled");
|
||||
$(".ipCfg").find(".bootstrap-select button").removeClass("disabled");
|
||||
$(".ipCfg").addClass("in");
|
||||
}else{
|
||||
$(".collapse").removeClass("in");
|
||||
$(".ipCfg").removeClass("in");
|
||||
$("[name^='ipCfg']").attr("disabled",true);
|
||||
}
|
||||
});
|
||||
@@ -105,40 +208,62 @@ $(function(){
|
||||
<input type="hidden" name="action" value="${_cfg.action}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<div class="form-body">
|
||||
<c:choose>
|
||||
<c:when test="${_cfg.mainTableType eq '4'}">
|
||||
<%@include file="/WEB-INF/include/form/multiple/complexInfo.jsp" %>
|
||||
</c:when>
|
||||
<c:when test="${_cfg.mainTableType eq '3'}">
|
||||
<%@include file="/WEB-INF/include/form/multiple/numInfo.jsp" %>
|
||||
</c:when>
|
||||
<c:when test="${_cfg.mainTableType eq '2'}">
|
||||
<%@include file="/WEB-INF/include/form/multiple/stringInfo.jsp" %>
|
||||
</c:when>
|
||||
<c:when test="${_cfg.mainTableType eq '1'}">
|
||||
<%@include file="/WEB-INF/include/form/multiple/ipInfo.jsp" %>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<c:forEach items="${_cfg.otherTables}" var="otherTable">
|
||||
<c:forEach items="${tableInfos}" var="tableInfo">
|
||||
<c:choose>
|
||||
<c:when test="${otherTable.tableType eq '4'}">
|
||||
<c:when test="${tableInfo.tableType eq '4'}">
|
||||
<%@include file="/WEB-INF/include/form/multiple/complexInfo.jsp" %>
|
||||
</c:when>
|
||||
<c:when test="${otherTable.tableType eq '3'}">
|
||||
<c:when test="${tableInfo.tableType eq '3'}">
|
||||
<%@include file="/WEB-INF/include/form/multiple/numInfo.jsp" %>
|
||||
</c:when>
|
||||
<c:when test="${otherTable.tableType eq '2'}">
|
||||
<c:when test="${tableInfo.tableType eq '2'}">
|
||||
<%@include file="/WEB-INF/include/form/multiple/stringInfo.jsp" %>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:forEach items="${_cfg.otherTables}" var="otherTable">
|
||||
<c:forEach items="${tableInfos}" var="tableInfo">
|
||||
<c:choose>
|
||||
<c:when test="${otherTable.tableType eq '1'}">
|
||||
<c:when test="${tableInfo.tableType eq '1'}">
|
||||
<%@include file="/WEB-INF/include/form/multiple/ipInfo.jsp" %>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<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="whether_area_block"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="1"
|
||||
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
|
||||
class="required"><spring:message code="yes"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="0"
|
||||
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
|
||||
class="required"><spring:message code="no"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isAreaEffective"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden areaType col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="区域管控类型"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="areaType" value="1" class="required"><spring:message code="area"/> <spring:message code="isp"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="areaType" value="0" class="required"><spring:message code="area"/> ip
|
||||
</label>
|
||||
</div>
|
||||
<div for="areaType"></div>
|
||||
<input class="form-control" type="hidden" name="areaEffectiveIds" value="${_cfg.areaEffectiveIds}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/multiple/basicInfo.jsp" %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -30,14 +30,24 @@
|
||||
//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);
|
||||
if($(this).prop("name")!="mainTable"){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
}
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#keywords").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
$("select[name='mainTable']").on("change",function(){
|
||||
var val=$(this).val();
|
||||
var type=$(this).find("option:selected").data("type");
|
||||
$("#mainTableType").val(type);
|
||||
var desc=$(this).find("option:selected").data("desc");
|
||||
$("#mainTableDesc").val(desc);
|
||||
return page();
|
||||
});
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
@@ -47,6 +57,19 @@
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
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>
|
||||
@@ -54,8 +77,10 @@
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<c:if test="${audit==0}">
|
||||
<shiro:hasPermission name="cfg:multiple:add">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/cfg/multiple/form?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}&mainTable=${mainTable}'"><spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
@@ -70,7 +95,6 @@
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/cfg/multiple/list" method="post" class="form-search">
|
||||
<input id="mainTable" name="mainTable" type="hidden" value="${mainTable}"/>
|
||||
<input id="mainTableType" name="mainTableType" type="hidden" value="${mainTableType}"/>
|
||||
<input id="mainTableDesc" name="mainTableDesc" type="hidden" value="${mainTableDesc}"/>
|
||||
<input id="cfgType" name="cfgType" type="hidden" value="${cfgType}"/>
|
||||
@@ -82,7 +106,6 @@
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
@@ -95,10 +118,22 @@
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<form:select path="mainTable" class="selectpicker select2 input-small" >
|
||||
<c:forEach items="${tableInfos}" var="tableInfo">
|
||||
<form:option value="${tableInfo.tableName}" data-type="${tableInfo.tableType}" data-desc="${tableInfo.tableDesc}"><spring:message code="${tableInfo.tableDesc}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</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" >
|
||||
<c:if test="${mainTableType eq '1'}">
|
||||
<form:option value="ipCfg.cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="ipCfg.srcIp"><spring:message code="client_ip"></spring:message></form:option>
|
||||
<form:option value="ipCfg.dstIp"><spring:message code="server_ip"></spring:message></form:option>
|
||||
</c:if>
|
||||
<c:if test="${mainTableType eq '2'}">
|
||||
<form:option value="stringCfg.cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="stringCfg.cfgKeywords"><spring:message code="key_word"></spring:message></form:option>
|
||||
@@ -121,25 +156,37 @@
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<c:if test="${audit==0}">
|
||||
<shiro:hasPermission name="cfg:string:edit">
|
||||
<button type="button" class="btn btn-default" onClick="edit('${ctx}/cfg/multiple/updateForm?serviceId=${serviceId}&action=${action}&mainTable=${mainTable}&cfgName=${cfgName}')">
|
||||
<i class="fa fa-edit"></i> <spring:message code="edit"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="cfg:multiple:delete">
|
||||
<sys:delRow url="${ctx}/cfg/multiple/delete?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}&mainTable=${mainTable}" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<!-- <button type="button" class="btn btn-default">
|
||||
<i class="fa fa-download"></i> 导出</button> -->
|
||||
</c:if>
|
||||
<c:if test="${audit==1}">
|
||||
<shiro:hasPermission name="cfg:multiple:audit">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/cfg/multiple/audit?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}&mainTable=${mainTable}&isAudit=1" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/cfg/multiple/audit?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}&mainTable=${mainTable}&isAudit=2" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/cfg/multiple/audit?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}&mainTable=${mainTable}&isAudit=3" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
</c:if>
|
||||
<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>
|
||||
<%-- <button type="button" class="btn btn-default btn-sm" onclick="return page()">
|
||||
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
|
||||
</button> --%>
|
||||
<%-- <div class="pull-left">
|
||||
<c:set var="sortI18n"><spring:message code="sort"/></c:set>
|
||||
<select name="orderBy" class="selectpicker select2 input-small" title="${sortI18n}">
|
||||
<option value="${mainTable}.create_time asc" <c:if test="${fn:contains(page.orderBy,'create_time asc') }">selected</c:if> ><spring:message code="createTime_asc"/></option>
|
||||
<option value="${mainTable}.create_time desc" <c:if test="${fn:contains(page.orderBy , 'create_time desc') }">selected</c:if> ><spring:message code="createTime_desc"/></option>
|
||||
<option value="${mainTable}.edit_time asc" <c:if test="${fn:contains(page.orderBy , 'edit_time asc') }">selected</c:if> ><spring:message code="editTime_asc"/></option>
|
||||
<option value="${mainTable}.edit_time desc" <c:if test="${fn:contains(page.orderBy , 'edit_time desc') }">selected</c:if> ><spring:message code="editTime_desc"/></option>
|
||||
<option value="${mainTable}.audit_time asc" <c:if test="${fn:contains(page.orderBy , 'audit_time asc') }">selected</c:if> ><spring:message code="auditTime_asc"/></option>
|
||||
<option value="${mainTable}.audit_time desc" <c:if test="${fn:contains(page.orderBy , 'audit_time desc') }">selected</c:if> ><spring:message code="auditTime_desc"/></option>
|
||||
</select>
|
||||
</div> --%>
|
||||
</div>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
|
||||
@@ -262,9 +309,10 @@
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<%-- <th><spring:message code="seq"/></th> --%>
|
||||
<%--遍历主表属性 --%>
|
||||
<c:choose>
|
||||
@@ -303,23 +351,23 @@
|
||||
</c:choose>
|
||||
<%--遍历主表属性 --%>
|
||||
<%--遍历子表属性 --%>
|
||||
<c:forEach items="${cfg.otherTables}" var="other" varStatus="status">
|
||||
<c:if test="${other.tableType eq '4'}">
|
||||
<th><spring:message code="${other.tableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<c:forEach items="${tableInfos}" var="tableInfo" varStatus="status">
|
||||
<c:if test="${tableInfo.tableName ne mainTable and tableInfo.tableType eq '4'}">
|
||||
<th><spring:message code="${tableInfo.tableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="match_area"/></th>
|
||||
<th><spring:message code="key_word"/></th>
|
||||
</c:if>
|
||||
<c:if test="${other.tableType eq '3'}">
|
||||
<th><spring:message code="${other.tableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<c:if test="${tableInfo.tableName ne mainTable and tableInfo.tableType eq '3'}">
|
||||
<th><spring:message code="${tableInfo.tableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="数值下界"/></th>
|
||||
<th><spring:message code="数值上界"/></th>
|
||||
</c:if>
|
||||
<c:if test="${other.tableType eq'2'}">
|
||||
<th><spring:message code="${other.tableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<c:if test="${tableInfo.tableName ne mainTable and tableInfo.tableType eq'2'}">
|
||||
<th><spring:message code="${tableInfo.tableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="key_word"/></th>
|
||||
</c:if>
|
||||
<c:if test="${other.tableType eq '1'}">
|
||||
<th><spring:message code="${other.tableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<c:if test="${tableInfo.tableName ne mainTable and tableInfo.tableType eq '1'}">
|
||||
<th><spring:message code="${tableInfo.tableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<th>ip<spring:message code="type"/></th>
|
||||
<th><spring:message code="client_ip"/></th>
|
||||
<th><spring:message code="client_address_mask"/></th>
|
||||
@@ -348,12 +396,13 @@
|
||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
|
||||
<th><spring:message code="operation"></spring:message></th>
|
||||
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="bean" varStatus="status" step="1">
|
||||
<c:forEach items="${page.list}" var="bean" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${bean.compileId}" value="${bean.isAudit}"></td>
|
||||
<%-- <td>${status.index+1 }</td> --%>
|
||||
<%--遍历主表值 --%>
|
||||
<c:choose>
|
||||
@@ -399,57 +448,57 @@
|
||||
</c:choose>
|
||||
<%--遍历主表值 --%>
|
||||
<%--遍历子表值 --%>
|
||||
<c:forEach items="${cfg.otherTables}" var="other" varStatus="status">
|
||||
<c:if test="${other.tableType eq '4'}">
|
||||
<c:forEach items="${tableInfos}" var="tableInfo" varStatus="status">
|
||||
<c:if test="${tableInfo.tableName ne mainTable and tableInfo.tableType eq '4'}">
|
||||
<c:choose>
|
||||
<c:when test="${bean.complexCfg[other.tableName]!=null}">
|
||||
<td>${bean.complexCfg[other.tableName].cfgDesc }</td>
|
||||
<td>${bean.complexCfg[other.tableName].district }</td>
|
||||
<td>${bean.complexCfg[other.tableName].keywords }</td>
|
||||
<c:when test="${bean.complexCfg[tableInfo.tableName]!=null}">
|
||||
<td>${bean.complexCfg[tableInfo.tableName].cfgDesc }</td>
|
||||
<td>${bean.complexCfg[tableInfo.tableName].district }</td>
|
||||
<td>${bean.complexCfg[tableInfo.tableName].keywords }</td>
|
||||
</c:when>
|
||||
<c:otherwise><td></td><td></td><td></td></c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<c:if test="${other.tableType eq '3'}">
|
||||
<c:if test="${tableInfo.tableName ne mainTable and tableInfo.tableType eq '3'}">
|
||||
<c:choose>
|
||||
<c:when test="${bean.numCfg[other.tableName]!=null}">
|
||||
<td>${bean.numCfg[other.tableName].cfgDesc }</td>
|
||||
<td>${bean.numCfg[other.tableName].lowBounadry}</td>
|
||||
<td>${bean.numCfg[other.tableName].upBounadry }</td>
|
||||
<c:when test="${bean.numCfg[tableInfo.tableName]!=null}">
|
||||
<td>${bean.numCfg[tableInfo.tableName].cfgDesc }</td>
|
||||
<td>${bean.numCfg[tableInfo.tableName].lowBounadry}</td>
|
||||
<td>${bean.numCfg[tableInfo.tableName].upBounadry }</td>
|
||||
</c:when>
|
||||
<c:otherwise><td></td><td></td><td></td></c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<c:if test="${other.tableType eq '2'}">
|
||||
<c:if test="${tableInfo.tableName ne mainTable and tableInfo.tableType eq '2'}">
|
||||
<c:choose>
|
||||
<c:when test="${bean.stringCfg[other.tableName]!=null}">
|
||||
<td>${bean.stringCfg[other.tableName].cfgDesc }</td>
|
||||
<td>${bean.stringCfg[other.tableName].cfgKeywords }</td>
|
||||
<c:when test="${bean.stringCfg[tableInfo.tableName]!=null}">
|
||||
<td>${bean.stringCfg[tableInfo.tableName].cfgDesc }</td>
|
||||
<td>${bean.stringCfg[tableInfo.tableName].cfgKeywords }</td>
|
||||
</c:when>
|
||||
<c:otherwise><td></td><td></td></c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<c:if test="${other.tableType eq '1'}">
|
||||
<c:if test="${tableInfo.tableName ne mainTable and tableInfo.tableType eq '1'}">
|
||||
<c:choose>
|
||||
<c:when test="${bean.ipCfg[other.tableName]!=null}">
|
||||
<td>${bean.ipCfg[other.tableName].cfgDesc }</td>
|
||||
<td>V${bean.ipCfg[other.tableName].ipType }</td>
|
||||
<td>${bean.ipCfg[other.tableName].srcIp }</td>
|
||||
<td>${bean.ipCfg[other.tableName].srcIpMask }</td>
|
||||
<td>${bean.ipCfg[other.tableName].srcPort }</td>
|
||||
<td>${bean.ipCfg[other.tableName].srcPortMask }</td>
|
||||
<td>${bean.ipCfg[other.tableName].dstIp }</td>
|
||||
<td>${bean.ipCfg[other.tableName].dstIpMask }</td>
|
||||
<td>${bean.ipCfg[other.tableName].dstPort }</td>
|
||||
<td>${bean.ipCfg[other.tableName].dstPortMask }</td>
|
||||
<c:when test="${bean.ipCfg[tableInfo.tableName]!=null}">
|
||||
<td>${bean.ipCfg[tableInfo.tableName].cfgDesc }</td>
|
||||
<td>V${bean.ipCfg[tableInfo.tableName].ipType }</td>
|
||||
<td>${bean.ipCfg[tableInfo.tableName].srcIp }</td>
|
||||
<td>${bean.ipCfg[tableInfo.tableName].srcIpMask }</td>
|
||||
<td>${bean.ipCfg[tableInfo.tableName].srcPort }</td>
|
||||
<td>${bean.ipCfg[tableInfo.tableName].srcPortMask }</td>
|
||||
<td>${bean.ipCfg[tableInfo.tableName].dstIp }</td>
|
||||
<td>${bean.ipCfg[tableInfo.tableName].dstIpMask }</td>
|
||||
<td>${bean.ipCfg[tableInfo.tableName].dstPort }</td>
|
||||
<td>${bean.ipCfg[tableInfo.tableName].dstPortMask }</td>
|
||||
<td>
|
||||
<c:if test="${bean.ipCfg[other.tableName].direction==0}"><spring:message code="twoway"/></c:if>
|
||||
<c:if test="${bean.ipCfg[other.tableName].direction==1}"><spring:message code="oneway"/></c:if>
|
||||
<c:if test="${bean.ipCfg[tableInfo.tableName].direction==0}"><spring:message code="twoway"/></c:if>
|
||||
<c:if test="${bean.ipCfg[tableInfo.tableName].direction==1}"><spring:message code="oneway"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${bean.ipCfg[other.tableName].protocol==6}"><spring:message code="TCP"/></c:if>
|
||||
<c:if test="${bean.ipCfg[other.tableName].protocol==17}"><spring:message code="UDP"/></c:if>
|
||||
<c:if test="${bean.ipCfg[other.tableName].protocol==0}"><spring:message code="arbitrary"/></c:if>
|
||||
<c:if test="${bean.ipCfg[tableInfo.tableName].protocol==6}"><spring:message code="TCP"/></c:if>
|
||||
<c:if test="${bean.ipCfg[tableInfo.tableName].protocol==17}"><spring:message code="UDP"/></c:if>
|
||||
<c:if test="${bean.ipCfg[tableInfo.tableName].protocol==0}"><spring:message code="arbitrary"/></c:if>
|
||||
</td>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
@@ -518,7 +567,7 @@
|
||||
<td><fmt:formatDate value="${bean.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${bean.auditorName }</td>
|
||||
<td><fmt:formatDate value="${bean.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>
|
||||
<%-- <td>
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"></spring:message><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
@@ -546,7 +595,7 @@
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</td> --%>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user