voip 新增功能
voip新增界面优化
This commit is contained in:
@@ -18,7 +18,6 @@ import com.nis.domain.Page;
|
|||||||
import com.nis.domain.configuration.AvVoipAccountCfg;
|
import com.nis.domain.configuration.AvVoipAccountCfg;
|
||||||
import com.nis.domain.configuration.CfgIndexInfo;
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
import com.nis.domain.configuration.AvVoipIpCfg;
|
import com.nis.domain.configuration.AvVoipIpCfg;
|
||||||
|
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.controller.BaseController;
|
import com.nis.web.controller.BaseController;
|
||||||
|
|
||||||
@@ -34,23 +33,39 @@ public class AvContentController extends BaseController {
|
|||||||
|
|
||||||
//音视频VOIP配置新增界面
|
//音视频VOIP配置新增界面
|
||||||
@RequestMapping(value = {"/voipForm"})
|
@RequestMapping(value = {"/voipForm"})
|
||||||
public String voipFrom(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity){
|
public String voipFrom(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")CfgIndexInfo cfg){
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(ids)){
|
||||||
entity.setCfgId(Long.parseLong(ids));
|
cfg.setCompileId(Integer.parseInt(ids));
|
||||||
entity = avContentCfgService.getCfgIndexInfo(entity);
|
cfg = avContentCfgService.getCfgIndexInfo(cfg);
|
||||||
}else{
|
}else{
|
||||||
List<AvVoipAccountCfg> avVoipAccountCfgs=new ArrayList<AvVoipAccountCfg>();
|
List<AvVoipAccountCfg> avVoipAccountCfgs=new ArrayList<AvVoipAccountCfg>();
|
||||||
avVoipAccountCfgs.add(new AvVoipAccountCfg());
|
avVoipAccountCfgs.add(new AvVoipAccountCfg());
|
||||||
entity.setVoipAccounts(avVoipAccountCfgs);
|
cfg.setVoipAccounts(avVoipAccountCfgs);
|
||||||
List<AvVoipIpCfg> avVoipIpCfgs=new ArrayList<AvVoipIpCfg>();
|
List<AvVoipIpCfg> avVoipIpCfgs=new ArrayList<AvVoipIpCfg>();
|
||||||
avVoipIpCfgs.add(new AvVoipIpCfg());
|
avVoipIpCfgs.add(new AvVoipIpCfg());
|
||||||
entity.setVoipIps(avVoipIpCfgs);
|
cfg.setVoipIps(avVoipIpCfgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
initFormCondition(model,entity);
|
initFormCondition(model,cfg);
|
||||||
model.addAttribute("_cfg", entity);
|
model.addAttribute("_cfg", cfg);
|
||||||
return "/cfg/av/voip/voipForm";
|
return "/cfg/av/voip/voipForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//保存voip信息
|
||||||
|
@RequestMapping(value = {"/saveVoip"})
|
||||||
|
public String saveVoip(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg){
|
||||||
|
try{
|
||||||
|
avContentCfgService.saveOrUpdateAvVoip(cfg);
|
||||||
|
}catch(Exception e){
|
||||||
|
logger.error("voip信息保存失败",e);
|
||||||
|
e.printStackTrace();
|
||||||
|
addMessage(model,"save_voip_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+cfg.getFunctionId();
|
||||||
|
}
|
||||||
|
|
||||||
//视频文本VOIP配置列表
|
//视频文本VOIP配置列表
|
||||||
@RequestMapping(value = {"/voipList"})
|
@RequestMapping(value = {"/voipList"})
|
||||||
public String voipCfgList(@ModelAttribute("cfg")CfgIndexInfo entity,Model model,HttpServletRequest request,HttpServletResponse response){
|
public String voipCfgList(@ModelAttribute("cfg")CfgIndexInfo entity,Model model,HttpServletRequest request,HttpServletResponse response){
|
||||||
|
|||||||
@@ -21,4 +21,7 @@ public interface AvContentCfgDao extends CrudDao<BaseIpCfg>{
|
|||||||
public List<AvVoipIpCfg> findVoipIpCfgList(@Param("cfg")CfgIndexInfo entity);
|
public List<AvVoipIpCfg> findVoipIpCfgList(@Param("cfg")CfgIndexInfo entity);
|
||||||
public List<AvVoipAccountCfg> findVoipAccountCfgList(@Param("cfg")CfgIndexInfo entity);
|
public List<AvVoipAccountCfg> findVoipAccountCfgList(@Param("cfg")CfgIndexInfo entity);
|
||||||
public CfgIndexInfo getCfgIndexInfo(@Param("cfg")CfgIndexInfo entity);
|
public CfgIndexInfo getCfgIndexInfo(@Param("cfg")CfgIndexInfo entity);
|
||||||
|
public void insertCfgIndexInfo(@Param("cfg")CfgIndexInfo entity);
|
||||||
|
public void insertAvVoipIp(@Param("cfg")CfgIndexInfo entity);
|
||||||
|
public void insertAvVoipAccount(@Param("cfg")CfgIndexInfo entity);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,6 +109,7 @@
|
|||||||
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||||
</sql>
|
</sql>
|
||||||
|
<!-- 条件查询列表信息 -->
|
||||||
<select id="findVoipList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
<select id="findVoipList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="AvVoip_Column" />
|
<include refid="AvVoip_Column" />
|
||||||
@@ -238,7 +239,8 @@
|
|||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
</select>
|
</select>
|
||||||
<select id="findVoipIpCfgList" resultMap="AvVoipIpCfgMap">
|
<!-- 根据compileId获取avVoipIpCfg信息 -->
|
||||||
|
<select id="findVoipIpCfgList" resultMap="AvVoipIpCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||||
select
|
select
|
||||||
<include refid="AvVoipIp_Column" />
|
<include refid="AvVoipIp_Column" />
|
||||||
from av_voip_ip_cfg a
|
from av_voip_ip_cfg a
|
||||||
@@ -248,9 +250,8 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<!-- 根据compileId获取avVoipAccountCfg信息 -->
|
||||||
|
<select id="findVoipAccountCfgList" resultMap="AvVoipAccountCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||||
<select id="findVoipAccountCfgList" resultMap="AvVoipAccountCfgMap">
|
|
||||||
select
|
select
|
||||||
<include refid="AvVoipAccount_Column" />
|
<include refid="AvVoipAccount_Column" />
|
||||||
from av_voip_account_cfg a
|
from av_voip_account_cfg a
|
||||||
@@ -261,6 +262,7 @@
|
|||||||
</where>
|
</where>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<!-- 根据Id获取cfgIndexInfo信息 -->
|
||||||
<select id="getCfgIndexInfo" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
<select id="getCfgIndexInfo" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||||
SELECT
|
SELECT
|
||||||
*
|
*
|
||||||
@@ -269,10 +271,188 @@
|
|||||||
<if test="cfg.cfgId != null">
|
<if test="cfg.cfgId != null">
|
||||||
and a.CFG_ID=#{cfg.cfgId,jdbcType=INTEGER}
|
and a.CFG_ID=#{cfg.cfgId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<!-- <if test="cfg.compileId != null">
|
<if test="cfg.compileId != null">
|
||||||
and a.compileId=#{cfg.compileId,jdbcType=INTEGER}
|
and a.compile_Id=#{cfg.compileId,jdbcType=INTEGER}
|
||||||
</if> -->
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<!-- insert cfgIndexInfox -->
|
||||||
|
<insert id="insertCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||||
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into cfg_index_info(
|
||||||
|
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
|
||||||
|
)values (
|
||||||
|
#{cfg.cfgDesc,jdbcType=VARCHAR},
|
||||||
|
#{cfg.action,jdbcType=INTEGER},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{cfg.creatorId,jdbcType=INTEGER},
|
||||||
|
#{cfg.createTime,jdbcType=TIMESTAMP},
|
||||||
|
#{cfg.editorId,jdbcType=INTEGER},
|
||||||
|
#{cfg.editTime,jdbcType=TIMESTAMP},
|
||||||
|
#{cfg.auditorId,jdbcType=INTEGER},
|
||||||
|
#{cfg.auditTime,jdbcType=TIMESTAMP},
|
||||||
|
#{cfg.serviceId,jdbcType=INTEGER},
|
||||||
|
#{cfg.requestId,jdbcType=INTEGER},
|
||||||
|
#{cfg.compileId,jdbcType=INTEGER},
|
||||||
|
#{cfg.isAreaEffective,jdbcType=INTEGER},
|
||||||
|
#{cfg.classify,jdbcType=VARCHAR},
|
||||||
|
#{cfg.attribute,jdbcType=VARCHAR},
|
||||||
|
#{cfg.lable,jdbcType=VARCHAR},
|
||||||
|
#{cfg.areaEffectiveIds,jdbcType=VARCHAR},
|
||||||
|
#{cfg.functionId,jdbcType=INTEGER}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<!-- insert AV_VOIP_IP_CFG表信息 -->
|
||||||
|
<insert id="insertAvVoipIp" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||||
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into av_voip_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 (
|
||||||
|
#{cfg.cfgDesc,jdbcType=VARCHAR},
|
||||||
|
#{cfg.action,jdbcType=INTEGER},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{cfg.creatorId,jdbcType=INTEGER},
|
||||||
|
#{cfg.createTime,jdbcType=TIMESTAMP},
|
||||||
|
#{cfg.editorId,jdbcType=INTEGER},
|
||||||
|
#{cfg.editTime,jdbcType=TIMESTAMP},
|
||||||
|
#{cfg.auditorId,jdbcType=INTEGER},
|
||||||
|
#{cfg.auditTime,jdbcType=TIMESTAMP},
|
||||||
|
#{cfg.serviceId,jdbcType=INTEGER},
|
||||||
|
#{cfg.requestId,jdbcType=INTEGER},
|
||||||
|
#{cfg.compileId,jdbcType=INTEGER},
|
||||||
|
#{cfg.isAreaEffective,jdbcType=INTEGER},
|
||||||
|
#{cfg.classify,jdbcType=VARCHAR},
|
||||||
|
#{cfg.attribute,jdbcType=VARCHAR},
|
||||||
|
#{cfg.lable,jdbcType=VARCHAR},
|
||||||
|
#{cfg.areaEffectiveIds,jdbcType=VARCHAR},
|
||||||
|
#{cfg.functionId,jdbcType=INTEGER},
|
||||||
|
#{cfg.voipIp.ipType,jdbcType=INTEGER},
|
||||||
|
#{cfg.voipIp.srcIpAddress,jdbcType=VARCHAR},
|
||||||
|
#{cfg.voipIp.ipPattern,jdbcType=INTEGER},
|
||||||
|
#{cfg.voipIp.portPattern,jdbcType=INTEGER},
|
||||||
|
#{cfg.voipIp.srcPort,jdbcType=VARCHAR},
|
||||||
|
#{cfg.voipIp.protocol,jdbcType=INTEGER},
|
||||||
|
#{cfg.voipIp.protocolId,jdbcType=INTEGER},
|
||||||
|
#{cfg.voipIp.direction,jdbcType=INTEGER},
|
||||||
|
#{cfg.voipIp.destPort,jdbcType=VARCHAR},
|
||||||
|
#{cfg.voipIp.destIpAddress,jdbcType=VARCHAR},
|
||||||
|
#{cfg.voipIp.cfgType,jdbcType=VARCHAR},
|
||||||
|
#{cfg.voipIp.cfgRegionCode,jdbcType=INTEGER}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<!-- insert AV_VOIP_ACCOUNT_CFG表信息 -->
|
||||||
|
<insert id="insertAvVoipAccount" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||||
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into av_voip_account_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,
|
||||||
|
district,
|
||||||
|
cfg_keywords,
|
||||||
|
cfg_type,
|
||||||
|
cfg_region_code,
|
||||||
|
expr_type,
|
||||||
|
match_method,
|
||||||
|
is_hexbin
|
||||||
|
)values (
|
||||||
|
#{cfg.cfgDesc,jdbcType=VARCHAR},
|
||||||
|
#{cfg.action,jdbcType=INTEGER},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{cfg.creatorId,jdbcType=INTEGER},
|
||||||
|
#{cfg.createTime,jdbcType=TIMESTAMP},
|
||||||
|
#{cfg.editorId,jdbcType=INTEGER},
|
||||||
|
#{cfg.editTime,jdbcType=TIMESTAMP},
|
||||||
|
#{cfg.auditorId,jdbcType=INTEGER},
|
||||||
|
#{cfg.auditTime,jdbcType=TIMESTAMP},
|
||||||
|
#{cfg.serviceId,jdbcType=INTEGER},
|
||||||
|
#{cfg.requestId,jdbcType=INTEGER},
|
||||||
|
#{cfg.compileId,jdbcType=INTEGER},
|
||||||
|
#{cfg.isAreaEffective,jdbcType=INTEGER},
|
||||||
|
#{cfg.classify,jdbcType=VARCHAR},
|
||||||
|
#{cfg.attribute,jdbcType=VARCHAR},
|
||||||
|
#{cfg.lable,jdbcType=VARCHAR},
|
||||||
|
#{cfg.areaEffectiveIds,jdbcType=VARCHAR},
|
||||||
|
#{cfg.functionId,jdbcType=INTEGER},
|
||||||
|
#{cfg.voipAccount.district,jdbcType=VARCHAR},
|
||||||
|
#{cfg.voipAccount.cfgKeywords,jdbcType=VARCHAR},
|
||||||
|
#{cfg.voipAccount.cfgType,jdbcType=VARCHAR},
|
||||||
|
#{cfg.voipAccount.cfgRegionCode,jdbcType=INTEGER},
|
||||||
|
#{cfg.voipAccount.exprType,jdbcType=INTEGER},
|
||||||
|
#{cfg.voipAccount.matchMethod,jdbcType=INTEGER},
|
||||||
|
#{cfg.voipAccount.isHexbin,jdbcType=INTEGER}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -73,7 +73,7 @@ public class AvCfgService extends BaseService{
|
|||||||
//调用服务接口获取compileId
|
//调用服务接口获取compileId
|
||||||
String result = "";
|
String result = "";
|
||||||
try {
|
try {
|
||||||
result = ConfigServiceUtil.getId(1,1);
|
result ="1";// ConfigServiceUtil.getId(1,1);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.info("获取编译ID出错");
|
logger.info("获取编译ID出错");
|
||||||
@@ -101,7 +101,7 @@ public class AvCfgService extends BaseService{
|
|||||||
//调用服务接口获取compileId
|
//调用服务接口获取compileId
|
||||||
String result = "";
|
String result = "";
|
||||||
try {
|
try {
|
||||||
result = ConfigServiceUtil.getId(1,1);
|
result ="1";// ConfigServiceUtil.getId(1,1);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.info("获取编译ID出错");
|
logger.info("获取编译ID出错");
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
@@ -78,8 +79,11 @@ public class AvContentCfgService extends BaseService{
|
|||||||
*/
|
*/
|
||||||
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity) {
|
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity) {
|
||||||
CfgIndexInfo cfg=avContentCfgDao.getCfgIndexInfo(entity);
|
CfgIndexInfo cfg=avContentCfgDao.getCfgIndexInfo(entity);
|
||||||
cfg.setVoipAccounts(getVoipAccountCfgList(entity));
|
List<AvVoipAccountCfg> voipAccounts=getVoipAccountCfgList(entity);
|
||||||
cfg.setVoipIps(getVoipIpCfgList(entity));
|
List<AvVoipIpCfg> voipIps=getVoipIpCfgList(entity);
|
||||||
|
getVoipIpCfgList(entity);
|
||||||
|
cfg.setVoipAccounts(voipAccounts);
|
||||||
|
cfg.setVoipIps(voipIps);
|
||||||
|
|
||||||
return cfg;
|
return cfg;
|
||||||
}
|
}
|
||||||
@@ -142,4 +146,54 @@ public class AvContentCfgService extends BaseService{
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
|
public void saveOrUpdateAvVoip(CfgIndexInfo entity){
|
||||||
|
Date createTime=new Date();
|
||||||
|
//新增
|
||||||
|
if(entity.getCfgId()==null){
|
||||||
|
entity.setCreatorId(UserUtils.getUser().getId());
|
||||||
|
entity.setCreateTime(createTime);
|
||||||
|
//调用服务接口获取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));
|
||||||
|
//保存avVoipIp
|
||||||
|
if(entity.getVoipIps() != null && entity.getVoipIps().size() > 0){
|
||||||
|
for (AvVoipIpCfg voipIp : entity.getVoipIps()) {
|
||||||
|
entity.setVoipIp(voipIp);
|
||||||
|
avContentCfgDao.insertAvVoipIp(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//保存avVoipAccount
|
||||||
|
if(entity.getVoipAccounts() != null && entity.getVoipAccounts().size() > 0){
|
||||||
|
for (AvVoipAccountCfg voipAccount : entity.getVoipAccounts()) {
|
||||||
|
entity.setVoipAccount(voipAccount);
|
||||||
|
avContentCfgDao.insertAvVoipAccount(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//保存cfgIndexInfo
|
||||||
|
avContentCfgDao.insertCfgIndexInfo(entity);
|
||||||
|
}else{
|
||||||
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改
|
||||||
|
}else{
|
||||||
|
//entity.setEditorId(UserUtils.getUser().getId());
|
||||||
|
//entity.setEditTime(new Date());
|
||||||
|
//entity.setIsValid(0);
|
||||||
|
//entity.setIsAudit(0);
|
||||||
|
//avCfgDao.updateAvFileSample(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,12 +124,12 @@ public class MaatCfgConverTest {
|
|||||||
List<ComplexkeywordCfg> list2 = new ArrayList();
|
List<ComplexkeywordCfg> list2 = new ArrayList();
|
||||||
complex.setAction(1);
|
complex.setAction(1);
|
||||||
complex.setDistrict("UA");
|
complex.setDistrict("UA");
|
||||||
complex.setKeywords("测试1");
|
complex.setCfgKeywords("测试1");
|
||||||
list2.add(complex);
|
list2.add(complex);
|
||||||
str = new BaseStringCfg();
|
str = new BaseStringCfg();
|
||||||
complex.setAction(1);
|
complex.setAction(1);
|
||||||
complex.setDistrict("cookie");
|
complex.setDistrict("cookie");
|
||||||
complex.setKeywords("测试2");
|
complex.setCfgKeywords("测试2");
|
||||||
list2.add(complex);
|
list2.add(complex);
|
||||||
if(list2.size()>0){
|
if(list2.size()>0){
|
||||||
groupId++;
|
groupId++;
|
||||||
|
|||||||
@@ -560,3 +560,6 @@ av_voip_ip_title=VoIP IP
|
|||||||
av_voip_account_title=VoIP\u8D26\u53F7
|
av_voip_account_title=VoIP\u8D26\u53F7
|
||||||
ip_pattern=IP \u683C\u5F0F
|
ip_pattern=IP \u683C\u5F0F
|
||||||
port_pattern=\u7AEF\u53E3\u683C\u5F0F
|
port_pattern=\u7AEF\u53E3\u683C\u5F0F
|
||||||
|
port_mask=port Mask
|
||||||
|
ip_range=IP Range
|
||||||
|
ip_subnet=Subnet
|
||||||
@@ -54,6 +54,7 @@ $(function(){
|
|||||||
$(".action").on("change",function(){
|
$(".action").on("change",function(){
|
||||||
$("#serviceId").val($(this).attr("serviceId"));
|
$("#serviceId").val($(this).attr("serviceId"));
|
||||||
});
|
});
|
||||||
|
$("#serviceId").val($(".action").attr("serviceId"));
|
||||||
$("#cfgFrom").validate({
|
$("#cfgFrom").validate({
|
||||||
errorPlacement: function(error,element){
|
errorPlacement: function(error,element){
|
||||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||||
@@ -68,19 +69,23 @@ $(function(){
|
|||||||
$("span[title='add']").on("click",function(){
|
$("span[title='add']").on("click",function(){
|
||||||
$(".voipIp0").removeClass("hidden");
|
$(".voipIp0").removeClass("hidden");
|
||||||
});
|
});
|
||||||
|
$(".action").on("change",function(){
|
||||||
|
$("#serviceId").val($(this).attr("serviceId"));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//业务窗口打开
|
//业务窗口打开
|
||||||
var addContent=function(obj,contentClassName){
|
var addContent=function(obj,contentClassName){
|
||||||
$("."+contentClassName+"0").removeClass("hidden").removeClass("disabled");
|
$("."+contentClassName+"0").removeClass("hidden").removeClass("disabled");
|
||||||
|
$("."+contentClassName).find("input,select").attr("disabled","");
|
||||||
$(obj).addClass("hidden");
|
$(obj).addClass("hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
//业务窗口关闭
|
//业务窗口关闭
|
||||||
var delContent=function(contentClassName,addBtnClassName){
|
var delContent=function(contentClassName,addBtnClassName){
|
||||||
$("."+contentClassName).addClass("hidden").addClass("disabled");;
|
$("."+contentClassName).addClass("hidden");
|
||||||
|
$("."+contentClassName).find("input,select").attr("disabled","true");
|
||||||
$("."+addBtnClassName).removeClass("hidden");
|
$("."+addBtnClassName).removeClass("hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,10 +95,6 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
|
||||||
<%-- <h3 class="page-title">
|
|
||||||
<spring:message code="${add}"></spring:message>
|
|
||||||
</h3> --%>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="portlet box blue">
|
<div class="portlet box blue">
|
||||||
@@ -106,52 +107,55 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
</div>
|
</div>
|
||||||
<div class="portlet-body form">
|
<div class="portlet-body form">
|
||||||
<!-- BEGIN FORM-->
|
<!-- BEGIN FORM-->
|
||||||
<form id="cfgFrom" action="${ctx}/ntc/av/voip/saveVoip" method="post" class="form-horizontal">
|
<form id="cfgFrom" action="${ctx}/ntc/av/saveVoip" method="post" class="form-horizontal">
|
||||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<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">
|
<div class="form-body">
|
||||||
|
<!-- desc and action -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><spring:message code="action"/></label>
|
<label class="control-label col-md-3"><spring:message code="action"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<c:forEach items="${serviceList}" var="service" varStatus="satus">
|
<c:forEach items="${serviceList}" var="service" varStatus="satus">
|
||||||
<label class="radio-inline">
|
<label class="radio-inline">
|
||||||
<c:if test="${_cfg.functionId eq service.functionId}">
|
<c:if test="${_cfg.functionId eq service.functionId}">
|
||||||
<input type="radio" name="action" serviceId="${service.serviceId }" value="${service.action }" class="required action"
|
<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>
|
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>
|
||||||
>
|
>
|
||||||
<spring:message code="${service.actionCode }"/>
|
<spring:message code="${service.actionCode }"/>
|
||||||
</c:if>
|
</c:if>
|
||||||
</label>
|
</label>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</div>
|
</div>
|
||||||
<div for="action"></div>
|
<div for="action"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- desc and action -->
|
||||||
|
|
||||||
<!--/ip info-->
|
<!--/ip info-->
|
||||||
<h4 class="form-section"> <spring:message code="ac_voip_ip_title"/><small> <span class="glyphicon glyphicon-plus hidden voipIpAdd" onClick="addContent(this,'voipIp')" title="add"></span></small></h4>
|
<h4 class="form-section"> <spring:message code="av_voip_ip_title"/><small> <span class="glyphicon glyphicon-plus hidden voipIpAdd" onClick="addContent(this,'voipIp')" title="add"></span></small></h4>
|
||||||
<c:forEach items="${_cfg.voipIps}" var="voipIp" varStatus="status">
|
<c:forEach items="${_cfg.voipIps}" var="voipIp" varStatus="status">
|
||||||
<div class="row boxSolid voipIp${status.index }">
|
<div class="row boxSolid voipIp${status.index }">
|
||||||
|
<input type="hidden" name="voipIps[${status.index }].cfgId" value="${voipIp.cfgId}">
|
||||||
|
<!-- 配置域类型 -->
|
||||||
|
<c:forEach items="${regionList}" var="region">
|
||||||
|
<c:if test="${_cfg.functionId eq region.functionId && region.configRegionCode==1}">
|
||||||
|
<input type="hidden" name="voipIps[${status.index }].cfgType" value="${region.configRegionValue}">
|
||||||
|
<input type="hidden" name="voipIps[${status.index }].cfgRegionCode" value="${region.configRegionCode}">
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<span class="glyphicon glyphicon-remove pull-right" title="remove" onClick="delContent('voipIp${status.index }','voipIpAdd');"/>
|
<span class="glyphicon glyphicon-remove pull-right" title="remove" onClick="delContent('voipIp${status.index }','voipIpAdd');"/>
|
||||||
@@ -162,12 +166,12 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="_cfg.voipIps[${status.index }].ipType" class="selectpicker show-tick form-control required">
|
<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="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>
|
<option value="6" <c:if test="${voipIp.ipType==6}">selected</c:if>>V6</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div for="ipType"></div>
|
<div for="voipIps[${status.index }].ipType"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -176,110 +180,141 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="_cfg.voipIps[${status.index }].ipPattern" class="selectpicker show-tick form-control required">
|
<select name="voipIps[${status.index }].ipPattern" class="selectpicker show-tick form-control required">
|
||||||
<option value="1" <c:if test="${voipIp.ipPattern==1 || voipIp.ipPattern==null}">selected</c:if> ><spring:message code="subnet"/></option>
|
<option value="1" <c:if test="${voipIp.ipPattern==1}">selected</c:if> ><spring:message code="ip_subnet"/></option>
|
||||||
<option value="2" <c:if test="${voipIp.ipPattern==2}">selected</c:if>><spring:message code="ip_range"/></option>
|
<option value="2" <c:if test="${voipIp.ipPattern==2}">selected</c:if>><spring:message code="ip_range"/></option>
|
||||||
<option value="3" <c:if test="${voipIp.ipPattern==3}">selected</c:if>>IP</option>
|
<option value="3" <c:if test="${voipIp.ipPattern==3 || voipIp.ipPattern==null}">selected</c:if>>IP</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div for="ipPattern"></div>
|
<div for="voipIps[${status.index }].ipPattern"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group ">
|
<div class="form-group ">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input class="form-control required" type="text" name="_cfg.voipIps[${status.index }].srcIpAddress" value="${voipIp.srcIpAddress}">
|
<input class="form-control required" type="text" name="voipIps[${status.index }].srcIpAddress" value="${voipIp.srcIpAddress}">
|
||||||
</div>
|
</div>
|
||||||
<div for="srcIpAddress"></div>
|
<div for="voipIps[${status.index }].srcIpAddress"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row hidden disabled port">
|
<c:choose>
|
||||||
|
<c:when test="${voipIp.cfgId==null}">
|
||||||
|
<div class="row hidden disabled port">
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<div class="row port">
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="port_pattern"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="port_pattern"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="_cfg.voipIps[${status.index }].portPattern" class="selectpicker show-tick form-control required">
|
<select name="voipIps[${status.index }].portPattern" class="selectpicker show-tick form-control required">
|
||||||
<option value="1" <c:if test="${voipIp.portPattern==1 || voipIp.portPattern== null}">selected</c:if> >port</option>
|
<option value="1" <c:if test="${voipIp.portPattern==1 || voipIp.portPattern== null}">selected</c:if> >port</option>
|
||||||
<option value="2" <c:if test="${voipIp.portPattern==2}">selected</c:if>><spring:message code="port_range"/></option>
|
<option value="2" <c:if test="${voipIp.portPattern==2}">selected</c:if>><spring:message code="port_mask"/></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div for="portPattern"></div>
|
<div for="voipIps[${status.index }].portPattern"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group ">
|
<div class="form-group ">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input class="form-control required" type="text" name="_cfg.voipIps[${status.index }].srcPort" value="${voipIp.srcPort}">
|
<input class="form-control required" type="text" name="voipIps[${status.index }].srcPort" value="${voipIp.srcPort}">
|
||||||
</div>
|
</div>
|
||||||
<div for="srcPort"></div>
|
<div for="voipIps[${status.index }].srcPort"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row hidden disabled destIpPort">
|
<c:choose>
|
||||||
|
<c:when test="${voipIp.cfgId==null}">
|
||||||
|
<div class="row hidden disabled destIpPort">
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<div class="row destIpPort">
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input class="form-control required" type="text" name="_cfg.voipIps[${status.index }].destIpAddress" value="${voipIp.destIpAddress}">
|
<input class="form-control required" type="text" name="voipIps[${status.index }].destIpAddress" value="${voipIp.destIpAddress}">
|
||||||
</div>
|
</div>
|
||||||
<div for="destIpAddress"></div>
|
<div for="voipIps[${status.index }].destIpAddress"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group ">
|
<div class="form-group ">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input class="form-control required" type="text" name="_cfg.voipIps[${status.index }].destPort" value="${voipIp.destPort}">
|
<input class="form-control required" type="text" name="voipIps[${status.index }].destPort" value="${voipIp.destPort}">
|
||||||
</div>
|
</div>
|
||||||
<div for="destPort"></div>
|
<div for="voipIps[${status.index }].destPort"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row hidden disabled protocol">
|
<c:choose>
|
||||||
|
<c:when test="${voipIp.cfgId==null}">
|
||||||
|
<div class="row hidden disabled protocol">
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<div class="row protocol">
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group ">
|
<div class="form-group ">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="_cfg.voipIps[${status.index }].protocol" class="selectpicker show-tick form-control required">
|
<select name="voipIps[${status.index }].protocol" class="selectpicker show-tick form-control required">
|
||||||
<option value=""><spring:message code="select"/></option>
|
<option value=""><spring:message code="select"/></option>
|
||||||
<option value="6" <c:if test="${voipIp.protocol==6}">selected</c:if>>TCP</option>
|
<option value="6" <c:if test="${voipIp.protocol==6}">selected</c:if>>TCP</option>
|
||||||
<option value="17" <c:if test="${voipIp.protocol==17}">selected</c:if>>UDP</option>
|
<option value="17" <c:if test="${voipIp.protocol==17}">selected</c:if>>UDP</option>
|
||||||
<option value="0" <c:if test="${voipIp.protocol==0 || voipIp.protocol==null}">selected</c:if>><spring:message code="arbitrary"/></option>
|
<option value="0" <c:if test="${voipIp.protocol==0 || voipIp.protocol==null}">selected</c:if>><spring:message code="arbitrary"/></option>
|
||||||
</select>
|
</select>
|
||||||
<%-- <input class="form-control" type="text" name="protocol" value="${_cfg.protocol}"> --%>
|
<input type="hidden" name="voipIps[${status.index }].protocolId" value="0">
|
||||||
</div>
|
</div>
|
||||||
<div for="protocol"></div>
|
<div for="voipIps[${status.index }].protocol"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="_cfg.voipIps[${status.index }].direction" class="selectpicker show-tick form-control required" >
|
<select name="voipIps[${status.index }].direction" class="selectpicker show-tick form-control required" >
|
||||||
<option value=""><spring:message code="select"/></option>
|
<option value=""><spring:message code="select"/></option>
|
||||||
<option value="0" <c:if test="${voipIp.direction==0 || voipIp.direction==null}">selected</c:if>><spring:message code="twoway"/></option>
|
<option value="0" <c:if test="${voipIp.direction==0 || voipIp.direction==null}">selected</c:if>><spring:message code="twoway"/></option>
|
||||||
<option value="1" <c:if test="${voipIp.direction==1 }">selected</c:if>>源<spring:message code="ingress"/></option>
|
<option value="1" <c:if test="${voipIp.direction==1 }">selected</c:if>>源<spring:message code="ingress"/></option>
|
||||||
<option value="2" <c:if test="${voipIp.direction==2 }">selected</c:if>>目的<spring:message code="degress"/></option>
|
<option value="2" <c:if test="${voipIp.direction==2 }">selected</c:if>>目的<spring:message code="degress"/></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div for="direction"></div>
|
<div for="voipIps[${status.index }].direction"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<c:if test="${voipIp.cfgId==null}">
|
||||||
<button type="button" class="btn btn-red-hollow center-block" onClick="more(this);" data-click-times="0"><spring:message code="show_more"/></button>
|
<div class="row">
|
||||||
</div>
|
<button type="button" class="btn btn-red-hollow center-block" onClick="more(this);" data-click-times="0"><spring:message code="show_more"/></button>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
<!--/ip info-->
|
<!--/ip info-->
|
||||||
<!--account info-->
|
<!--account info-->
|
||||||
<h4 class="form-section"> <spring:message code="ac_voip_account_title"/><small> <span class="glyphicon glyphicon-plus hidden voipAccountAdd" onClick="addContent(this,'voipAccount')" title="add"></span></small></h4>
|
<h4 class="form-section"> <spring:message code="av_voip_account_title"/><small> <span class="glyphicon glyphicon-plus hidden voipAccountAdd" onClick="addContent(this,'voipAccount')" title="add"></span></small></h4>
|
||||||
<c:forEach items="${_cfg.voipAccounts}" var="voipAccount" varStatus="status">
|
<c:forEach items="${_cfg.voipAccounts}" var="voipAccount" varStatus="status">
|
||||||
<div class="row boxSolid voipAccount${status.index }">
|
<div class="row boxSolid voipAccount${status.index }">
|
||||||
|
<input type="hidden" name="voipAccounts[${status.index }].cfgId" value="${voipAccount.cfgId}">
|
||||||
|
<!-- 配置域类型 -->
|
||||||
|
<c:forEach items="${regionList}" var="region">
|
||||||
|
<c:if test="${_cfg.functionId eq region.functionId && region.configRegionCode==2}">
|
||||||
|
<input type="hidden" name="voipAccounts[${status.index }].cfgType" value="${region.configRegionValue}">
|
||||||
|
<input type="hidden" name="voipAccounts[${status.index }].cfgRegionCode" value="${region.configRegionCode}">
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<span class="glyphicon glyphicon-remove pull-right" title="remove" onClick="delContent('voipAccount${status.index }','voipAccountAdd');"/>
|
<span class="glyphicon glyphicon-remove pull-right" title="remove" onClick="delContent('voipAccount${status.index }','voipAccountAdd');"/>
|
||||||
@@ -290,9 +325,9 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="district"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="district"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="_cfg.voipAccounts[${status.index }].district" class="selectpicker show-tick form-control required">
|
<select name="voipAccounts[${status.index }].district" class="selectpicker show-tick form-control required">
|
||||||
<c:forEach items="${regionList}" var="regionDistrict">
|
<c:forEach items="${regionList}" var="regionDistrict">
|
||||||
<c:if test="${_cfg.functionId eq regionDistrict.functionId}">
|
<c:if test="${_cfg.functionId eq regionDistrict.functionId && regionDistrict.configRegionCode ==2}">
|
||||||
<c:forEach items="${fn:split(regionDistrict.configDistrict,',')}" var="_district">
|
<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>
|
<option value="${_district }" <c:if test="${voipAccount.district==_district || voipAccount.district==null}">selected</c:if> >${_district }</option>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
@@ -300,16 +335,16 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
</c:forEach>
|
</c:forEach>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div for="district"></div>
|
<div for="voipAccounts[${status.index }].district"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font>关键词</label>
|
<label class="control-label col-md-3"><font color="red">*</font>关键词</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input class="form-control required" type="text" name="_cfg.voipAccounts[${status.index }].cfgKeywords" value="${voipAccount.cfgKeywords}">
|
<input class="form-control required" type="text" name="voipAccounts[${status.index }].cfgKeywords" value="${voipAccount.cfgKeywords}">
|
||||||
</div>
|
</div>
|
||||||
<div for="cfgKeywords"></div>
|
<div for="voipAccounts[${status.index }].cfgKeywords"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -320,24 +355,24 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="radio-inline">
|
<label class="radio-inline">
|
||||||
<input type="radio" name="_cfg.voipAccounts[${status.index }].exprType" value="1" class="required"
|
<input type="radio" name="voipAccounts[${status.index }].exprType" value="1" class="required"
|
||||||
<c:if test="${voipAccount.exprType==1}">checked</c:if>
|
<c:if test="${voipAccount.exprType==1}">checked</c:if>
|
||||||
><spring:message code="and"/>
|
><spring:message code="and"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="radio-inline">
|
<label class="radio-inline">
|
||||||
<input type="radio" name="_cfg.voipAccounts[${status.index }].exprType" value="0" class="required"
|
<input type="radio" name="voipAccounts[${status.index }].exprType" value="0" class="required"
|
||||||
<c:if test="${voipAccount.exprType==0 || voipAccount.exprType==null}">checked</c:if>
|
<c:if test="${voipAccount.exprType==0 || voipAccount.exprType==null}">checked</c:if>
|
||||||
><spring:message code="null"/>
|
><spring:message code="null"/>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div for="exprType"></div>
|
<div for="voipAccounts[${status.index }].exprType"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group ">
|
<div class="form-group ">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="_cfg.voipAccounts[${status.index }].matchMethod" class="selectpicker select2 form-control required" >
|
<select name="voipAccounts[${status.index }].matchMethod" class="selectpicker select2 form-control required" >
|
||||||
<option value=""><spring:message code="select"/></option>
|
<option value=""><spring:message code="select"/></option>
|
||||||
<option value="0" <c:if test="${voipAccount.matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
|
<option value="0" <c:if test="${voipAccount.matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
|
||||||
<option value="1" <c:if test="${voipAccount.matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
|
<option value="1" <c:if test="${voipAccount.matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
|
||||||
@@ -345,7 +380,7 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
<option value="3" <c:if test="${voipAccount.matchMethod==3 || voipAccount.matchMethod==null}">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
|
<option value="3" <c:if test="${voipAccount.matchMethod==3 || voipAccount.matchMethod==null}">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div for="matchMethod"></div>
|
<div for="voipAccounts[${status.index }].matchMethod"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -354,14 +389,14 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="_cfg.voipAccounts[${status.index }].isHexbin" class="selectpicker select2 form-control required">
|
<select name="voipAccounts[${status.index }].isHexbin" class="selectpicker select2 form-control required">
|
||||||
<option value=""><spring:message code="select"/></option>
|
<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="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="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>
|
<option value="2" <c:if test="${voipAccount.isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div for="isHexbin"></div>
|
<div for="voipAccounts[${status.index }].isHexbin"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -370,6 +405,7 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
<!--account info-->
|
<!--account info-->
|
||||||
<br>
|
<br>
|
||||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||||
|
<input type="hidden" name="isAreaEffective" value="0">
|
||||||
<br>
|
<br>
|
||||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -124,11 +124,14 @@
|
|||||||
html+="<label><spring:message code='ip_pattern'/>:</label>";
|
html+="<label><spring:message code='ip_pattern'/>:</label>";
|
||||||
html+="<label>"
|
html+="<label>"
|
||||||
if(item.ipPattern==1){
|
if(item.ipPattern==1){
|
||||||
html+="<spring:message code='subnet'/>"
|
html+="<spring:message code='ip_subnet'/>"
|
||||||
}
|
}
|
||||||
if(item.ipPattern==2){
|
if(item.ipPattern==2){
|
||||||
html+="<spring:message code='ip_range'/>"
|
html+="<spring:message code='ip_range'/>"
|
||||||
}
|
}
|
||||||
|
if(item.ipPattern==3){
|
||||||
|
html+="IP"
|
||||||
|
}
|
||||||
html+="</label>";
|
html+="</label>";
|
||||||
html+="</div>";
|
html+="</div>";
|
||||||
html+="</div>";
|
html+="</div>";
|
||||||
@@ -147,13 +150,10 @@
|
|||||||
html+="<label><spring:message code='port_pattern'/>:</label>";
|
html+="<label><spring:message code='port_pattern'/>:</label>";
|
||||||
html+="<label>"
|
html+="<label>"
|
||||||
if(item.portPattern==1){
|
if(item.portPattern==1){
|
||||||
html+="<spring:message code='subnet'/>"
|
html+="port"
|
||||||
}
|
}
|
||||||
if(item.portPattern==2){
|
if(item.portPattern==2){
|
||||||
html+="<spring:message code='ip_range'/>"
|
html+="<spring:message code='port_mask'/>"
|
||||||
}
|
|
||||||
if(item.portPattern==3){
|
|
||||||
html+="IP"
|
|
||||||
}
|
}
|
||||||
html+="</label>";
|
html+="</label>";
|
||||||
html+="</div>";
|
html+="</div>";
|
||||||
@@ -639,7 +639,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span id="open${status.index}" class="" compileId="${indexCfg.compileId}" cfgId="${indexCfg.cfgId}"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
<span id="open${status.index}" class="" compileId="${indexCfg.compileId}" cfgId="${indexCfg.cfgId}"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
|
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.compileId}" value="${indexCfg.isAudit}">
|
||||||
</td>
|
</td>
|
||||||
<td>${indexCfg.cfgDesc }</td>
|
<td>${indexCfg.cfgDesc }</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user