Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
This commit is contained in:
18
src/main/java/com/nis/domain/configuration/AvContIpCfg.java
Normal file
18
src/main/java/com/nis/domain/configuration/AvContIpCfg.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: AvVoipIpCfg.java
|
||||
* @Description: 音视频Cont IP
|
||||
* @author (dell)
|
||||
* @date 2018年2月6日 上午8:29:26
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AvContIpCfg extends BaseIpCfg {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1249923766365462700L;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName: AvVoipAccountCfg.java
|
||||
* @Description: TODO
|
||||
@@ -7,7 +8,7 @@ package com.nis.domain.configuration;
|
||||
* @date 2018年2月6日 上午8:18:55
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AvVoipAccountCfg extends ComplexkeywordCfg{
|
||||
public class AvVoipAccountCfg extends BaseStringCfg{
|
||||
|
||||
|
||||
private static final long serialVersionUID = -7398698517584394431L;
|
||||
|
||||
@@ -27,6 +27,7 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
private static final String tableName="cfg_index_info";
|
||||
private List<AvVoipAccountCfg> voipAccounts;//Add表单使用
|
||||
private List<AvVoipIpCfg> voipIps; //Add表单使用
|
||||
private AreaIpCfg areaIpCfg;
|
||||
private AvVoipAccountCfg voipAccount;//Search使用
|
||||
private AvVoipIpCfg voipIp;//Search使用
|
||||
private IpPortCfg ipPort;
|
||||
@@ -142,5 +143,11 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
public AreaIpCfg getAreaIpCfg() {
|
||||
return areaIpCfg;
|
||||
}
|
||||
public void setAreaIpCfg(AreaIpCfg areaIpCfg) {
|
||||
this.areaIpCfg = areaIpCfg;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AvContIpCfg;
|
||||
import com.nis.domain.configuration.AvVoipAccountCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.AvVoipIpCfg;
|
||||
@@ -36,6 +37,7 @@ public class AvContentController extends BaseController {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg.setCompileId(Integer.parseInt(ids));
|
||||
cfg = avContentCfgService.getCfgIndexInfo(cfg);
|
||||
initUpdateFormCondition(model, cfg);
|
||||
}else{
|
||||
List<AvVoipAccountCfg> avVoipAccountCfgs=new ArrayList<AvVoipAccountCfg>();
|
||||
avVoipAccountCfgs.add(new AvVoipAccountCfg());
|
||||
@@ -43,9 +45,9 @@ public class AvContentController extends BaseController {
|
||||
List<AvVoipIpCfg> avVoipIpCfgs=new ArrayList<AvVoipIpCfg>();
|
||||
avVoipIpCfgs.add(new AvVoipIpCfg());
|
||||
cfg.setVoipIps(avVoipIpCfgs);
|
||||
initFormCondition(model,cfg);
|
||||
}
|
||||
|
||||
initFormCondition(model,cfg);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/av/voip/voipForm";
|
||||
}
|
||||
@@ -55,10 +57,11 @@ public class AvContentController extends BaseController {
|
||||
@RequestMapping(value = {"/saveVoip"})
|
||||
public String saveVoip(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")CfgIndexInfo cfg,
|
||||
@ModelAttribute("areaCfgIds")String areaCfgIds,
|
||||
@ModelAttribute("voipIpIds")String voipIpIds,
|
||||
@ModelAttribute("voipAccountIds")String voipAccountIds){
|
||||
try{
|
||||
avContentCfgService.saveOrUpdateAvVoip(cfg,voipIpIds,voipAccountIds);
|
||||
avContentCfgService.saveOrUpdateAvVoip(cfg,voipIpIds,voipAccountIds,areaCfgIds);
|
||||
addMessage(model,"save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("voip信息保存失败",e);
|
||||
@@ -117,18 +120,37 @@ public class AvContentController extends BaseController {
|
||||
}
|
||||
|
||||
//视频文本内容配置列表
|
||||
@RequestMapping(value = {"/contIpList"})
|
||||
public String contIpList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo entity){
|
||||
if(entity.getVoipIp()== null){
|
||||
entity.setVoipIp(new AvVoipIpCfg());
|
||||
}
|
||||
if(entity.getVoipAccount()== null){
|
||||
entity.setVoipAccount(new AvVoipAccountCfg());
|
||||
}
|
||||
Page<CfgIndexInfo> page = avContentCfgService.findPage(new Page<CfgIndexInfo>(request, response,"r"), entity);
|
||||
@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);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model);
|
||||
return "/cfg/av/voip/voipList";
|
||||
return "/cfg/av/contIp/contIpList";
|
||||
}
|
||||
//音视频文本内容新增界面
|
||||
@RequestMapping(value = {"/contentIpForm"})
|
||||
public String contIpForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")AvContIpCfg cfg){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg = avContentCfgService.getContIpCfgById(cfg);
|
||||
}
|
||||
initFormCondition(model,cfg);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/av/contIp/contIpForm";
|
||||
}
|
||||
|
||||
//保存voip信息
|
||||
@RequestMapping(value = {"/saveContIp"})
|
||||
public String saveContIp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")AvContIpCfg cfg){
|
||||
try{
|
||||
avContentCfgService.saveOrUpdateAvContIp(cfg);
|
||||
addMessage(model,"save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(model,"save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/ntc/av/contentIpList?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@@ -16,6 +17,10 @@ import com.nis.web.dao.MyBatisDao;
|
||||
@MyBatisDao
|
||||
public interface AreaIpCfgDao extends CrudDao<AreaIpCfg>{
|
||||
public List<AreaIpCfg> getByCompileId(@Param("compileId") int compileId) ;
|
||||
public List<AreaIpCfg> findAreaIpCfgList(CfgIndexInfo entity);
|
||||
public void saveAreaIpCfg(AreaIpCfg entity);
|
||||
public void saveAreaIpCfgFromCfgIndexInfo(CfgIndexInfo entity);
|
||||
public void updateAreaIpCfgFromCfgIndexInfo(CfgIndexInfo entity);
|
||||
public void deleteAreaIpCfg(AreaIpCfg entity);
|
||||
public void deleteAreaIpCfgByCfgId(CfgIndexInfo entity);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,26 @@
|
||||
AND IS_VALID!=-1
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<!-- 根据compileId获取avVoipAccountCfg信息 -->
|
||||
<select id="findAreaIpCfgList" resultMap="BaseIpMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
select
|
||||
<include refid="AreaIpCfg_Column_List_with_id" />
|
||||
from area_ip_cfg r
|
||||
<where>
|
||||
<if test="compileId != null">
|
||||
and r.COMPILE_ID=#{compileId,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>
|
||||
<!-- insert area_ip_cfg表信息 -->
|
||||
<insert id="saveAreaIpCfg" parameterType="com.nis.domain.configuration.AreaIpCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
@@ -125,8 +144,201 @@
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert area_ip_cfg表信息 -->
|
||||
<insert id="saveAreaIpCfgFromCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into area_ip_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
ip_type,
|
||||
src_ip_address,
|
||||
ip_pattern,
|
||||
port_pattern,
|
||||
src_port,
|
||||
protocol,
|
||||
protocol_id,
|
||||
direction,
|
||||
dest_port,
|
||||
dest_ip_address,
|
||||
cfg_type,
|
||||
cfg_region_code
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{areaIpCfg.ipType,jdbcType=INTEGER},
|
||||
#{areaIpCfg.srcIpAddress,jdbcType=VARCHAR},
|
||||
#{areaIpCfg.ipPattern,jdbcType=INTEGER},
|
||||
#{areaIpCfg.portPattern,jdbcType=INTEGER},
|
||||
#{areaIpCfg.srcPort,jdbcType=VARCHAR},
|
||||
#{areaIpCfg.protocol,jdbcType=INTEGER},
|
||||
#{areaIpCfg.protocolId,jdbcType=INTEGER},
|
||||
#{areaIpCfg.direction,jdbcType=INTEGER},
|
||||
#{areaIpCfg.destPort,jdbcType=VARCHAR},
|
||||
#{areaIpCfg.destIpAddress,jdbcType=VARCHAR},
|
||||
#{areaIpCfg.cfgType,jdbcType=VARCHAR},
|
||||
#{areaIpCfg.cfgRegionCode,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- update av_voip_ip_cfg表信息 -->
|
||||
<update id="updateAreaIpCfgFromCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
update area_ip_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
COMPILE_ID = #{compileId,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaIpCfg != null and areaIpCfg.ipType != null" >
|
||||
ip_type = #{areaIpCfg.ipType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaIpCfg != null and areaIpCfg.srcIpAddress != null and areaIpCfg.srcIpAddress != ''" >
|
||||
src_ip_address = #{areaIpCfg.srcIpAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaIpCfg != null and areaIpCfg.ipPattern != null" >
|
||||
ip_pattern = #{areaIpCfg.ipPattern,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaIpCfg != null and areaIpCfg.portPattern != null" >
|
||||
port_pattern = #{areaIpCfg.portPattern,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaIpCfg != null and areaIpCfg.srcPort != null and areaIpCfg.srcPort != ''" >
|
||||
src_port = #{areaIpCfg.srcPort,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaIpCfg != null and areaIpCfg.protocol != null" >
|
||||
protocol = #{areaIpCfg.protocol,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaIpCfg != null and areaIpCfg.protocolId != null" >
|
||||
protocol_id = #{areaIpCfg.protocolId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaIpCfg != null and areaIpCfg.direction != null" >
|
||||
direction = #{areaIpCfg.direction,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaIpCfg != null and areaIpCfg.destPort != null and areaIpCfg.destPort != ''" >
|
||||
dest_port = #{areaIpCfg.destPort,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaIpCfg != null and areaIpCfg.destIpAddress != null and areaIpCfg.destIpAddress != ''" >
|
||||
dest_ip_address = #{areaIpCfg.destIpAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaIpCfg != null and areaIpCfg.cfgType != null and areaIpCfg.cfgType != ''" >
|
||||
cfg_type = #{areaIpCfg.cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaIpCfg != null and areaIpCfg.cfgRegionCode != null " >
|
||||
cfg_region_code = #{areaIpCfg.cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
<if test="areaIpCfg != null and areaIpCfg.cfgId != null" >
|
||||
and cfg_id = #{areaIpCfg.cfgId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
and compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
and function_id = #{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<!-- 删除区域IP配置 -->
|
||||
<delete id="deleteAreaIpCfg" >
|
||||
delete from area_ip_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<!-- 删除区域IP配置 -->
|
||||
<!-- 删除voipIp信息 -->
|
||||
<delete id="deleteAreaIpCfgByCfgId" parameterType="com.nis.domain.configuration.AreaIpCfg" >
|
||||
delete from area_ip_cfg
|
||||
<where>
|
||||
<if test="areaIpCfg != null and areaIpCfg.cfgId != null" >
|
||||
and cfg_id = #{areaIpCfg.cfgId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
and compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
and function_id = #{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -9,6 +9,7 @@ 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.AvContIpCfg;
|
||||
import com.nis.domain.configuration.AvFileSampleCfg;
|
||||
import com.nis.domain.configuration.AvSignSampleCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
@@ -18,6 +19,7 @@ import com.nis.web.dao.MyBatisDao;
|
||||
@MyBatisDao
|
||||
public interface AvContentCfgDao {
|
||||
public List<CfgIndexInfo> findVoipList(CfgIndexInfo entity) ;
|
||||
public List<AvContIpCfg> findContIpList(AvContIpCfg entity) ;
|
||||
public List<AvVoipIpCfg> findVoipIpCfgList(CfgIndexInfo entity);
|
||||
public List<AvVoipAccountCfg> findVoipAccountCfgList(CfgIndexInfo entity);
|
||||
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity);
|
||||
@@ -29,4 +31,7 @@ public interface AvContentCfgDao {
|
||||
public void updateAvVoipAccount(CfgIndexInfo entity);
|
||||
public void deleteAvVoipIp(CfgIndexInfo entity);
|
||||
public void deleteAvVoipAccount(CfgIndexInfo entity);
|
||||
public AvContIpCfg findVoipIpCfgById(AvContIpCfg entity) ;
|
||||
public void insertAvContIp(AvContIpCfg entity);
|
||||
public void updateAvContIp(AvContIpCfg entity);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
<resultMap id="AvVoipAccountCfgMap" type="com.nis.domain.configuration.AvVoipAccountCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="district" property="district" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
@@ -89,6 +88,41 @@
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="AvContIpCfgMap" type="com.nis.domain.configuration.AvContIpCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
|
||||
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
||||
<result column="direction" property="direction" jdbcType="INTEGER" />
|
||||
<result column="protocol" property="protocol" jdbcType="INTEGER" />
|
||||
<result column="protocol_id" property="protocolId" jdbcType="INTEGER" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="AvVoip_Column" >
|
||||
r.CFG_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT,
|
||||
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
||||
@@ -104,12 +138,20 @@
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code
|
||||
</sql>
|
||||
<sql id="AvVoipAccount_Column" >
|
||||
r.cfg_id,r.cfg_desc,r.district,r.cfg_keywords,r.cfg_type,
|
||||
r.cfg_id,r.cfg_desc,r.cfg_keywords,r.cfg_type,
|
||||
r.action,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id,r.edit_time, r.auditor_id,
|
||||
r.audit_time,r.service_id,r.request_id,r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
|
||||
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,r.cfg_region_code
|
||||
</sql>
|
||||
<!-- 条件查询列表信息 -->
|
||||
<sql id="AvContIp_Column" >
|
||||
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.ip_pattern,r.port_pattern,r.src_port
|
||||
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
||||
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
||||
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
||||
r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code
|
||||
</sql>
|
||||
<!-- voip条件查询列表信息 -->
|
||||
<select id="findVoipList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
SELECT
|
||||
<include refid="AvVoip_Column" />
|
||||
@@ -211,15 +253,12 @@
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="(voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != '') or (voipAccount.district != null and voipAccount.district != '') ">
|
||||
<if test="(voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != '') ">
|
||||
AND r.compile_id in (select f.compile_id from av_voip_account_cfg f
|
||||
<where>
|
||||
<if test="voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != ''">
|
||||
and f.cfg_keywords like concat(concat('%',#{voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="voipAccount.district != null and voipAccount.district != ''">
|
||||
and f.district =#{voipAccount.district,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
and f.compile_id =#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
@@ -445,7 +484,6 @@
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
district,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
@@ -472,7 +510,6 @@
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{voipAccount.district,jdbcType=VARCHAR},
|
||||
#{voipAccount.cfgKeywords,jdbcType=VARCHAR},
|
||||
#{voipAccount.cfgType,jdbcType=VARCHAR},
|
||||
#{voipAccount.cfgRegionCode,jdbcType=INTEGER},
|
||||
@@ -713,9 +750,6 @@
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="voipAccount != null and voipAccount.district != null and voipAccount.district != ''" >
|
||||
district = #{voipAccount.district,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="voipAccount != null and voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != ''" >
|
||||
cfg_keywords = #{voipAccount.cfgKeywords,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -778,7 +812,306 @@
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
<!-- avContIp条件查询列表信息 -->
|
||||
<select id="findContIpList" resultMap="AvContIpCfgMap" parameterType="com.nis.domain.configuration.AvContIpCfg" >
|
||||
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
|
||||
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
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- <if test="search_create_time_start != null and search_create_time_start != ''">
|
||||
<![CDATA[AND r.CREATE_TIME >= #{search_create_time_start,jdbcType=TIMESTAMP}]]>
|
||||
</if>
|
||||
<if test="search_create_time_end != null and search_create_time_end != ''">
|
||||
<![CDATA[AND r.CREATE_TIME <= #{search_create_time_end,jdbcType=TIMESTAMP}]]>
|
||||
</if> -->
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND r.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- <if test="search_edit_time_start != null and search_edit_time_start != ''">
|
||||
<![CDATA[AND r.EDIT_TIME >= #{search_edit_time_start,jdbcType=TIMESTAMP}]]>
|
||||
</if>
|
||||
<if test="search_edit_time_end != null and search_edit_time_end != ''">
|
||||
<![CDATA[AND r.EDIT_TIME <= #{search_edit_time_end,jdbcType=TIMESTAMP}]]>
|
||||
</if> -->
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- <if test="search_audit_time_start != null and search_audit_time_start != ''">
|
||||
<![CDATA[AND r.AUDIT_TIME >= #{search_audit_time_start,jdbcType=TIMESTAMP}]]>
|
||||
</if>
|
||||
<if test="search_audit_time_end != null and search_audit_time_end != ''">
|
||||
<![CDATA[AND r.AUDIT_TIME <= #{search_audit_time_end,jdbcType=TIMESTAMP}]]>
|
||||
</if> -->
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND r.function_id=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||
and r.src_ip_address =#{srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="srcPort != null and srcPort != ''">
|
||||
and r.src_port =#{srcPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<!-- 根据cfg_id获取avContIpCfg信息 -->
|
||||
<select id="findContIpCfgById" resultMap="AvContIpCfgMap" parameterType="com.nis.domain.configuration.AvContIpCfg">
|
||||
select
|
||||
<include refid="AvContIp_Column" />
|
||||
from av_cont_ip_cfg 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>
|
||||
<!-- 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 (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
ip_type,
|
||||
src_ip_address,
|
||||
ip_pattern,
|
||||
port_pattern,
|
||||
src_port,
|
||||
protocol,
|
||||
protocol_id,
|
||||
direction,
|
||||
dest_port,
|
||||
dest_ip_address,
|
||||
cfg_type,
|
||||
cfg_region_code
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{ipType,jdbcType=INTEGER},
|
||||
#{srcIpAddress,jdbcType=VARCHAR},
|
||||
#{ipPattern,jdbcType=INTEGER},
|
||||
#{portPattern,jdbcType=INTEGER},
|
||||
#{srcPort,jdbcType=VARCHAR},
|
||||
#{protocol,jdbcType=INTEGER},
|
||||
#{protocolId,jdbcType=INTEGER},
|
||||
#{direction,jdbcType=INTEGER},
|
||||
#{destPort,jdbcType=VARCHAR},
|
||||
#{destIpAddress,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- update av_cont_ip_cfg表信息 -->
|
||||
<update id="updateAvContIp" parameterType="com.nis.domain.configuration.AvContIpCfg" >
|
||||
update av_cont_ip_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
COMPILE_ID = #{compileId,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ipType != null" >
|
||||
ip_type = #{ipType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
||||
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ipPattern != null" >
|
||||
ip_pattern = #{ipPattern,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="portPattern != null" >
|
||||
port_pattern = #{portPattern,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="srcPort != null and srcPort != ''" >
|
||||
src_port = #{srcPort,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="protocol != null" >
|
||||
protocol = #{protocol,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="protocolId != null" >
|
||||
protocol_id = #{protocolId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="direction != null" >
|
||||
protocol_id = #{direction,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="destPort != null and destPort != ''" >
|
||||
dest_port = #{destPort,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="destIpAddress != null and destIpAddress != ''" >
|
||||
dest_ip_address = #{destIpAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''" >
|
||||
cfg_type = #{cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null " >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
<if test="cfgId != null" >
|
||||
and cfg_id = #{cfgId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
and function_id = #{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -15,25 +15,24 @@ 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.CfgIndexInfo;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.FunctionRegionDictDao;
|
||||
import com.nis.web.dao.FunctionServiceDictDao;
|
||||
import com.nis.web.dao.configuration.AvCfgDao;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||
import com.nis.web.dao.configuration.AvContentCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
|
||||
/**
|
||||
@@ -45,6 +44,8 @@ import net.sf.json.JSONObject;
|
||||
public class AvContentCfgService extends BaseService{
|
||||
@Autowired
|
||||
protected AvContentCfgDao avContentCfgDao;
|
||||
@Autowired
|
||||
protected AreaIpCfgDao areaIpCfgDao;
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
@@ -100,8 +101,33 @@ public class AvContentCfgService extends BaseService{
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdateAvVoip(CfgIndexInfo entity,String voipIpIds,String voipAccountIds){
|
||||
public void saveOrUpdateAvVoip(CfgIndexInfo entity,String voipIpIds,String voipAccountIds,String areaCfgIds){
|
||||
Date createTime=new Date();
|
||||
//区域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());
|
||||
@@ -111,7 +137,7 @@ public class AvContentCfgService extends BaseService{
|
||||
//调用服务接口获取compileId
|
||||
List<Integer> compileIds = new ArrayList<Integer>();
|
||||
try {
|
||||
//TODO 后期修改为动态获取
|
||||
//TODO
|
||||
//compileIds = ConfigServiceUtil.getId(1,1);
|
||||
compileIds.add((int)Math.floor(Math.random()*1000000+1));
|
||||
} catch (Exception e) {
|
||||
@@ -135,12 +161,18 @@ public class AvContentCfgService extends BaseService{
|
||||
avContentCfgDao.insertAvVoipAccount(entity);
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null&&entity.getAreaCfg().size()>0){
|
||||
for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) {
|
||||
entity.setAreaIpCfg(areaIpCfg);
|
||||
areaIpCfgDao.saveAreaIpCfgFromCfgIndexInfo(entity);
|
||||
}
|
||||
}
|
||||
//保存cfgIndexInfo
|
||||
avContentCfgDao.insertCfgIndexInfo(entity);
|
||||
}else{
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
|
||||
//修改
|
||||
}else{
|
||||
Date editTime=new Date();
|
||||
@@ -149,6 +181,7 @@ public class AvContentCfgService extends BaseService{
|
||||
|
||||
voipIpIds=!StringUtil.isEmpty(voipIpIds)? voipIpIds+",":"";
|
||||
voipAccountIds=!StringUtil.isEmpty(voipAccountIds)? voipAccountIds+",":"";
|
||||
areaCfgIds=!StringUtil.isEmpty(areaCfgIds)? ","+areaCfgIds:"";
|
||||
|
||||
//判断voip信息为新增还是修改,清楚voipIpIds修改的voipId记录,剩下即为需要删除的voipId
|
||||
if(!StringUtil.isEmpty(entity.getVoipIps())){
|
||||
@@ -192,6 +225,26 @@ public class AvContentCfgService extends BaseService{
|
||||
}
|
||||
}
|
||||
}
|
||||
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);
|
||||
entity.setAreaIpCfg(areaIpCfg);
|
||||
areaIpCfgDao.updateAreaIpCfgFromCfgIndexInfo(entity);
|
||||
}else{
|
||||
//新增
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
entity.setAreaIpCfg(areaIpCfg);
|
||||
areaIpCfgDao.saveAreaIpCfgFromCfgIndexInfo(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
//delete 真是删除voipAccount信息
|
||||
if(!StringUtil.isEmpty(voipAccountIds.replaceAll(",", ""))){
|
||||
voipAccountIds=voipAccountIds.substring(1,voipAccountIds.length());
|
||||
@@ -215,6 +268,18 @@ public class AvContentCfgService extends BaseService{
|
||||
avContentCfgDao.deleteAvVoipIp(cfg);
|
||||
}
|
||||
}
|
||||
//delete 真是删除areaIpCfg信息
|
||||
if(!StringUtil.isEmpty(areaCfgIds.replaceAll(",", ""))){
|
||||
areaCfgIds=areaCfgIds.substring(1,areaCfgIds.length());
|
||||
for (String cfgId : areaCfgIds.split(",")) {
|
||||
CfgIndexInfo cfg=new CfgIndexInfo();
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
areaIpCfg.setCfgId(Long.parseLong(cfgId));
|
||||
cfg.setAreaIpCfg(areaIpCfg);
|
||||
areaIpCfgDao.deleteAreaIpCfgByCfgId(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
//修改
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
@@ -241,6 +306,7 @@ public class AvContentCfgService extends BaseService{
|
||||
avContentCfgDao.updateAvVoipIp(entity);
|
||||
avContentCfgDao.updateAvVoipAccount(entity);
|
||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||
areaIpCfgDao.updateAreaIpCfgFromCfgIndexInfo(entity);
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -256,6 +322,7 @@ public class AvContentCfgService extends BaseService{
|
||||
List<CfgIndexInfo> list = new ArrayList();
|
||||
List<AvVoipIpCfg> voipIpList = new ArrayList();
|
||||
List<AvVoipAccountCfg> voipAccountList = new ArrayList();
|
||||
List<AreaIpCfg> areaIpCfgList = new ArrayList();
|
||||
Map<String, Object> childMap=new HashMap<>();
|
||||
CfgIndexInfo searchCfg=new CfgIndexInfo();
|
||||
Date auditTime=new Date();
|
||||
@@ -268,12 +335,15 @@ public class AvContentCfgService extends BaseService{
|
||||
entity.setAuditTime(auditTime);
|
||||
voipIpList=avContentCfgDao.findVoipIpCfgList(entity);
|
||||
voipAccountList=avContentCfgDao.findVoipAccountCfgList(entity);
|
||||
areaIpCfgList=areaIpCfgDao.findAreaIpCfgList(entity);
|
||||
|
||||
avContentCfgDao.updateAvVoipIp(entity);
|
||||
avContentCfgDao.updateAvVoipAccount(entity);
|
||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||
childMap.put("voipIp", voipIpList);
|
||||
childMap.put("voipAccount", voipAccountList);
|
||||
areaIpCfgDao.updateAreaIpCfgFromCfgIndexInfo(entity);
|
||||
childMap.put("voipIps", voipIpList);
|
||||
childMap.put("voipAccounts", voipAccountList);
|
||||
childMap.put("areaIpCfgs", areaIpCfgList);
|
||||
list.add(entity);
|
||||
}
|
||||
/*if(isAudit==1){
|
||||
@@ -305,4 +375,66 @@ public class AvContentCfgService extends BaseService{
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* contIp查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<AvContIpCfg> findContIpPage(Page page, AvContIpCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<AvContIpCfg> list=avContentCfgDao.findContIpList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* contUp根据id查询contIpCfg信息
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public AvContIpCfg getContIpCfgById(AvContIpCfg entity) {
|
||||
return avContentCfgDao.findVoipIpCfgById(entity);
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdateAvContIp(AvContIpCfg entity){
|
||||
Date createTime=new Date();
|
||||
//新增
|
||||
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 {
|
||||
//TODO
|
||||
//compileIds = ConfigServiceUtil.getId(1,1);
|
||||
compileIds.add((int)Math.floor(Math.random()*1000000+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));
|
||||
//保存cfgIndexInfo
|
||||
avContentCfgDao.insertAvContIp(entity);
|
||||
}else{
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
|
||||
//修改
|
||||
}else{
|
||||
Date editTime=new Date();
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
avContentCfgDao.updateAvContIp(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,6 +241,7 @@ has_approved=It has been approved and can not be operated on !
|
||||
hasnot_approved=It has not been approved and can not be operated on !
|
||||
check_one=choose one please !
|
||||
one_more=please choose at least one !
|
||||
one_more_area=Regional control,must full in the operator or IP information !
|
||||
custom_columns=custom columns
|
||||
maxlength_64=The maxlength is 64!
|
||||
maxlength_128=The maxlength is 128!
|
||||
@@ -351,7 +352,7 @@ oneway=oneway
|
||||
twoway=twoway
|
||||
arbitrary=arbitrary
|
||||
basic_config=basic configuration
|
||||
block_config=block configuration
|
||||
block_config=configuration info
|
||||
expression_type=expression type
|
||||
null=null
|
||||
and=&
|
||||
|
||||
@@ -214,6 +214,7 @@ has_approved=It has been approved and can not be operated on !
|
||||
hasnot_approved=It has not been approved and can not be operated on !
|
||||
check_one=choose one please !
|
||||
one_more=please choose at least one !
|
||||
one_more_area=Regional control,must full in the operator or IP information !
|
||||
custom_columns=custom columns
|
||||
maxlength_64=The maxlength is 64?
|
||||
maxlength_128=The maxlength is 128?
|
||||
@@ -309,7 +310,7 @@ oneway=oneway
|
||||
twoway=twoway
|
||||
arbitrary=arbitrary
|
||||
basic_config=basic configuration
|
||||
block_config=block configuration
|
||||
block_config=configuration info
|
||||
expression_type=expression type
|
||||
null=null
|
||||
and=&
|
||||
|
||||
@@ -241,6 +241,7 @@ has_approved=\u5DF2\u7ECF\u901A\u8FC7\u5BA1\u6838\uFF0C\u65E0\u6CD5\u8FDB\u884C\
|
||||
hasnot_approved=\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u65E0\u6CD5\u8FDB\u884C\u8BE5\u64CD\u4F5C\uFF01
|
||||
check_one=\u8BF7\u9009\u62E9\u4E00\u6761\u6570\u636E\uFF01
|
||||
one_more=\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u6761\u6570\u636E\!
|
||||
one_more_area=\u533A\u57DF\u7BA1\u63A7\uFF0C\u5FC5\u987B\u586B\u5199\u8FD0\u8425\u5546\u6216ip\u4FE1\u606F!
|
||||
custom_columns=\u81EA\u5B9A\u4E49\u5217\u5B57\u6BB5
|
||||
maxlength_64=\u8BF7\u8F93\u5165\u4E00\u4E2A\u957F\u5EA6\u6700\u591A\u662F 64\u7684\u5B57\u7B26\u4E32\uFF01
|
||||
maxlength_128=\u8BF7\u8F93\u5165\u4E00\u4E2A\u957F\u5EA6\u6700\u591A\u662F 128\u7684\u5B57\u7B26\u4E32\uFF01
|
||||
@@ -352,7 +353,7 @@ oneway=\u5355\u5411
|
||||
twoway=\u53CC\u5411
|
||||
arbitrary=\u4EFB\u610F
|
||||
basic_config=\u57FA\u672C\u914D\u7F6E
|
||||
block_config=\u7BA1\u63A7\u914D\u7F6E
|
||||
block_config=\u914D\u7F6E\u4FE1\u606F
|
||||
expression_type=\u8868\u8FBE\u5F0F\u7C7B\u578B
|
||||
null=\u65E0\u8868\u8FBE\u5F0F
|
||||
and=\u4E0E\u8868\u8FBE\u5F0F
|
||||
|
||||
@@ -1,80 +1,10 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$(".glyphicon-plus").on("click",function(){
|
||||
var obj=$(this).parents(".form-section").next(".container-fluid").clone();
|
||||
var len=$(this).parents("div").find(".container-fluid:visible").size();
|
||||
if($(this).parent().parent().parent().attr("id")=="areaIp"){
|
||||
obj.find("[id^='_areaCfg']").each(function(){
|
||||
var name=$(this).attr("id").replace("_areaCfg.","");
|
||||
$(this).removeAttr("id");
|
||||
$(this).attr("name","areaCfg["+len+"]."+name);
|
||||
$(this).parents(".form-group").find("div[for^='_areaCfg']").attr("for","areaCfg["+len+"]."+name);
|
||||
$(this).selectpicker("refresh");
|
||||
});
|
||||
obj.removeClass("hidden");
|
||||
switchIpType(obj.find("select[name$='ipType']"));
|
||||
obj.find("select[name$='ipType']").on("change",function(){
|
||||
switchIpType($(this));
|
||||
});
|
||||
obj.appendTo("#areaIp");
|
||||
$("#areaIsp").find(".container-fluid").each(function(){
|
||||
if(!$(this).hasClass("hidden")) $(this).remove();
|
||||
});
|
||||
}else if($(this).parent().parent().parent().attr("id")=="areaIsp"){
|
||||
obj.find("[name^='areaCode']").each(function(){
|
||||
$(this).attr("name","areaIsp["+len+"].area");
|
||||
$(this).parents(".form-group").find("div[for^='areaCode']").attr("for","areaIsp["+len+"].area");
|
||||
$(this).selectpicker("refresh");
|
||||
});
|
||||
obj.find("[name^='ispCode']").each(function(){
|
||||
$(this).attr("name","areaIsp["+len+"].isp");
|
||||
$(this).selectpicker("refresh");
|
||||
});
|
||||
obj.removeClass("hidden");
|
||||
obj.appendTo("#areaIsp");
|
||||
$("#areaIp").find(".container-fluid").each(function(){
|
||||
if(!$(this).hasClass("hidden")) $(this).remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
function delAreaIp(obj){
|
||||
var thisObj=$(obj);
|
||||
thisObj.parents(".container-fluid").remove();
|
||||
var len=$("#areaIp").find(".container-fluid:visible").size();
|
||||
//调整角标
|
||||
if(len>0){
|
||||
len--;
|
||||
$("#areaIp").find(".container-fluid:visible").each(function(){
|
||||
$(this).find("[name^='areaCfg']").each(function(){
|
||||
var name=$(this).attr("name");
|
||||
name=name.substring(name.lastIndexOf(".")+1,name.length);
|
||||
$(this).attr("name","areaCfg["+len+"]."+name);
|
||||
$(this).parents(".form-group").find("div[for^='areaCfg']").attr("for","areaCfg["+len+"]."+name);
|
||||
});
|
||||
len--;
|
||||
});
|
||||
}
|
||||
}
|
||||
function delAreaIsp(obj){
|
||||
var thisObj=$(obj);
|
||||
thisObj.parents(".container-fluid").remove();
|
||||
var len=$("#areaIsp").find(".container-fluid:visible").size();
|
||||
if(len>0){
|
||||
len--;
|
||||
$("#areaIsp").find(".container-fluid:visible").each(function(){
|
||||
$(this).find("[name^='areaIsp']").each(function(){
|
||||
var name=$(this).attr("name");
|
||||
name=name.substring(name.lastIndexOf(".")+1,name.length);
|
||||
$(this).attr("name","areaIsp["+len+"]."+name);
|
||||
$(this).parents(".form-group").find("div[for^='areaIsp']").attr("for","areaIsp["+len+"]."+name);
|
||||
});
|
||||
len--;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@@ -118,7 +48,7 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
<div class="hidden" id="areaIsp">
|
||||
<h4 class="form-section"><spring:message code="area"/> <spring:message code="isp"/><small><span class="glyphicon glyphicon-plus" title="add"></span></small></h4>
|
||||
<div class="container-fluid hidden">
|
||||
<div class="container-fluid hidden row">
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove" onClick="delAreaIsp(this);"/>
|
||||
@@ -200,7 +130,7 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
<div class="hidden" id="areaIp">
|
||||
<h4 class="form-section"><spring:message code="area"/> ip<small><span class="glyphicon glyphicon-plus" title="add"></span></small></h4>
|
||||
<div class="container-fluid hidden">
|
||||
<div class="container-fluid hidden row">
|
||||
<div class="row">
|
||||
<input type="hidden" id="_areaCfg.isAreaEffective" value="${_areaCfg.isAreaEffective}">
|
||||
<input type="hidden" id="_areaCfg.cfgRegionCode" value="${_areaCfg.cfgRegionCode}">
|
||||
@@ -212,22 +142,14 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
</div>
|
||||
<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 id="_areaCfg.cfgDesc" class="form-control" type="text" value="">
|
||||
</div>
|
||||
<div for="_areaCfg.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="ip_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select id="_areaCfg.ipType" class="show-tick form-control required">
|
||||
<option value="4">V4</option>
|
||||
<option value="6">V6</option>
|
||||
<select name="_areaCfg.ipType" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipType">
|
||||
<option value="${ipType.itemCode}">${ipType.itemValue}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="_areaCfg.ipType"></div>
|
||||
@@ -240,7 +162,7 @@ function delAreaIsp(obj){
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select id="_areaCfg.ipPattern" class="show-tick form-control required">
|
||||
<option value="1"><spring:message code="subnet"/></option>
|
||||
<option value="1"><spring:message code="ip_subnet"/></option>
|
||||
<option value="2"><spring:message code="ip_range"/></option>
|
||||
<option value="3"><spring:message code="ip"/></option>
|
||||
</select>
|
||||
@@ -249,20 +171,6 @@ function delAreaIsp(obj){
|
||||
</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="port_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select id="_areaCfg.portPattern" class="show-tick form-control required">
|
||||
<option value="1"><spring:message code="port"/></option>
|
||||
<option value="2"><spring:message code="port_range"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="_areaCfg.portPattern"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
@@ -271,6 +179,21 @@ function delAreaIsp(obj){
|
||||
<div for="_areaCfg.srcIpAddress"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="port_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select id="_areaCfg.portPattern" class="show-tick form-control required">
|
||||
<option value="1"><spring:message code="port"/></option>
|
||||
<option value="2"><spring:message code="port_mask"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="_areaCfg.portPattern"></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"/></label>
|
||||
@@ -281,7 +204,7 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
|
||||
@@ -301,7 +224,7 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||
@@ -323,8 +246,9 @@ function delAreaIsp(obj){
|
||||
<div class="col-md-6">
|
||||
<select id="_areaCfg.direction" class="show-tick form-control required" >
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_areaCfg.direction==0}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${_areaCfg.direction==1}">selected</c:if>><spring:message code="oneway"/></option>
|
||||
<option value="0" <c:if test="${_areaCfg.direction==0 || _areaCfg.direction==null}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${_areaCfg.direction==1 }">selected</c:if>><spring:message code="ingress"/></option>
|
||||
<option value="2" <c:if test="${_areaCfg.direction==2 }">selected</c:if>><spring:message code="degress"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="_areaCfg.direction"></div>
|
||||
@@ -334,7 +258,7 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
<input type="hidden" name="areaCfgIds" value="${areaCfgIds}">
|
||||
<c:forEach items="${areaCfgs}" var ="areaCfg" varStatus="status">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid row">
|
||||
<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}">
|
||||
@@ -343,22 +267,14 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
</div>
|
||||
<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 name="areaCfg[${status.index}].cfgDesc" class="form-control" type="text" value="${areaCfg.cfgDesc}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].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="ip_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="areaCfg[${status.index}].ipType" class="selectpicker show-tick form-control required">
|
||||
<option value="4" <c:if test="${areaCfg.ipType==4}">selected</c:if>>V4</option>
|
||||
<option value="6" <c:if test="${areaCfg.ipType==6}">selected</c:if>>V6</option>
|
||||
<select name="areaCfg[${status.index}].ipType" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipType">
|
||||
<option value="${ipType.itemCode}" <c:if test="${areaCfg.ipType==ipType.itemCode}">selected</c:if> >${ipType.itemValue}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].ipType"></div>
|
||||
@@ -366,86 +282,73 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="areaCfg[${status.index}].ipPattern" class="selectpicker show-tick form-control required">
|
||||
<option value="1" <c:if test="${areaCfg.ipPattern==1}">selected</c:if> ><spring:message code="ip_subnet"/></option>
|
||||
<option value="2" <c:if test="${areaCfg.ipPattern==2}">selected</c:if>><spring:message code="ip_range"/></option>
|
||||
<option value="3" <c:if test="${areaCfg.ipPattern==3 || areaCfg.ipPattern==null}">selected</c:if>>IP</option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].ipPattern"></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_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].srcIp" class="form-control required ipCheck" type="text" value="${areaCfg.srcIp}">
|
||||
<input name="areaCfg[${status.index}].srcIpAddress" class="form-control required ipCheck" type="text" value="${areaCfg.srcIpAddress}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].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">
|
||||
<input name="areaCfg[${status.index}].srcIpMask" class="form-control required ipMask" type="text" value="${areaCfg.srcIpMask}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].srcIpMask"></div>
|
||||
<div for="areaCfg[${status.index}].srcIpAddress"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].srcPort" class="form-control required" type="text" value="${areaCfg.srcPort}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].srcPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row hidden" >
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].srcPortMask" class="form-control required" type="text" value="${areaCfg.srcPortMask}">
|
||||
<select name="areaCfg[${status.index}].portPattern" class="selectpicker show-tick form-control required">
|
||||
<option value="1" <c:if test="${areaCfg.portPattern==1}">selected</c:if> ><spring:message code="port"/></option>
|
||||
<option value="2" <c:if test="${areaCfg.portPattern==2}">selected</c:if>><spring:message code="port_mask"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].srcPortMask"></div>
|
||||
<div for="areaCfg[${status.index}].portPattern"></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"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].srcPort" class="form-control required checkPort" type="text" value="${areaCfg.srcPort}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].srcPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].dstIp" class="form-control required ipCheck" type="text" value="${areaCfg.dstIp}">
|
||||
<input name="areaCfg[${status.index}].destIpAddress" class="form-control required ipCheck" type="text" value="${areaCfg.destIpAddress}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].dstIp"></div>
|
||||
<div for="areaCfg[${status.index}].destIpAddress"></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">
|
||||
<input name="areaCfg[${status.index}].dstIpMask" class="form-control required ipMask" type="text" value="${areaCfg.dstIpMask}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].dstIpMask"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].dstPort" class="form-control required" type="text" value="${areaCfg.dstPort}">
|
||||
<input name="areaCfg[${status.index}].destPort" class="form-control required portCheck" type="text" value="${areaCfg.destPort}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].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">
|
||||
<input name="areaCfg[${status.index}].dstPortMask" class="form-control required" type="text" value="${areaCfg.dstPortMask}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].dstPortMask"></div>
|
||||
<div for="areaCfg[${status.index}].destPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row hidden" >
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||
@@ -466,9 +369,9 @@ function delAreaIsp(obj){
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="areaCfg[${status.index}].direction" class="selectpicker show-tick form-control required" >
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${areaCfg.direction==0}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${areaCfg.direction==1}">selected</c:if>><spring:message code="oneway"/></option>
|
||||
<option value="0" <c:if test="${areaCfg.direction==0 || areaCfg.direction==null}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${areaCfg.direction==1 }">selected</c:if>><spring:message code="ingress"/></option>
|
||||
<option value="2" <c:if test="${areaCfg.direction==2 }">selected</c:if>><spring:message code="degress"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].direction"></div>
|
||||
|
||||
151
src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp
Normal file
151
src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp
Normal file
@@ -0,0 +1,151 @@
|
||||
<%@ 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(){
|
||||
areaControlInit();
|
||||
$("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");
|
||||
}
|
||||
});
|
||||
$("select[name$='ipType']").on("change",function(){
|
||||
switchIpType($(this));
|
||||
});
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
if(val==0){
|
||||
$("#areaIp").removeClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}else{
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change",function(){
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#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/saveContIp" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<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 }" 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/contIp/contIpList.jsp
Normal file
410
src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.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="avContentIp:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/ntc/av/contentIpForm?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/contentIpList?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="avContIp:config">
|
||||
<sys:delRow url="${ctx}/ntc/av/contentIpForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/av/updateAvContIpValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="avContentIp: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/auditAvContIp?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/av/auditAvContIp?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/av/auditAvContIp?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 a.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||
<%-- <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>
|
||||
@@ -11,44 +11,14 @@ border:1px solid #eeeeee
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
areaControlInit();
|
||||
$("input[name='isAreaEffective']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if(val==1){
|
||||
$(".areaType").removeClass("hidden");
|
||||
if($("input[name='areaType']:checked").val()==1){//areaISP
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
}else if($("input[name='areaType']:checked").val()==0){//areaIp
|
||||
$("#areaIp").removeClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$(".areaType").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
if(val==0){
|
||||
$("#areaIp").removeClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}else{
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change",function(){
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
$("#serviceId").val($(".action").attr("serviceId"));
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
@@ -60,6 +30,13 @@ $(function(){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
//代表所有区域都隐藏了,提示必须增加个区域信息
|
||||
if($("input[name='isAreaEffective']:checked").val()==1 && $(".container-fluid:visible").size()==0){
|
||||
if($("#areaIsp").hasClass("hidden")) $("#areaIp").find(".glyphicon-plus").click();
|
||||
if($("#areaIp").hasClass("hidden")) $("#areaIsp").find(".glyphicon-plus").click();
|
||||
top.$.jBox.tip("<spring:message code='one_more_area'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
@@ -67,10 +44,6 @@ $(function(){
|
||||
$(".action").on("change",function(){
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
//业务内容增加
|
||||
/* $("span[title='add']").on("click",function(){
|
||||
$(".voipIp0").removeClass("hidden");
|
||||
}); */
|
||||
$(".disabled").each(function(){
|
||||
$(this).find("input,select,div,button").each(function(){
|
||||
$(this).attr("disabled","true");
|
||||
@@ -211,9 +184,10 @@ var delContent=function(contentClassName,addBtnClassName){
|
||||
<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">
|
||||
<select name="voipIps[${status.index }].ipType" class="selectpicker show-tick form-control required">
|
||||
<option value="4" <c:if test="${voipIp.ipType==4 || voipIp.ipType==null }">selected</c:if> >V4</option>
|
||||
<option value="6" <c:if test="${voipIp.ipType==6}">selected</c:if>>V6</option>
|
||||
<select name="voipIps[${status.index }].ipType" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipType">
|
||||
<option value="${ipType.itemCode}" <c:if test="${voipIp.ipType==ipType.itemCode}">selected</c:if> >${ipType.itemValue}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="voipIps[${status.index }].ipType"></div>
|
||||
@@ -380,23 +354,6 @@ var delContent=function(contentClassName,addBtnClassName){
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="district"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="voipAccounts[${status.index }].district" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${regionList}" var="regionDistrict">
|
||||
<c:if test="${_cfg.functionId eq regionDistrict.functionId && regionDistrict.configRegionCode ==2}">
|
||||
<c:forEach items="${fn:split(regionDistrict.configDistrict,',')}" var="_district">
|
||||
<option value="${_district }" <c:if test="${voipAccount.district==_district || voipAccount.district==null}">selected</c:if> >${_district }</option>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="voipAccounts[${status.index }].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>
|
||||
@@ -406,7 +363,20 @@ var delContent=function(contentClassName,addBtnClassName){
|
||||
<div for="voipAccounts[${status.index }].cfgKeywords"></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">
|
||||
<select name="voipAccounts[${status.index }].isHexbin" class="selectpicker select2 form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${voipAccount.isHexbin==0 || voipAccount.isHexbin==null}">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${voipAccount.isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${voipAccount.isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="voipAccounts[${status.index }].isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@@ -443,29 +413,13 @@ var delContent=function(contentClassName,addBtnClassName){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="voipAccounts[${status.index }].isHexbin" class="selectpicker select2 form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${voipAccount.isHexbin==0 || voipAccount.isHexbin==null}">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${voipAccount.isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${voipAccount.isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="voipAccounts[${status.index }].isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:forEach>
|
||||
<!--account info-->
|
||||
<br>
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
<input type="hidden" name="isAreaEffective" value="0">
|
||||
<%--<br>--%>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<br>
|
||||
<!-- <input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0"> -->
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
$("#intype").val("${cfg.voipIp.srcPort}");
|
||||
}else if("${cfg.voipAccount.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.voipAccount.cfgKeywords}");
|
||||
}else if("${cfg.voipAccount.district}"){
|
||||
$("#intype").val("${cfg.voipAccount.district}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
@@ -241,14 +239,6 @@
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='district'/>:</label>";
|
||||
html+="<label>"
|
||||
html+=item.district;
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='expression_type'/>:</label>";
|
||||
html+="<label>"
|
||||
if(item.exprType==1){
|
||||
@@ -260,8 +250,6 @@
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='row'>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='match_method'/>:</label>";
|
||||
@@ -281,6 +269,8 @@
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='row'>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='whether_hexbinary'/>:</label>";
|
||||
@@ -304,6 +294,13 @@
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label></label>";
|
||||
html+="<label>"
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
/* if(index < (data.ip.length-1) && index != 0){
|
||||
alert("下一行");
|
||||
@@ -406,7 +403,6 @@
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="av_voip_control"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
@@ -447,7 +443,6 @@
|
||||
<form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option>
|
||||
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option>
|
||||
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option>
|
||||
<form:option value="voipAccount.district"><spring:message code="strong_string"/></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -20,6 +20,95 @@ $(function(){
|
||||
$("select[name$='portPattern']").on("change",function(){
|
||||
switchIpInfo(this);
|
||||
});
|
||||
$(".glyphicon-plus").on("click",function(){
|
||||
var obj=$(this).parents(".form-section").next(".container-fluid").clone();
|
||||
var len=$(this).parents("div").find(".container-fluid:visible").size();
|
||||
if($(this).parent().parent().parent().attr("id")=="areaIp"){
|
||||
obj.find("[id^='_areaCfg']").each(function(){
|
||||
var name=$(this).attr("id").replace("_areaCfg.","");
|
||||
$(this).removeAttr("id");
|
||||
$(this).attr("name","areaCfg["+len+"]."+name);
|
||||
$(this).parents(".form-group").find("div[for^='_areaCfg']").attr("for","areaCfg["+len+"]."+name);
|
||||
$(this).selectpicker("refresh");
|
||||
});
|
||||
obj.removeClass("hidden");
|
||||
switchIpInfo(obj.find("select[name$='ipType']"),"ipType");
|
||||
obj.find("select[name$='ipType']").on("change",function(){
|
||||
switchIpInfo($(this),"ipType");
|
||||
});
|
||||
obj.find("select[name$='ipPattern']").on("change",function(){
|
||||
switchIpInfo($(this),"ipPattern");
|
||||
});
|
||||
obj.appendTo("#areaIp");
|
||||
$("#areaIsp").find(".container-fluid").each(function(){
|
||||
if(!$(this).hasClass("hidden")) $(this).remove();
|
||||
});
|
||||
}else if($(this).parent().parent().parent().attr("id")=="areaIsp"){
|
||||
obj.find("[name^='areaCode']").each(function(){
|
||||
$(this).attr("name","areaIsp["+len+"].area");
|
||||
$(this).parents(".form-group").find("div[for^='areaCode']").attr("for","areaIsp["+len+"].area");
|
||||
$(this).selectpicker("refresh");
|
||||
});
|
||||
obj.find("[name^='ispCode']").each(function(){
|
||||
$(this).attr("name","areaIsp["+len+"].isp");
|
||||
$(this).selectpicker("refresh");
|
||||
});
|
||||
obj.removeClass("hidden");
|
||||
obj.appendTo("#areaIsp");
|
||||
$("#areaIp").find(".container-fluid").each(function(){
|
||||
if(!$(this).hasClass("hidden")) $(this).remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
if(val==0){
|
||||
$("#areaIp").removeClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
if($("#areaIp").find(".container-fluid:visible").size() <1){
|
||||
$("#areaIp").find(".glyphicon-plus").click();
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
if($("#areaIsp").find(".container-fluid:visible").size() <1){
|
||||
$("#areaIsp").find(".glyphicon-plus").click();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("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");
|
||||
if($("#areaIsp").find(".container-fluid:visible").size() <1){
|
||||
$("#areaIsp").find(".glyphicon-plus").click();
|
||||
}
|
||||
}else if($("input[name='areaType']:checked").val()==0){//areaIp
|
||||
$("#areaIp").removeClass("hidden");
|
||||
if($("#areaIp").find(".container-fluid:visible").size() <1){
|
||||
$("#areaIp").find(".glyphicon-plus").click();
|
||||
}
|
||||
}else{
|
||||
$(".areaType").find("[value='1']").prop("checked",true);
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
if($("#areaIsp").find(".container-fluid:visible").size() <1){
|
||||
$("#areaIsp").find(".glyphicon-plus").click();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$(".areaType").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
areaControlInit();
|
||||
});
|
||||
var switchIpType=function(obj){
|
||||
var type=$(obj).val();
|
||||
@@ -73,12 +162,10 @@ var switchIpInfo=function(obj,type){
|
||||
var ipPattern="";
|
||||
var portPattern="";
|
||||
|
||||
var row=$(obj).parents('.row').parents('.row');
|
||||
|
||||
var row=$(obj).parents('.row').parent('.row');
|
||||
ipType=row.find("select[name$='ipType']").val();
|
||||
ipPattern=row.find("select[name$='ipPattern']").val();
|
||||
portPattern=row.find("select[name$='portPattern']").val();
|
||||
|
||||
var srcIp=row.find("input[name$='srcIpAddress']");
|
||||
var destIp=row.find("input[name$='destIpAddress']");
|
||||
var srcPort=row.find("input[name$='srcPort']");
|
||||
@@ -226,6 +313,7 @@ var areaControlInit=function(){
|
||||
}
|
||||
}else{
|
||||
$("input[name='areaEffectiveIds']").val("");
|
||||
$("input[name='isAreaEffective']").eq(1).prop("checked",true);
|
||||
}
|
||||
}
|
||||
//查询
|
||||
@@ -256,4 +344,43 @@ var more=function(obj){
|
||||
if(rows.size()==0){
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//删除区域IP
|
||||
function delAreaIp(obj){
|
||||
var thisObj=$(obj);
|
||||
thisObj.parents(".container-fluid").remove();
|
||||
var len=$("#areaIp").find(".container-fluid:visible").size();
|
||||
//调整角标
|
||||
if(len>0){
|
||||
len--;
|
||||
$("#areaIp").find(".container-fluid:visible").each(function(){
|
||||
$(this).find("[name^='areaCfg']").each(function(){
|
||||
var name=$(this).attr("name");
|
||||
name=name.substring(name.lastIndexOf(".")+1,name.length);
|
||||
$(this).attr("name","areaCfg["+len+"]."+name);
|
||||
$(this).parents(".form-group").find("div[for^='areaCfg']").attr("for","areaCfg["+len+"]."+name);
|
||||
});
|
||||
len--;
|
||||
});
|
||||
}
|
||||
}
|
||||
//删除区域ISP
|
||||
function delAreaIsp(obj){
|
||||
var thisObj=$(obj);
|
||||
thisObj.parents(".container-fluid").remove();
|
||||
var len=$("#areaIsp").find(".container-fluid:visible").size();
|
||||
if(len>0){
|
||||
len--;
|
||||
$("#areaIsp").find(".container-fluid:visible").each(function(){
|
||||
$(this).find("[name^='areaIsp']").each(function(){
|
||||
var name=$(this).attr("name");
|
||||
name=name.substring(name.lastIndexOf(".")+1,name.length);
|
||||
$(this).attr("name","areaIsp["+len+"]."+name);
|
||||
$(this).parents(".form-group").find("div[for^='areaIsp']").attr("for","areaIsp["+len+"]."+name);
|
||||
});
|
||||
len--;
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user