音视频内容IP审核功能完成
音视频图片IP功能完成 音视频VOIP界面protocolId修改
This commit is contained in:
18
src/main/java/com/nis/domain/configuration/AvPicIpCfg.java
Normal file
18
src/main/java/com/nis/domain/configuration/AvPicIpCfg.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: AvPicIpCfg.java
|
||||
* @Description: 音视频Pic IP
|
||||
* @author (dell)
|
||||
* @date 2018年2月6日 上午8:29:26
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AvPicIpCfg extends BaseIpCfg {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1249923766365462700L;
|
||||
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
@@ -21,6 +22,7 @@ import com.nis.domain.configuration.AvContIpCfg;
|
||||
import com.nis.domain.configuration.AvVoipAccountCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.AvVoipIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
@@ -33,9 +35,10 @@ import com.nis.web.security.UserUtils;
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/ntc/av")
|
||||
public class AvContentController extends BaseController {
|
||||
|
||||
/*****************************voip业务***************/
|
||||
//音视频VOIP配置新增界面
|
||||
@RequestMapping(value = {"/voipForm"})
|
||||
@RequiresPermissions(value={"avVoip:config"})
|
||||
public String voipFrom(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")CfgIndexInfo cfg){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg.setCompileId(Integer.parseInt(ids));
|
||||
@@ -93,12 +96,14 @@ public class AvContentController extends BaseController {
|
||||
|
||||
//修改VOIP例配置状态
|
||||
@RequestMapping(value = {"/updateAvVoipValid"})
|
||||
@RequiresPermissions(value={"avVoip:config"})
|
||||
public String updateVoipValid(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
avContentCfgService.updateAvVoipValid(isAudit,isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+functionId;
|
||||
}
|
||||
//修改VOIP配置审核状态
|
||||
@RequestMapping(value = {"/auditAvVoip"})
|
||||
@RequiresPermissions(value={"avVoip:audit"})
|
||||
public String auditVoip(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
@@ -128,18 +133,21 @@ public class AvContentController extends BaseController {
|
||||
voipAndAccountInfoMap.put("account", voipAccountCfgList);
|
||||
return voipAndAccountInfoMap;
|
||||
}
|
||||
/*****************************voip业务***************/
|
||||
|
||||
/*****************************contIp业务***************/
|
||||
//视频文本内容配置列表
|
||||
@RequestMapping(value = {"/contentIpList"})
|
||||
public String contIpList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")AvContIpCfg entity){
|
||||
Page<AvContIpCfg> page = avContentCfgService.findContIpPage(new Page<AvContIpCfg>(request, response,"r"), entity);
|
||||
public String contIpList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")BaseIpCfg entity){
|
||||
Page<BaseIpCfg> page = avContentCfgService.findContIpPage(new Page<BaseIpCfg>(request, response,"r"), entity);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model);
|
||||
return "/cfg/av/contIp/contIpList";
|
||||
}
|
||||
//音视频文本内容新增界面
|
||||
//音视频CONTIP新增界面
|
||||
@RequestMapping(value = {"/contentIpForm"})
|
||||
public String contIpForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")AvContIpCfg cfg){
|
||||
@RequiresPermissions(value={"avContentIp:config"})
|
||||
public String contIpForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseIpCfg cfg){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg.setCfgId(Long.parseLong(ids));
|
||||
cfg = avContentCfgService.getContIpCfgById(cfg);
|
||||
@@ -151,13 +159,13 @@ public class AvContentController extends BaseController {
|
||||
return "/cfg/av/contIp/contIpForm";
|
||||
}
|
||||
|
||||
//保存voip信息
|
||||
//保存CONTIP信息
|
||||
@RequestMapping(value = {"/saveContIp"})
|
||||
public String saveContIp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")AvContIpCfg cfg,
|
||||
@ModelAttribute("cfg")BaseIpCfg cfg,
|
||||
@ModelAttribute("areaCfgIds")String areaCfgIds){
|
||||
try{
|
||||
avContentCfgService.saveOrUpdateAvContIp(cfg,areaCfgIds);
|
||||
avContentCfgService.saveOrUpdateContIp(cfg,areaCfgIds);
|
||||
addMessage(model,"save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
@@ -167,4 +175,92 @@ public class AvContentController extends BaseController {
|
||||
|
||||
return "redirect:" + adminPath +"/ntc/av/contentIpList?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
//修改CONTIP例配置状态
|
||||
@RequestMapping(value = {"/updateAvContIpValid"})
|
||||
@RequiresPermissions(value={"avContentIp:config"})
|
||||
public String updateAvContIpValid(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
avContentCfgService.updateContIpValid(isAudit,isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/ntc/av/contentIpList?functionId="+functionId;
|
||||
}
|
||||
//修改CONTIP配置审核
|
||||
@RequestMapping(value = {"/auditAvContIp"})
|
||||
@RequiresPermissions(value={"avContentIp:audit"})
|
||||
public String auditContIp(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
Date auditTime=new Date();
|
||||
for(String id :idArray){
|
||||
avContentCfgService.auditContIp(isAudit,isValid,functionId,id,auditTime);
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/av/contentIpList?functionId="+functionId;
|
||||
}
|
||||
/*****************************contIp业务***************/
|
||||
|
||||
/*****************************picIp业务***************/
|
||||
//视频文本内容配置列表
|
||||
@RequestMapping(value = {"/picIpList"})
|
||||
public String picIpList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")BaseIpCfg entity){
|
||||
Page<BaseIpCfg> page = avContentCfgService.findPicIpPage(new Page<BaseIpCfg>(request, response,"r"), entity);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model);
|
||||
return "/cfg/av/picIp/picIpList";
|
||||
}
|
||||
//音视频CONTIP新增界面
|
||||
@RequestMapping(value = {"/picIpForm"})
|
||||
@RequiresPermissions(value={"avPicIp:config"})
|
||||
public String picIpForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseIpCfg cfg){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg.setCfgId(Long.parseLong(ids));
|
||||
cfg = avContentCfgService.getPicIpCfgById(cfg);
|
||||
initUpdateFormCondition(model, cfg);
|
||||
}else{
|
||||
initFormCondition(model,cfg);
|
||||
}
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/av/contIp/contIpForm";
|
||||
}
|
||||
|
||||
//保存CONTIP信息
|
||||
@RequestMapping(value = {"/savePicIp"})
|
||||
public String savePicIp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")BaseIpCfg cfg,
|
||||
@ModelAttribute("areaCfgIds")String areaCfgIds){
|
||||
try{
|
||||
avContentCfgService.saveOrUpdatePicIp(cfg,areaCfgIds);
|
||||
addMessage(model,"save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(model,"save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/ntc/av/picIpList?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
//修改CONTIP例配置状态
|
||||
@RequestMapping(value = {"/updatePicIpValid"})
|
||||
@RequiresPermissions(value={"avPicIp:config"})
|
||||
public String updateAvPicIpValid(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
avContentCfgService.updatePicIpValid(isAudit,isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/ntc/av/picIpList?functionId="+functionId;
|
||||
}
|
||||
//修改CONTIP配置审核
|
||||
@RequestMapping(value = {"/auditPicIp"})
|
||||
@RequiresPermissions(value={"avPicIp:audit"})
|
||||
public String auditPicIp(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
Date auditTime=new Date();
|
||||
for(String id :idArray){
|
||||
avContentCfgService.auditPicIp(isAudit,isValid,functionId,id,auditTime);
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/av/picIpList?functionId="+functionId;
|
||||
}
|
||||
/*****************************picIp业务***************/
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,8 @@ import com.nis.web.dao.MyBatisDao;
|
||||
@MyBatisDao
|
||||
public interface AvContentCfgDao {
|
||||
public List<CfgIndexInfo> findVoipList(CfgIndexInfo entity) ;
|
||||
public List<AvContIpCfg> findContIpList(AvContIpCfg entity) ;
|
||||
public List<BaseIpCfg> findIpList(BaseIpCfg entity) ;
|
||||
public List<BaseIpCfg> getIpList(BaseIpCfg entity) ;
|
||||
public List<AvVoipIpCfg> findVoipIpCfgList(CfgIndexInfo entity);
|
||||
public List<AvVoipAccountCfg> findVoipAccountCfgList(CfgIndexInfo entity);
|
||||
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity);
|
||||
@@ -31,7 +32,7 @@ public interface AvContentCfgDao {
|
||||
public void updateAvVoipAccount(CfgIndexInfo entity);
|
||||
public void deleteAvVoipIp(CfgIndexInfo entity);
|
||||
public void deleteAvVoipAccount(CfgIndexInfo entity);
|
||||
public AvContIpCfg findContIpCfgById(AvContIpCfg entity) ;
|
||||
public void insertAvContIp(AvContIpCfg entity);
|
||||
public void updateAvContIp(AvContIpCfg entity);
|
||||
public BaseIpCfg findIpCfgById(BaseIpCfg entity) ;
|
||||
public void insertIp(BaseIpCfg entity);
|
||||
public void updateIp(BaseIpCfg entity);
|
||||
}
|
||||
|
||||
@@ -804,14 +804,14 @@
|
||||
</where>
|
||||
</delete>
|
||||
<!-- avContIp条件查询列表信息 -->
|
||||
<select id="findContIpList" resultMap="AvContIpCfgMap" parameterType="com.nis.domain.configuration.AvContIpCfg" >
|
||||
<select id="findIpList" resultMap="AvContIpCfgMap" parameterType="com.nis.domain.configuration.BaseIpCfg" >
|
||||
SELECT
|
||||
<include refid="AvContIp_Column" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM av_cont_ip_cfg r
|
||||
FROM ${tableName} r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
@@ -912,10 +912,10 @@
|
||||
</choose>
|
||||
</select>
|
||||
<!-- 根据cfg_id获取avContIpCfg信息 -->
|
||||
<select id="findContIpCfgById" resultMap="AvContIpCfgMap" parameterType="com.nis.domain.configuration.AvContIpCfg">
|
||||
<select id="findIpCfgById" resultMap="AvContIpCfgMap" parameterType="com.nis.domain.configuration.BaseIpCfg">
|
||||
select
|
||||
<include refid="AvContIp_Column" />
|
||||
from av_cont_ip_cfg r
|
||||
from ${tableName} r
|
||||
<where>
|
||||
<if test="cfgId != null">
|
||||
and r.cfg_id=#{cfgId,jdbcType=INTEGER}
|
||||
@@ -932,11 +932,8 @@
|
||||
|
||||
</select>
|
||||
<!-- insert AV_cont_IP_CFG表信息 -->
|
||||
<insert id="insertAvContIp" parameterType="com.nis.domain.configuration.AvContIpCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into av_cont_ip_cfg (
|
||||
<insert id="insertIp" parameterType="com.nis.domain.configuration.BaseIpCfg" >
|
||||
insert into ${tableName} (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
@@ -1003,8 +1000,8 @@
|
||||
)
|
||||
</insert>
|
||||
<!-- update av_cont_ip_cfg表信息 -->
|
||||
<update id="updateAvContIp" parameterType="com.nis.domain.configuration.AvContIpCfg" >
|
||||
update av_cont_ip_cfg
|
||||
<update id="updateIp" parameterType="com.nis.domain.configuration.BaseIpCfg" >
|
||||
update ${tableName}
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
@@ -1105,4 +1102,22 @@
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<select id="getIpList" resultMap="AvVoipIpCfgMap" parameterType="com.nis.domain.configuration.BaseIpCfg">
|
||||
select
|
||||
<include refid="AvVoipIp_Column" />
|
||||
from ${tableName} r
|
||||
<where>
|
||||
<if test="cfgId != null">
|
||||
and r.cfg_id=#{cfgId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="isValid != null">
|
||||
and r.is_valid=#{isValid,jdbcType=INTEGER}
|
||||
</when>
|
||||
<otherwise>
|
||||
and r.is_valid != -1
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,10 +1,8 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -13,22 +11,13 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AreaBean;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.AvContIpCfg;
|
||||
import com.nis.domain.configuration.AvFileSampleCfg;
|
||||
import com.nis.domain.configuration.AvSignSampleCfg;
|
||||
import com.nis.domain.configuration.AvVoipAccountCfg;
|
||||
import com.nis.domain.configuration.AvVoipIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
import com.nis.domain.configuration.HttpReqHeadCfg;
|
||||
import com.nis.domain.configuration.HttpResHeadCfg;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
@@ -61,6 +50,8 @@ public class AvContentCfgService extends BaseService{
|
||||
@Autowired
|
||||
protected AreaIpCfgDao areaIpCfgDao;
|
||||
|
||||
|
||||
/********************************voip业务*********************************/
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
@@ -253,7 +244,18 @@ public class AvContentCfgService extends BaseService{
|
||||
//新增
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||
,"cfgType"
|
||||
,"ipType"
|
||||
,"ipPattern"
|
||||
,"srcIpAddress"
|
||||
,"portPattern"
|
||||
,"srcPort"
|
||||
,"destPort"
|
||||
,"protocol"
|
||||
,"direction"
|
||||
,"protocolId"
|
||||
});
|
||||
areaIpCfgDao.saveAreaIpCfg(areaIpCfg);
|
||||
}
|
||||
}
|
||||
@@ -428,26 +430,29 @@ public class AvContentCfgService extends BaseService{
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("http配置下发配置参数:"+json);
|
||||
logger.info("voip配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||
logger.info("http配置取消配置响应信息:"+result.getMsg());
|
||||
logger.info("voip配置取消配置响应信息:"+result.getMsg());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/********************************voip业务*********************************/
|
||||
|
||||
|
||||
/********************************contIp业务*********************************/
|
||||
/**
|
||||
* contIp查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<AvContIpCfg> findContIpPage(Page page, AvContIpCfg entity) {
|
||||
public Page<BaseIpCfg> findContIpPage(Page page, BaseIpCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<AvContIpCfg> list=avContentCfgDao.findContIpList(entity);
|
||||
entity.setTableName("av_cont_ip_cfg");
|
||||
List<BaseIpCfg> list=avContentCfgDao.findIpList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
@@ -457,12 +462,14 @@ public class AvContentCfgService extends BaseService{
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public AvContIpCfg getContIpCfgById(AvContIpCfg entity) {
|
||||
return avContentCfgDao.findContIpCfgById(entity);
|
||||
public BaseIpCfg getContIpCfgById(BaseIpCfg entity) {
|
||||
entity.setTableName("av_cont_ip_cfg");
|
||||
return avContentCfgDao.findIpCfgById(entity);
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdateAvContIp(AvContIpCfg entity,String areaCfgIds){
|
||||
public void saveOrUpdateContIp(BaseIpCfg entity,String areaCfgIds){
|
||||
Date createTime=new Date();
|
||||
entity.setTableName("av_cont_ip_cfg");
|
||||
|
||||
//区域IPsetAreaEffectiveIds设置
|
||||
List<AreaIpCfg> areaCfg=entity.getAreaCfg();
|
||||
@@ -510,13 +517,24 @@ public class AvContentCfgService extends BaseService{
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null&&entity.getAreaCfg().size()>0){
|
||||
for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) {
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||
,"cfgType"
|
||||
,"ipType"
|
||||
,"ipPattern"
|
||||
,"srcIpAddress"
|
||||
,"portPattern"
|
||||
,"srcPort"
|
||||
,"destPort"
|
||||
,"protocol"
|
||||
,"direction"
|
||||
,"protocolId"
|
||||
});
|
||||
areaIpCfgDao.saveAreaIpCfg(areaIpCfg);
|
||||
}
|
||||
}
|
||||
|
||||
//保存cfgIndexInfo
|
||||
avContentCfgDao.insertAvContIp(entity);
|
||||
avContentCfgDao.insertIp(entity);
|
||||
}else{
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
@@ -538,13 +556,36 @@ public class AvContentCfgService extends BaseService{
|
||||
//修改
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType","cfgId"});
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||
,"cfgType"
|
||||
,"cfgId"
|
||||
,"ipType"
|
||||
,"ipPattern"
|
||||
,"srcIpAddress"
|
||||
,"portPattern"
|
||||
,"srcPort"
|
||||
,"destPort"
|
||||
,"protocol"
|
||||
,"direction"
|
||||
,"protocolId"
|
||||
});
|
||||
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
||||
}else{
|
||||
//新增
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||
,"cfgType"
|
||||
,"ipType"
|
||||
,"ipPattern"
|
||||
,"srcIpAddress"
|
||||
,"portPattern"
|
||||
,"srcPort"
|
||||
,"destPort"
|
||||
,"protocol"
|
||||
,"direction"
|
||||
,"protocolId"
|
||||
});
|
||||
areaIpCfgDao.saveAreaIpCfg(areaIpCfg);
|
||||
}
|
||||
}
|
||||
@@ -561,7 +602,448 @@ public class AvContentCfgService extends BaseService{
|
||||
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
avContentCfgDao.updateAvContIp(entity);
|
||||
avContentCfgDao.updateIp(entity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids compileIds
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void updateContIpValid(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
BaseIpCfg entity = new BaseIpCfg();
|
||||
entity.setTableName("av_cont_ip_cfg");
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setFunctionId(functionId);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
avContentCfgDao.updateIp(entity);
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, areaIpCfg);
|
||||
areaIpCfgDao.updateAreaIpCfgValid(areaIpCfg);
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids cfgId
|
||||
* @param functionId
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditContIp(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){
|
||||
BaseIpCfg entity = new BaseIpCfg();
|
||||
entity.setTableName("av_cont_ip_cfg");
|
||||
|
||||
List<BaseIpCfg> list = new ArrayList();
|
||||
List<AreaIpCfg> areaIpCfgList = new ArrayList();
|
||||
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity = avContentCfgDao.findIpCfgById(entity);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(auditTime);
|
||||
|
||||
|
||||
avContentCfgDao.updateIp(entity);
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||
,"cfgType"
|
||||
,"cfgId"
|
||||
,"ipType"
|
||||
,"ipPattern"
|
||||
,"srcIpAddress"
|
||||
,"portPattern"
|
||||
,"srcPort"
|
||||
,"destPort"
|
||||
,"protocol"
|
||||
,"direction"
|
||||
,"protocolId"
|
||||
});
|
||||
|
||||
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
||||
|
||||
list=avContentCfgDao.getIpList(entity);
|
||||
areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
List<GroupCfg> groupRelationList = new ArrayList();
|
||||
List<IpCfg> ipRegionList = new ArrayList();
|
||||
List<StringCfg> strRegionList = new ArrayList();
|
||||
List<NumBoundaryCfg> numRegionList = new ArrayList();
|
||||
List<DigestCfg> digestRegionList = new ArrayList();
|
||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||
|
||||
if(isAudit==1){
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
Map<String,List> ipMap = cfgConvert(ipRegionList,list,1,entity,groupRelationList);
|
||||
groupRelationList=ipMap.get("groupList");
|
||||
ipRegionList=ipMap.get("dstList");
|
||||
}
|
||||
|
||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||
Map<String,List> areaMap = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
|
||||
groupRelationList=areaMap.get("groupList");
|
||||
areaIpRegionList=areaMap.get("dstList");
|
||||
}
|
||||
}
|
||||
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
maatCfg.setAction(entity.getAction());
|
||||
maatCfg.setAuditTime(entity.getAuditTime());
|
||||
maatCfg.setIpRegionList(ipRegionList);
|
||||
maatCfg.setStrRegionList(strRegionList);
|
||||
maatCfg.setNumRegionList(numRegionList);
|
||||
maatCfg.setDigestRegionList(digestRegionList);
|
||||
maatCfg.setGroupRelationList(groupRelationList);
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("contIp配置下发配置参数:"+json);
|
||||
//TODO 调用服务接口下发配置
|
||||
//ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
//logger.info("contIp配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("contIp配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
//ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||
//logger.info("http配置取消配置响应信息:"+result.getMsg());
|
||||
}
|
||||
}
|
||||
/********************************contIp业务*********************************/
|
||||
|
||||
|
||||
/********************************picIp业务*********************************/
|
||||
/**
|
||||
* picIp查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<BaseIpCfg> findPicIpPage(Page page, BaseIpCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
entity.setTableName("av_pic_ip_cfg");
|
||||
List<BaseIpCfg> list=avContentCfgDao.findIpList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* picIp根据id查询contIpCfg信息
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public BaseIpCfg getPicIpCfgById(BaseIpCfg entity) {
|
||||
entity.setTableName("av_pic_ip_cfg");
|
||||
return avContentCfgDao.findIpCfgById(entity);
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdatePicIp(BaseIpCfg entity,String areaCfgIds){
|
||||
Date createTime=new Date();
|
||||
entity.setTableName("av_pic_ip_cfg");
|
||||
//区域IPsetAreaEffectiveIds设置
|
||||
List<AreaIpCfg> areaCfg=entity.getAreaCfg();
|
||||
List<AreaBean> areaIsps=entity.getAreaIsp();
|
||||
if(Constants.IS_AREA_EFFECTIVE_NO==entity.getIsAreaEffective()){
|
||||
entity.setAreaEffectiveIds("");
|
||||
entity.setAreaType(null);
|
||||
}else if(Constants.IS_AREA_EFFECTIVE_YES==entity.getIsAreaEffective()){
|
||||
if(Constants.AREA_EFFECTIVE_TYPE_AREA_ISP==entity.getAreaType()&&areaIsps!=null&&areaIsps.size()>0){
|
||||
StringBuffer areaEffectiveIds=new StringBuffer();
|
||||
for(int i=0;i<areaIsps.size();i++){
|
||||
if(StringUtils.isNotBlank(areaIsps.get(i).getIsp())){
|
||||
areaEffectiveIds.append(areaIsps.get(i).getArea()+":"+areaIsps.get(i).getIsp());
|
||||
}else{
|
||||
areaEffectiveIds.append(areaIsps.get(i).getArea());
|
||||
}
|
||||
if(i!=areaIsps.size()-1){
|
||||
areaEffectiveIds.append(",");
|
||||
}
|
||||
}
|
||||
entity.setAreaEffectiveIds(areaEffectiveIds.toString());
|
||||
}else if(Constants.AREA_EFFECTIVE_TYPE_AREA_IP==entity.getAreaType()&&areaCfg!=null&&areaCfg.size()>0){
|
||||
entity.setAreaEffectiveIds("");
|
||||
}
|
||||
}
|
||||
|
||||
//新增
|
||||
if(entity.getCfgId()==null){
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
//调用服务接口获取compileId
|
||||
List<Integer> compileIds = new ArrayList<Integer>();
|
||||
try {
|
||||
compileIds = ConfigServiceUtil.getId(1,1);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
if(compileIds != null && compileIds.size() >0 && compileIds.get(0) != 0){
|
||||
entity.setCompileId(compileIds.get(0));
|
||||
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null&&entity.getAreaCfg().size()>0){
|
||||
for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) {
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||
,"cfgType"
|
||||
,"ipType"
|
||||
,"ipPattern"
|
||||
,"srcIpAddress"
|
||||
,"portPattern"
|
||||
,"srcPort"
|
||||
,"destPort"
|
||||
,"protocol"
|
||||
,"direction"
|
||||
,"protocolId"
|
||||
});
|
||||
areaIpCfgDao.saveAreaIpCfg(areaIpCfg);
|
||||
}
|
||||
}
|
||||
|
||||
//保存cfgIndexInfo
|
||||
avContentCfgDao.insertIp(entity);
|
||||
}else{
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
|
||||
//修改
|
||||
}else{
|
||||
Date editTime=new Date();
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
|
||||
areaCfgIds=!StringUtil.isEmpty(areaCfgIds)? ","+areaCfgIds:"";
|
||||
|
||||
if(!StringUtil.isEmpty(entity.getAreaCfg())){
|
||||
for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) {
|
||||
if(!StringUtil.isEmpty(areaIpCfg.getCfgId())){
|
||||
if(areaCfgIds.contains(","+areaIpCfg.getCfgId()+",")){
|
||||
areaCfgIds=areaCfgIds.replace(areaIpCfg.getCfgId()+",", "");
|
||||
}
|
||||
//修改
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||
,"cfgType"
|
||||
,"cfgId"
|
||||
,"ipType"
|
||||
,"ipPattern"
|
||||
,"srcIpAddress"
|
||||
,"portPattern"
|
||||
,"srcPort"
|
||||
,"destPort"
|
||||
,"protocol"
|
||||
,"direction"
|
||||
,"protocolId"
|
||||
});
|
||||
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
||||
}else{
|
||||
//新增
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||
,"cfgType"
|
||||
,"ipType"
|
||||
,"ipPattern"
|
||||
,"srcIpAddress"
|
||||
,"portPattern"
|
||||
,"srcPort"
|
||||
,"destPort"
|
||||
,"protocol"
|
||||
,"direction"
|
||||
,"protocolId"
|
||||
});
|
||||
areaIpCfgDao.saveAreaIpCfg(areaIpCfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
//delete 真是删除areaIpCfg信息
|
||||
if(!StringUtil.isEmpty(areaCfgIds.replaceAll(",", ""))){
|
||||
areaCfgIds=areaCfgIds.substring(1,areaCfgIds.length());
|
||||
for (String cfgId : areaCfgIds.split(",")) {
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
areaIpCfg.setCfgId(Long.parseLong(cfgId));
|
||||
areaIpCfgDao.deleteAreaIpCfgByCfgId(areaIpCfg);
|
||||
}
|
||||
}
|
||||
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
avContentCfgDao.updateIp(entity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids compileIds
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void updatePicIpValid(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
BaseIpCfg entity = new BaseIpCfg();
|
||||
entity.setTableName("av_pic_ip_cfg");
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setFunctionId(functionId);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
avContentCfgDao.updateIp(entity);
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, areaIpCfg);
|
||||
areaIpCfgDao.updateAreaIpCfgValid(areaIpCfg);
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids cfgId
|
||||
* @param functionId
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditPicIp(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){
|
||||
BaseIpCfg entity = new BaseIpCfg();
|
||||
entity.setTableName("av_pic_ip_cfg");
|
||||
List<BaseIpCfg> list = new ArrayList();
|
||||
List<AreaIpCfg> areaIpCfgList = new ArrayList();
|
||||
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity = avContentCfgDao.findIpCfgById(entity);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(auditTime);
|
||||
|
||||
|
||||
avContentCfgDao.updateIp(entity);
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||
,"cfgType"
|
||||
,"cfgId"
|
||||
,"ipType"
|
||||
,"ipPattern"
|
||||
,"srcIpAddress"
|
||||
,"portPattern"
|
||||
,"srcPort"
|
||||
,"destPort"
|
||||
,"protocol"
|
||||
,"direction"
|
||||
,"protocolId"
|
||||
});
|
||||
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
||||
|
||||
list=avContentCfgDao.getIpList(entity);
|
||||
areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
List<GroupCfg> groupRelationList = new ArrayList();
|
||||
List<IpCfg> ipRegionList = new ArrayList();
|
||||
List<StringCfg> strRegionList = new ArrayList();
|
||||
List<NumBoundaryCfg> numRegionList = new ArrayList();
|
||||
List<DigestCfg> digestRegionList = new ArrayList();
|
||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||
|
||||
if(isAudit==1){
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
Map<String,List> ipMap = cfgConvert(ipRegionList,list,1,entity,groupRelationList);
|
||||
groupRelationList=ipMap.get("groupList");
|
||||
ipRegionList=ipMap.get("dstList");
|
||||
}
|
||||
|
||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||
Map<String,List> areaMap = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
|
||||
groupRelationList=areaMap.get("groupList");
|
||||
areaIpRegionList=areaMap.get("dstList");
|
||||
}
|
||||
}
|
||||
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
maatCfg.setAction(entity.getAction());
|
||||
maatCfg.setAuditTime(entity.getAuditTime());
|
||||
maatCfg.setIpRegionList(ipRegionList);
|
||||
maatCfg.setStrRegionList(strRegionList);
|
||||
maatCfg.setNumRegionList(numRegionList);
|
||||
maatCfg.setDigestRegionList(digestRegionList);
|
||||
maatCfg.setGroupRelationList(groupRelationList);
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("contIp配置下发配置参数:"+json);
|
||||
//TODO 调用服务接口下发配置
|
||||
//ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
//logger.info("contIp配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("contIp配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
//ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||
//logger.info("http配置取消配置响应信息:"+result.getMsg());
|
||||
}
|
||||
}
|
||||
/********************************contIp业务*********************************/
|
||||
}
|
||||
|
||||
@@ -8,10 +8,12 @@ $(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change",function(){
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
@@ -50,6 +52,7 @@ $(function(){
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="protocolId" name="protocolId" value="${_cfg.protocolId}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
@@ -72,16 +75,19 @@ $(function(){
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service" varStatus="satus">
|
||||
<label class="radio-inline">
|
||||
<c:if test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action" serviceId="${service.serviceId }" value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>
|
||||
>
|
||||
<spring:message code="${service.actionCode }"/>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>>
|
||||
<spring:message code="${service.actionCode }" />
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
|
||||
@@ -292,11 +292,11 @@
|
||||
<th><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
|
||||
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
123
src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp
Normal file
123
src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp
Normal file
@@ -0,0 +1,123 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
//loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<%-- <h3 class="page-title">
|
||||
<spring:message code="${add}"></spring:message>
|
||||
</h3> --%>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}"><spring:message code="add"></spring:message></c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/ntc/av/savePicIp" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="protocolId" name="protocolId" value="${_cfg.protocolId}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>>
|
||||
<spring:message code="${service.actionCode }" />
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- desc and action -->
|
||||
<%@include file="/WEB-INF/include/form/ipInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<input type="hidden" name="isAreaEffective" value="0">
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
410
src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp
Normal file
410
src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp
Normal file
@@ -0,0 +1,410 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.srcIpAddress}");
|
||||
}else if("${cfg.srcPort}"){
|
||||
$("#intype").val("${cfg.srcPort}");
|
||||
} else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#description").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
});
|
||||
var edit=function(url){
|
||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||
if(cked.val()==1){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
if(cked.length==1){
|
||||
window.location = url+"&compileId="+cked.attr("id");
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<shiro:hasPermission name="avPicIp:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/ntc/av/picIpForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/av/picIpList?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<%-- <form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option> --%>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="srcIpAddress"><spring:message code="client_ip"></spring:message></form:option>
|
||||
<form:option value="srcPort"><spring:message code="client_port"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="avPicIp:config">
|
||||
<sys:delRow url="${ctx}/ntc/av/picIpForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/av/updatePicIpValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="avPicIp: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}/ntc/av/auditPicIp?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/av/auditPicIp?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/av/auditPicIp?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='request_number'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='type'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<%-- <th><spring:message code="seq"/></th> --%>
|
||||
<th><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="ip_type"/></th>
|
||||
<th><spring:message code="client_ip"/></th>
|
||||
<th><spring:message code="client_port"/></th>
|
||||
<th><spring:message code="server_ip"/></th>
|
||||
<th><spring:message code="server_port"/></th>
|
||||
<th><spring:message code="ip_pattern"/></th>
|
||||
<th><spring:message code="port_pattern"/></th>
|
||||
<th><spring:message code="direction"/></th>
|
||||
<th><spring:message code="protocol"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="type"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th>
|
||||
<th><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
|
||||
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" value="${cfg.isAudit}"></td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.ipType }</td>
|
||||
<td>${cfg.srcIpAddress }</td>
|
||||
<td>${cfg.srcPort }</td>
|
||||
<td>${cfg.destIpAddress }</td>
|
||||
<td>${cfg.destPort }</td>
|
||||
<td>${cfg.ipPattern }</td>
|
||||
<td>${cfg.portPattern }</td>
|
||||
<td>${cfg.direction }</td>
|
||||
<td>${cfg.protocol }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq cfg.action }">
|
||||
<spring:message code="${dict.itemCode }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}"><spring:message code="yes"/></c:if>
|
||||
</td>
|
||||
<td>${cfg.requestName }</td>
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<td title="${classify }">
|
||||
${fns:abbr(classify,20)}
|
||||
</td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<td title="${attribute }">
|
||||
${fns:abbr(attribute,20)}
|
||||
</td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<td title="${lableInfo }">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</td>
|
||||
<%-- <td>${cfg.areaEffectiveIds }</td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${cfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -15,10 +15,12 @@ $(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change",function(){
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
@@ -119,16 +121,19 @@ var delContent=function(contentClassName,addBtnClassName){
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service" varStatus="satus">
|
||||
<label class="radio-inline">
|
||||
<c:if test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action" serviceId="${service.serviceId }" value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>
|
||||
>
|
||||
<spring:message code="${service.actionCode }"/>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>>
|
||||
<spring:message code="${service.actionCode }" />
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
@@ -159,6 +164,7 @@ var delContent=function(contentClassName,addBtnClassName){
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
<input type="hidden" name="voipIps[${status.index }].protocolId" value="">
|
||||
<input type="hidden" name="voipIps[${status.index }].cfgId" value="${voipIp.cfgId}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
html+="<div class='row'>";
|
||||
if(data.ip.length >0){
|
||||
hasIp=true;
|
||||
html+="<div id='ipTitle"+index+"' onclick='switchInfo(\"account\","+index+")' class='col-md-1' style='width:150px;background-color: #eeeeee;border: 1px solid #c2cad8;padding: 5px;border-bottom:0px'>";
|
||||
html+="<div id='ipTitle"+index+"' onclick='switchInfo(\"account\","+index+")' class='col-md-1 tabInfo badge-info' >";
|
||||
html+="<spring:message code='av_voip_ip_title'/>";
|
||||
html+="<i id='ipDown"+index+"' class='fa fa-angle-double-down' ></i>";
|
||||
html+="<i id='ipUp"+index+"' class='fa fa-angle-double-up ' style='display:none'></i>";
|
||||
@@ -91,7 +91,7 @@
|
||||
}
|
||||
if(data.account.length >0){
|
||||
hasAccount=true;
|
||||
html+="<div id='accountTitle"+index+"' onclick='switchInfo(\"ip\","+index+")' class='col-md-1' style='width:150px;background-color: #f6f3f3;border: 1px solid #c2cad8;padding: 5px;border-bottom:0px'>";
|
||||
html+="<div id='accountTitle"+index+"' onclick='switchInfo(\"ip\","+index+")' class='col-md-1 tabInfo' >";
|
||||
html+="<spring:message code='av_voip_account_title'/>";
|
||||
html+="<i id='accountDown"+index+"' class='fa fa-angle-double-down ' style='display:none'></i>";
|
||||
html+="<i id='accountUp"+index+"' class='fa fa-angle-double-up '></i>";
|
||||
@@ -101,7 +101,7 @@
|
||||
html+="</div>";
|
||||
//ip信息
|
||||
if(data.ip.length >0){
|
||||
html+="<div id='ipInfo"+index+"' style='width:1050px;background-color: #f6f3f3;border: 1px solid #c2cad8;padding: 5px;'>";
|
||||
html+="<div id='ipInfo"+index+"' class='content'>";
|
||||
$.each(data.ip,function(index,item){
|
||||
html+="<div class='row'>";
|
||||
html+="<div class='col-md-4'>";
|
||||
@@ -226,7 +226,7 @@
|
||||
}
|
||||
//account信息
|
||||
if(data.account.length > 0){
|
||||
html+="<div id='accountInfo"+index+"' style='display:none;width:1050px;background-color: #f6f3f3;border: 1px solid #c2cad8;padding: 5px;'>";
|
||||
html+="<div id='accountInfo"+index+"' class='content' style='display:none'>";
|
||||
$.each(data.account,function(index,item){
|
||||
html+="<div class='row'>";
|
||||
html+="<div class='col-md-4'>";
|
||||
@@ -365,24 +365,24 @@
|
||||
if("ip" ==flag){
|
||||
$("#ipInfo"+index).hide();
|
||||
$("#downIp"+index).hide();
|
||||
$("#ipTitle"+index).css("background-color","#f6f3f3");
|
||||
$("#ipTitle"+index).removeClass("badge-info");
|
||||
$("#accountInfo"+index).show();
|
||||
$("#accountDown"+index).show();
|
||||
$("#accountUp"+index).hide();
|
||||
$("#ipUp"+index).show();
|
||||
$("#ipDown"+index).hide();
|
||||
$("#accountTitle"+index).css("background-color","#eeeeee");
|
||||
$("#accountTitle"+index).addClass("badge-info");
|
||||
}else{
|
||||
//关闭account信息
|
||||
$("#accountInfo"+index).hide();
|
||||
$("#downAccount"+index).hide();
|
||||
$("#accountTitle"+index).css("background-color","#f6f3f3");
|
||||
$("#accountTitle"+index).removeClass("badge-info");
|
||||
$("#ipInfo"+index).show();
|
||||
$("#ipDown"+index).show();
|
||||
$("#accountUp"+index).show();
|
||||
$("#accountDown"+index).hide();
|
||||
$("#ipUp"+index).hide();
|
||||
$("#ipTitle"+index).css("background-color","#eeeeee");
|
||||
$("#ipTitle"+index).addClass("badge-info");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user