Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into
develop Conflicts: src/main/resources/messages/message_en.properties src/main/resources/messages/message_ru.properties src/main/resources/messages/message_zh_CN.properties voip 和流媒体域与服务端表名更改 国际化文件增加voip和流媒体域描述
This commit is contained in:
@@ -69,7 +69,15 @@ public class BaseStringCfg<T> extends BaseCfg<T> {
|
|||||||
|
|
||||||
private List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList;
|
private List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList;
|
||||||
private NtcSubscribeIdCfg ntcSubscribeIdCfg;
|
private NtcSubscribeIdCfg ntcSubscribeIdCfg;
|
||||||
|
private IpPortCfg ipPort;
|
||||||
|
|
||||||
|
|
||||||
|
public IpPortCfg getIpPort() {
|
||||||
|
return ipPort;
|
||||||
|
}
|
||||||
|
public void setIpPort(IpPortCfg ipPort) {
|
||||||
|
this.ipPort = ipPort;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* exprType
|
* exprType
|
||||||
* @return exprType
|
* @return exprType
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package com.nis.util;
|
package com.nis.util;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
@@ -26,6 +28,7 @@ import com.sun.corba.se.impl.orbutil.closure.Constant;
|
|||||||
public class LogUtils {
|
public class LogUtils {
|
||||||
|
|
||||||
public static final String CACHE_MENU_NAME_PATH_MAP = "menuNamePathMap";
|
public static final String CACHE_MENU_NAME_PATH_MAP = "menuNamePathMap";
|
||||||
|
public static final String CACHE_MENU_NAME_PATH_MAP2 = "menuNamePathMap2";
|
||||||
|
|
||||||
private static SysLogDao logDao = SpringContextHolder.getBean(SysLogDao.class);
|
private static SysLogDao logDao = SpringContextHolder.getBean(SysLogDao.class);
|
||||||
private static SysMenuDao menuDao = SpringContextHolder.getBean(SysMenuDao.class);
|
private static SysMenuDao menuDao = SpringContextHolder.getBean(SysMenuDao.class);
|
||||||
@@ -59,6 +62,12 @@ public class LogUtils {
|
|||||||
log.setMethod(request.getMethod());
|
log.setMethod(request.getMethod());
|
||||||
log.setCreateBy(user.getName());
|
log.setCreateBy(user.getName());
|
||||||
log.setCreateDate(new Date());
|
log.setCreateDate(new Date());
|
||||||
|
if(StringUtil.isEmpty(request.getParameter("functionId"))){
|
||||||
|
log.setFunctionId(0);
|
||||||
|
}else{
|
||||||
|
log.setFunctionId(Integer.parseInt(request.getParameter("functionId")));
|
||||||
|
}
|
||||||
|
|
||||||
// 异步保存日志
|
// 异步保存日志
|
||||||
new SaveLogThread(log, handler, ex).start();
|
new SaveLogThread(log, handler, ex).start();
|
||||||
}
|
}
|
||||||
@@ -90,7 +99,8 @@ public class LogUtils {
|
|||||||
RequiresPermissions rp = m.getAnnotation(RequiresPermissions.class);
|
RequiresPermissions rp = m.getAnnotation(RequiresPermissions.class);
|
||||||
permission = (rp != null ? StringUtils.join(rp.value(), ",") : "");
|
permission = (rp != null ? StringUtils.join(rp.value(), ",") : "");
|
||||||
}
|
}
|
||||||
log.setTitle(getMenuNamePath(log.getRequestUri(), permission));
|
Integer functionId = log.getFunctionId();
|
||||||
|
log.setTitle(getMenuNamePath(log.getRequestUri(), permission,functionId));
|
||||||
}
|
}
|
||||||
// 如果有异常,设置异常信息
|
// 如果有异常,设置异常信息
|
||||||
log.setException(Exceptions.getStackTraceAsString(ex));
|
log.setException(Exceptions.getStackTraceAsString(ex));
|
||||||
@@ -132,12 +142,21 @@ public class LogUtils {
|
|||||||
/**
|
/**
|
||||||
* 获取菜单名称路径(如:系统设置-机构用户-用户管理-编辑)
|
* 获取菜单名称路径(如:系统设置-机构用户-用户管理-编辑)
|
||||||
*/
|
*/
|
||||||
public static String getMenuNamePath(String requestUri, String permission){
|
public static String getMenuNamePath(String requestUri, String permission,Integer functionId){
|
||||||
String href = StringUtils.substringAfter(requestUri, Configurations.getStringProperty("adminPath", "/nis"));
|
String href = StringUtils.substringAfter(requestUri, Configurations.getStringProperty("adminPath", "/nis"));
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Map<String, String> menuMap = (Map<String, String>)CacheUtils.get(CACHE_MENU_NAME_PATH_MAP);
|
Map<String, String> menuMap = (Map<String, String>)CacheUtils.get(CACHE_MENU_NAME_PATH_MAP);
|
||||||
|
//用于记录功能按钮的操作日志【新增,修改,删除,审核等】
|
||||||
|
Map<String, String> menuMap2 = (Map<String, String>)CacheUtils.get(CACHE_MENU_NAME_PATH_MAP2);
|
||||||
if (menuMap == null){
|
if (menuMap == null){
|
||||||
menuMap = Maps.newHashMap();
|
menuMap = Maps.newHashMap();
|
||||||
|
menuMap2 = Maps.newHashMap();
|
||||||
|
Properties msgProp = new Properties();
|
||||||
|
try {
|
||||||
|
msgProp.load(Configurations.class.getResourceAsStream("/messages/message_en.properties"));
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
List<SysMenu> menuList = menuDao.findAllList(new SysMenu());
|
List<SysMenu> menuList = menuDao.findAllList(new SysMenu());
|
||||||
for (SysMenu menu : menuList){
|
for (SysMenu menu : menuList){
|
||||||
// 获取菜单名称路径(如:系统设置-机构用户-用户管理-编辑)
|
// 获取菜单名称路径(如:系统设置-机构用户-用户管理-编辑)
|
||||||
@@ -152,30 +171,66 @@ public class LogUtils {
|
|||||||
}
|
}
|
||||||
for (SysMenu m : menuList){
|
for (SysMenu m : menuList){
|
||||||
if (m.getId().equals(Long.valueOf(id))){
|
if (m.getId().equals(Long.valueOf(id))){
|
||||||
namePathList.add(m.getName());
|
// namePathList.add(m.getName());
|
||||||
|
namePathList.add(msgProp.getProperty(m.getCode())==null?m.getCode():msgProp.getProperty(m.getCode()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
namePathList.add(menu.getName());
|
// namePathList.add(menu.getName());
|
||||||
|
namePathList.add(msgProp.getProperty(menu.getCode())==null?menu.getCode():msgProp.getProperty(menu.getCode()));
|
||||||
namePath = StringUtils.join(namePathList, "-");
|
namePath = StringUtils.join(namePathList, "-");
|
||||||
}
|
}
|
||||||
// 设置菜单名称路径
|
// 设置菜单名称路径
|
||||||
if (StringUtils.isNotBlank(menu.getHref())){
|
if (StringUtils.isNotBlank(menu.getHref())){
|
||||||
menuMap.put(menu.getHref(), namePath);
|
if(!StringUtil.isEmpty(menu.getFunctionId())&&menu.getFunctionId()!=0){
|
||||||
|
menuMap.put(menu.getHref()+"?functionId"+menu.getFunctionId(), namePath);
|
||||||
|
menuMap2.put("functionId"+menu.getFunctionId(), namePath);//用于记录功能按钮的操作日志
|
||||||
|
}else{
|
||||||
|
menuMap.put(menu.getHref(), namePath);
|
||||||
|
}
|
||||||
}else if (StringUtils.isNotBlank(menu.getPermission())){
|
}else if (StringUtils.isNotBlank(menu.getPermission())){
|
||||||
for (String p : StringUtils.split(menu.getPermission())){
|
for (String p : StringUtils.split(menu.getPermission())){
|
||||||
menuMap.put(p, namePath);
|
if(!StringUtil.isEmpty(menu.getFunctionId())&&menu.getFunctionId()!=0){
|
||||||
|
menuMap.put(p+"?functionId"+menu.getFunctionId(), namePath);
|
||||||
|
menuMap2.put("functionId"+menu.getFunctionId(), namePath);//用于记录功能按钮的操作日志
|
||||||
|
}else{
|
||||||
|
menuMap.put(p, namePath);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CacheUtils.put(CACHE_MENU_NAME_PATH_MAP, menuMap);
|
CacheUtils.put(CACHE_MENU_NAME_PATH_MAP, menuMap);
|
||||||
|
CacheUtils.put(CACHE_MENU_NAME_PATH_MAP2, menuMap2);
|
||||||
|
}
|
||||||
|
String menuNamePath = null;
|
||||||
|
if(functionId==0){
|
||||||
|
menuNamePath = menuMap.get(href);
|
||||||
|
}else{
|
||||||
|
menuNamePath = menuMap.get(href+"?functionId"+functionId);
|
||||||
|
if(menuNamePath==null){
|
||||||
|
menuNamePath = menuMap2.get("functionId"+functionId);
|
||||||
|
/*String methodName = href.substring(href.lastIndexOf("/")+1).toLowerCase();
|
||||||
|
if(!StringUtil.isEmpty(methodName)){
|
||||||
|
if(methodName.contains("insert")||methodName.contains("save")||methodName.contains("update")||methodName.contains("edit")){
|
||||||
|
menuNamePath +="-"+"Save or Update";
|
||||||
|
}else if(methodName.contains("valid")){
|
||||||
|
menuNamePath +="-"+"Delete";
|
||||||
|
}else if(methodName.contains("audit")){
|
||||||
|
menuNamePath +="-"+"Confirmation";
|
||||||
|
}
|
||||||
|
|
||||||
|
}*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
String menuNamePath = menuMap.get(href);
|
|
||||||
if (menuNamePath == null){
|
if (menuNamePath == null){
|
||||||
for (String p : StringUtils.split(permission)){
|
for (String p : StringUtils.split(permission)){
|
||||||
|
if(functionId!=0){
|
||||||
|
p += "?functionId"+functionId;
|
||||||
|
}
|
||||||
menuNamePath = menuMap.get(p);
|
menuNamePath = menuMap.get(p);
|
||||||
if (StringUtils.isNotBlank(menuNamePath)){
|
if (StringUtils.isNotBlank(menuNamePath)){
|
||||||
break;
|
break;
|
||||||
@@ -185,6 +240,7 @@ public class LogUtils {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
System.out.println(menuNamePath);
|
||||||
return menuNamePath;
|
return menuNamePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -562,6 +562,13 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
|||||||
if(map.get("numRegionList")!=null){
|
if(map.get("numRegionList")!=null){
|
||||||
numRegionList.addAll(map.get("numRegionList"));
|
numRegionList.addAll(map.get("numRegionList"));
|
||||||
}
|
}
|
||||||
|
if(Constants.SERVICE_IP_MULITIPLEX==cfg.getServiceId().intValue()){
|
||||||
|
String region=Constants.USERREGION_IR_STRATEGY+"="+cfg.getDnsStrategyId()+Constants.USER_REGION_SPLIT
|
||||||
|
+Constants.USERREGION_IR_TYPE+"="+cfg.getIrType();
|
||||||
|
maatCfg.setUserRegion(region);
|
||||||
|
}else if(Constants.SERVICE_IP_RATELIMIT==cfg.getServiceId().intValue()){
|
||||||
|
maatCfg.setUserRegion(Constants.USERREGION_RATE_LIMIT+"="+cfg.getRatelimit());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||||
@@ -630,6 +637,16 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
|||||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||||
|
//限速需要发Droprate=0.001 ,暂不支持Bandwidth=200kbps
|
||||||
|
if(entity.getAction().equals(Constants.RATELIMIT_ACTION)){
|
||||||
|
if(entity.getUserRegion1().equals("0")){//丢包率
|
||||||
|
entity.setUserRegion2(StringUtil.isEmpty(entity.getUserRegion2()) ? "":entity.getUserRegion2());
|
||||||
|
maatCfg.setUserRegion(Constants.INTERCEPT_IP_RATELIMIT_DROPRATE_USER_REGION_KEY+"="+entity.getUserRegion2());
|
||||||
|
}else if(entity.getUserRegion1().equals("1")){//带宽
|
||||||
|
entity.setUserRegion3(StringUtil.isEmpty(entity.getUserRegion3()) ? "":entity.getUserRegion3());
|
||||||
|
maatCfg.setUserRegion(Constants.INTERCEPT_IP_RATELIMIT_BANDWITH_USER_REGION_KEY+"="+entity.getUserRegion3());
|
||||||
|
}
|
||||||
|
}
|
||||||
//调用服务接口下发配置数据
|
//调用服务接口下发配置数据
|
||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
logger.info("ip配置下发配置参数:"+json);
|
logger.info("ip配置下发配置参数:"+json);
|
||||||
|
|||||||
@@ -1215,4 +1215,4 @@ protocol_identify=Protocol Identify
|
|||||||
MM_FILE_DIGEST=File Digest Configuration
|
MM_FILE_DIGEST=File Digest Configuration
|
||||||
NTC_ASN_IP=ASN
|
NTC_ASN_IP=ASN
|
||||||
NTC_STREAMING_MEDIA_URL=Streaming Media URL
|
NTC_STREAMING_MEDIA_URL=Streaming Media URL
|
||||||
NTC_VOIP_ACCOUNT=VoIP Account
|
NTC_VOIP_ACCOUNT=VoIP Account
|
||||||
|
|||||||
@@ -1216,4 +1216,4 @@ protocol_identify=Protocol Identify
|
|||||||
NTC_ASN_IP=ASN
|
NTC_ASN_IP=ASN
|
||||||
MM_FILE_DIGEST=\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F \u0414\u0430\u0439\u0434\u0436\u0435\u0441\u0442\u0430 \u0424\u0430\u0439\u043B\u043E\u0432
|
MM_FILE_DIGEST=\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F \u0414\u0430\u0439\u0434\u0436\u0435\u0441\u0442\u0430 \u0424\u0430\u0439\u043B\u043E\u0432
|
||||||
NTC_STREAMING_MEDIA_URL=Streaming Media URL
|
NTC_STREAMING_MEDIA_URL=Streaming Media URL
|
||||||
NTC_VOIP_ACCOUNT=VoIP \u0410\u043A\u043A\u0430\u0443\u043D\u0442
|
NTC_VOIP_ACCOUNT=VoIP \u0410\u043A\u043A\u0430\u0443\u043D\u0442
|
||||||
|
|||||||
@@ -1209,4 +1209,4 @@ protocol_identify=Protocol Identify
|
|||||||
MM_FILE_DIGEST=\u6587\u4EF6\u6458\u8981\u914D\u7F6E
|
MM_FILE_DIGEST=\u6587\u4EF6\u6458\u8981\u914D\u7F6E
|
||||||
NTC_ASN_IP=ASN
|
NTC_ASN_IP=ASN
|
||||||
NTC_STREAMING_MEDIA_URL=Streaming Media URL
|
NTC_STREAMING_MEDIA_URL=Streaming Media URL
|
||||||
NTC_VOIP_ACCOUNT=VoIP Account
|
NTC_VOIP_ACCOUNT=VoIP Account
|
||||||
|
|||||||
@@ -3,12 +3,15 @@ update function_service_dict set service_id='39',protocol_id='23' where dict_id=
|
|||||||
update function_service_dict set service_id='151',protocol_id='23' where dict_id='31';
|
update function_service_dict set service_id='151',protocol_id='23' where dict_id='31';
|
||||||
#流媒体协议 增加IP配置
|
#流媒体协议 增加IP配置
|
||||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`) VALUES ('22', '', '1', 'NTC_UNIVERSAL_IP', '流媒体协议 IP配置', '1', '1', '1', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '', '', '4,6', '', '', '1,2,3', '1,2', '0,1', '0,6,17', '1,2,3,4', '1');
|
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`) VALUES ('22', '', '1', 'NTC_UNIVERSAL_IP', '流媒体协议 IP配置', '1', '1', '1', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '', '', '4,6', '', '', '1,2,3', '1,2', '0,1', '0,6,17', '1,2,3,4', '1');
|
||||||
|
update function_region_dict set config_region_value='NTC_STREAMING_MEDIA_URL' where dict_id='25';
|
||||||
|
|
||||||
#voip配置
|
#voip配置
|
||||||
update function_service_dict set service_id='38',protocol_id='22' where dict_id='16';
|
update function_service_dict set service_id='38',protocol_id='22' where dict_id='16';
|
||||||
update function_service_dict set service_id='150',protocol_id='22' where dict_id='17';
|
update function_service_dict set service_id='150',protocol_id='22' where dict_id='17';
|
||||||
#voip 配置
|
#voip 配置
|
||||||
update function_region_dict set config_region_value='NTC_UNIVERSAL_IP' where dict_id='8';
|
update function_region_dict set config_region_value='NTC_UNIVERSAL_IP' where dict_id='8';
|
||||||
|
update function_region_dict set config_region_value='NTC_VOIP_ACCOUNT' where dict_id='16';
|
||||||
|
update function_region_dict set is_valid=0 where dict_id='208';
|
||||||
|
|
||||||
#文件摘要配置
|
#文件摘要配置
|
||||||
update function_service_dict set service_id='399' where dict_id='59';
|
update function_service_dict set service_id='399' where dict_id='59';
|
||||||
|
|||||||
2
src/main/resources/sql/20181011/extend_region_type.sql
Normal file
2
src/main/resources/sql/20181011/extend_region_type.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE function_region_dict MODIFY COLUMN region_type INT(1) NOT NULL COMMENT '1IP类,2字符串类,3增强字符串类,4数值类,5摘要类,6回调类,7 ASN';
|
||||||
|
UPDATE function_region_dict SET region_type=7 WHERE config_region_value='NTC_ASN_IP' AND function_id=5;
|
||||||
32
src/main/webapp/WEB-INF/views/cfg/ipaddr/asnForm.jsp
Normal file
32
src/main/webapp/WEB-INF/views/cfg/ipaddr/asnForm.jsp
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||||
|
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<div class="row">
|
||||||
|
<div class="pull-right">
|
||||||
|
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||||
|
onClick="delContent('${tabName}${status.index}','${tabName}Add');" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<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="group"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="userRegion4" class="selectpicker show-tick form-control required" data-live-search="true" data-live-search-placeholder="search">
|
||||||
|
<c:forEach items="${policyGroups }" var="policyGroup">
|
||||||
|
<option value="${policyGroup.groupId}" <c:if test="${asn==policyGroup.groupId }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div for="userRegion4"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
</html>
|
||||||
@@ -13,50 +13,29 @@
|
|||||||
$(document)
|
$(document)
|
||||||
.ready(
|
.ready(
|
||||||
function() {
|
function() {
|
||||||
/*initCommIpVal();
|
var asnRegionCode,isAsn=0;
|
||||||
$("#cancel").on("click", function() {
|
var regionCodes=$(".action:checked").attr("regionCode").split(",");
|
||||||
window.history.back();
|
|
||||||
});*/
|
|
||||||
var asnRegionCode,configType;
|
|
||||||
$("input[id^='cfgRegionCode']").each(function(){
|
$("input[id^='cfgRegionCode']").each(function(){
|
||||||
var regionCode=$(this).val();
|
if(7==$(this).attr("regionType")){
|
||||||
if("asn"==$(this).attr("servicetype")){
|
|
||||||
asnRegionCode=$(this).val();
|
asnRegionCode=$(this).val();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(".configType a").on("click",function(){
|
for(var ind in regionCodes){
|
||||||
if($(this).attr("id")=="ipCfgTab"){
|
if(regionCodes[ind]==asnRegionCode){
|
||||||
configType="ip";
|
isAsn=1;
|
||||||
$(".glyphicon-plus").first().click();
|
break;
|
||||||
$(".ipPortList").find(".glyphicon-remove").addClass("hidden")
|
|
||||||
hideAction(1,asnRegionCode);
|
|
||||||
}else{
|
|
||||||
configType="asn";
|
|
||||||
hideAction(0,asnRegionCode);
|
|
||||||
}
|
}
|
||||||
var region = ($(this).attr("for"));
|
|
||||||
if(region=="ipaddr"){
|
|
||||||
$(".asn").addClass("hidden").addClass("disabled");
|
|
||||||
$(".ipaddr").removeClass("hidden").removeClass("disabled");
|
|
||||||
}else{
|
|
||||||
$(".ipaddr").addClass("hidden").addClass("disabled");
|
|
||||||
$(".asn").removeClass("hidden").removeClass("disabled");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//切换tab
|
|
||||||
if("${_cfg.cfgId}"==''){
|
|
||||||
configType='ip';
|
|
||||||
$("#ipCfgTab").click();
|
|
||||||
}else if("${_cfg.userRegion4}"==""){
|
|
||||||
configType='ip';
|
|
||||||
$("#ipCfgTab").click();
|
|
||||||
}else{
|
|
||||||
configType='asn';
|
|
||||||
$("#ansCfgTab").click();
|
|
||||||
}
|
}
|
||||||
if(configType!='asn'){
|
//hide actions
|
||||||
$(".glyphicon-plus").first().click();
|
if(isAsn==1){
|
||||||
$(".ipPortList").find(".glyphicon-remove").addClass("hidden")
|
hideAction(0,asnRegionCode);
|
||||||
|
}else{
|
||||||
|
hideAction(1,asnRegionCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isAsn==0){
|
||||||
|
$("[class~='glyphicon-plus'][class~='ipPortList']").click();
|
||||||
|
$("[class~='boxSolid'][class~='asn']").find(".glyphicon-remove").click();
|
||||||
/*if(action==32){
|
/*if(action==32){
|
||||||
$(".subscribeId").find(".glyphicon-remove").click();
|
$(".subscribeId").find(".glyphicon-remove").click();
|
||||||
$(".subscribeId").prev("h4").addClass("hidden");
|
$(".subscribeId").prev("h4").addClass("hidden");
|
||||||
@@ -73,8 +52,24 @@
|
|||||||
$(this).addClass("hidden");
|
$(this).addClass("hidden");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
processAction(configType,$(".ipPortList"));
|
processAction(isAsn,$(".ipPortList"));
|
||||||
|
}else{
|
||||||
|
$("[class~='glyphicon-plus'][class~='asn']").click();
|
||||||
|
$("[class~='boxSolid'][class~='ipPortList']").find(".glyphicon-remove").click();
|
||||||
|
processAction(isAsn,$(".asn"));
|
||||||
}
|
}
|
||||||
|
$(".glyphicon-plus").on("click",function(){
|
||||||
|
if($(this).hasClass("ipPortList")){
|
||||||
|
isAsn=0;
|
||||||
|
hideAction(1,asnRegionCode);
|
||||||
|
$("[class~='boxSolid'][class~='asn']").find(".glyphicon-remove").click();
|
||||||
|
}
|
||||||
|
if($(this).hasClass("asn")){
|
||||||
|
isAsn=1;
|
||||||
|
hideAction(0,asnRegionCode);
|
||||||
|
$("[class~='boxSolid'][class~='ipPortList']").find(".glyphicon-remove").click();
|
||||||
|
}
|
||||||
|
});
|
||||||
$(".action").on("change", function() {
|
$(".action").on("change", function() {
|
||||||
$("#serviceId").val($(this).attr("serviceId"));
|
$("#serviceId").val($(this).attr("serviceId"));
|
||||||
$("#protocolId").val($(this).attr("protocolId"));
|
$("#protocolId").val($(this).attr("protocolId"));
|
||||||
@@ -109,10 +104,10 @@
|
|||||||
tabInfo.find("[name$='cfgType']").val(cfgType);
|
tabInfo.find("[name$='cfgType']").val(cfgType);
|
||||||
tabInfo.find("[name$='cfgRegionCode']").val(cfgRegionCode);
|
tabInfo.find("[name$='cfgRegionCode']").val(cfgRegionCode);
|
||||||
}
|
}
|
||||||
if(configType!='asn'){
|
if(isAsn==0){
|
||||||
changeIPVal(tabInfo);
|
changeIPVal(tabInfo);
|
||||||
}
|
}
|
||||||
processAction(configType,tabInfo);
|
processAction(isAsn,tabInfo);
|
||||||
/* if(tabInfo){
|
/* if(tabInfo){
|
||||||
tabInfo.find("[name$='cfgType']").val(cfgType);
|
tabInfo.find("[name$='cfgType']").val(cfgType);
|
||||||
tabInfo.find("[name$='cfgRegionCode']").val(cfgRegionCode);
|
tabInfo.find("[name$='cfgRegionCode']").val(cfgRegionCode);
|
||||||
@@ -206,7 +201,7 @@
|
|||||||
flag=flag1;
|
flag=flag1;
|
||||||
}
|
}
|
||||||
if(flag){
|
if(flag){
|
||||||
if(configType!='asn'){
|
if(isAsn==0){
|
||||||
$("input[name='userRegion4']").attr("disabled",true);
|
$("input[name='userRegion4']").attr("disabled",true);
|
||||||
}
|
}
|
||||||
$("input[name$='userRegion1']").attr("disabled",false);
|
$("input[name$='userRegion1']").attr("disabled",false);
|
||||||
@@ -306,7 +301,7 @@ var hideAction=function(isHide,regionCode){
|
|||||||
}
|
}
|
||||||
var processAction=function(configType,obj){
|
var processAction=function(configType,obj){
|
||||||
var action=$(".action:checked").val();
|
var action=$(".action:checked").val();
|
||||||
if(configType!='asn'){
|
if(configType!=1){
|
||||||
var o=$(obj)
|
var o=$(obj)
|
||||||
if(o){
|
if(o){
|
||||||
/*处理协议*/
|
/*处理协议*/
|
||||||
@@ -429,9 +424,9 @@ var processAction=function(configType,obj){
|
|||||||
<div class="portlet-body flip-scroll">
|
<div class="portlet-body flip-scroll">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<div class="tabbable tabbable-custom tabs-left">
|
<%-- <div class="tabbable tabbable-custom tabs-left"> --%>
|
||||||
<!-- Only required for left/right tabs -->
|
<!-- Only required for left/right tabs -->
|
||||||
<ul class="nav nav-tabs tabs-left">
|
<%-- <ul class="nav nav-tabs tabs-left">
|
||||||
<li class="configType"><a href="#ip_tab" id="ipCfgTab"
|
<li class="configType"><a href="#ip_tab" id="ipCfgTab"
|
||||||
data-toggle="tab" for="ipaddr"
|
data-toggle="tab" for="ipaddr"
|
||||||
data_dldk="<spring:message code="IP"/>"><spring:message
|
data_dldk="<spring:message code="IP"/>"><spring:message
|
||||||
@@ -439,7 +434,7 @@ var processAction=function(configType,obj){
|
|||||||
<li class="configType"><a href="#asn_tab" data-toggle="tab" for="asn" id="ansCfgTab"
|
<li class="configType"><a href="#asn_tab" data-toggle="tab" for="asn" id="ansCfgTab"
|
||||||
data_dldk="<spring:message code="ASN"/>"><spring:message
|
data_dldk="<spring:message code="ASN"/>"><spring:message
|
||||||
code="ASN" /></a></li>
|
code="ASN" /></a></li>
|
||||||
</ul>
|
</ul> --%>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -550,19 +545,19 @@ var processAction=function(configType,obj){
|
|||||||
</div> --%>
|
</div> --%>
|
||||||
</div>
|
</div>
|
||||||
<!-- dolog end-->
|
<!-- dolog end-->
|
||||||
<c:set var="ipCfgIndex" value="0"></c:set>
|
<c:set var="ipCfgIndex" value="0"></c:set>
|
||||||
<c:set var="strCfgIndex" value="0"></c:set>
|
<c:set var="strCfgIndex" value="0"></c:set>
|
||||||
<c:set var="subscribeIdIndex" value="0"></c:set>
|
<c:set var="subscribeIdIndex" value="0"></c:set>
|
||||||
|
<c:set var="asnIndex" value="0"></c:set>
|
||||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||||
<c:if test="${region.regionType eq 1 }">
|
<c:if test="${region.regionType eq 1 }">
|
||||||
<c:if test="${ipCfgIndex==0}">
|
<c:if test="${ipCfgIndex==0}">
|
||||||
<div class="ipaddr">
|
|
||||||
<!--ip info-->
|
<!--ip info-->
|
||||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||||
<h4 class="form-section ipPortListTitle${region.configRegionCode}">
|
<h4 class="form-section ipPortListTitle${region.configRegionCode}">
|
||||||
<span class="ipPortTitle"><spring:message code="${region.configRegionValue}" /></span>
|
<span class="ipPortTitle"><spring:message code="${region.configRegionValue}" /></span>
|
||||||
<small> <span
|
<small> <span
|
||||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
class="glyphicon glyphicon-plus ipPortList ${tabName}Add"
|
||||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||||
</h4>
|
</h4>
|
||||||
<c:set var="cfgName" value="ipPortList[${ipCfgIndex}]"></c:set>
|
<c:set var="cfgName" value="ipPortList[${ipCfgIndex}]"></c:set>
|
||||||
@@ -585,12 +580,10 @@ var processAction=function(configType,obj){
|
|||||||
<c:set var="ipCfgIndex" value="${ipCfgIndex+1 }"></c:set>
|
<c:set var="ipCfgIndex" value="${ipCfgIndex+1 }"></c:set>
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</div>
|
|
||||||
</c:if>
|
</c:if>
|
||||||
<!--/ip info-->
|
<!--/ip info-->
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${region.regionType eq 2 }">
|
<c:if test="${region.regionType eq 2 }">
|
||||||
<div class="ipaddr">
|
|
||||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||||
<h4 class="form-section">
|
<h4 class="form-section">
|
||||||
<spring:message code="${region.configRegionValue}" />
|
<spring:message code="${region.configRegionValue}" />
|
||||||
@@ -637,26 +630,45 @@ var processAction=function(configType,obj){
|
|||||||
</c:if>
|
</c:if>
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</div>
|
</c:if>
|
||||||
|
<c:if test="${region.regionType eq 7 }">
|
||||||
|
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||||
|
<h4 class="form-section">
|
||||||
|
<spring:message code="${region.configRegionValue}" />
|
||||||
|
<small> <span
|
||||||
|
class="glyphicon glyphicon-plus asn ${tabName}Add"
|
||||||
|
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||||
|
</h4>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${fn:length(fn:split(_cfg.userRegion4,','))>0}">
|
||||||
|
<c:set var="isBreak" value="false" ></c:set>
|
||||||
|
<c:forEach items="${fn:split(_cfg.userRegion4,',')}" var="asn">${_cfg.cfgType}
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!isBreak}">
|
||||||
|
<div class="row boxSolid asn ${tabName}${status.index}">
|
||||||
|
<%@include file="/WEB-INF/views/cfg/ipaddr/asnForm.jsp"%>
|
||||||
|
</div>
|
||||||
|
<c:set var="isBreak" value="true" ></c:set>
|
||||||
|
<c:set var="asnIndex" value="${asnIndex+1 }"></c:set>
|
||||||
|
</c:when>
|
||||||
|
</c:choose>
|
||||||
|
</c:forEach>
|
||||||
|
<c:if test="${!isBreak}">
|
||||||
|
<div class="row boxSolid asn ${tabName}${status.index} hidden disabled">
|
||||||
|
<%@include file="/WEB-INF/views/cfg/ipaddr/asnForm.jsp"%>
|
||||||
|
</div>
|
||||||
|
<c:set var="asnIndex" value="${asnIndex+1 }"></c:set>
|
||||||
|
</c:if>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<div class="row boxSolid asn ${tabName}${status.index} hidden disabled">
|
||||||
|
<%@include file="/WEB-INF/views/cfg/ipaddr/asnForm.jsp"%>
|
||||||
|
</div>
|
||||||
|
<c:set var="asnIndex" value="${asnIndex+1 }"></c:set>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
</c:if>
|
</c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
<div class="asn">
|
|
||||||
<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="group"/></label>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<select name="userRegion4" class="selectpicker show-tick form-control required" data-live-search="true" data-live-search-placeholder="search">
|
|
||||||
<c:forEach items="${policyGroups }" var="policyGroup">
|
|
||||||
<option value="${policyGroup.groupId}" <c:if test="${_cfg.userRegion1==policyGroup.groupId }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
|
|
||||||
</c:forEach>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div for="userRegion4"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br>
|
<br>
|
||||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp"%>
|
<%@include file="/WEB-INF/include/form/areaInfo.jsp"%>
|
||||||
<br>
|
<br>
|
||||||
@@ -679,7 +691,7 @@ var processAction=function(configType,obj){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<%-- </div> --%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user