Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into develop
This commit is contained in:
@@ -49,7 +49,6 @@ public class AppPolicyCfg extends BaseCfg<AppPolicyCfg> {
|
||||
@ExcelField(title="ratelimit",dictType="APP_RATE_LIMIT",sort=3)
|
||||
private String userRegion2;
|
||||
private String userRegion3;
|
||||
@ExcelField(title="block_by_app_server_ip",dictType="SYS_YES_NO",sort=4)
|
||||
private String userRegion4;
|
||||
private String userRegion5;
|
||||
private String configType;
|
||||
|
||||
@@ -50,9 +50,22 @@ public class UserManage extends BaseEntity<UserManage>{
|
||||
private String seltype;
|
||||
private Integer functionId;
|
||||
private String isAudit;
|
||||
private String cgiError;
|
||||
private String errorType;
|
||||
|
||||
|
||||
|
||||
public String getErrorType() {
|
||||
return errorType;
|
||||
}
|
||||
public void setErrorType(String errorType) {
|
||||
this.errorType = errorType;
|
||||
}
|
||||
public String getCgiError() {
|
||||
return cgiError;
|
||||
}
|
||||
public void setCgiError(String cgiError) {
|
||||
this.cgiError = cgiError;
|
||||
}
|
||||
public String getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
@@ -400,14 +400,14 @@ public class HttpClientUtil {
|
||||
//获取响应结果
|
||||
Builder header = wt.request(MediaType.APPLICATION_JSON).header("Content-Type", MediaType.APPLICATION_JSON);
|
||||
response= header.get();
|
||||
int status = response.getStatus();
|
||||
result= response.readEntity(String.class);
|
||||
//调用处理数据方法
|
||||
logger.info("获取消息成功,相应内容如下: " + result);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("获取消息失败,相应内容如下: " + result);
|
||||
logger.error("获取消息失败 ", e);
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:");
|
||||
throw new MaatConvertException("<spring:message code=\"cgi_service_failed\"/>:");
|
||||
}finally {
|
||||
if (response != null) {
|
||||
response.close();
|
||||
|
||||
@@ -172,7 +172,7 @@ public class AppCfgController extends BaseController {
|
||||
@RequiresPermissions(value={"app:policy:config"})
|
||||
public String policyCfgForm(Model model,String ids,AppPolicyCfg entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),null);
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
@@ -227,7 +227,7 @@ public class AppCfgController extends BaseController {
|
||||
AppPolicyCfg entity = new AppPolicyCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
|
||||
@@ -108,7 +108,7 @@ public class BasicProtocolController extends BaseController {
|
||||
@RequiresPermissions(value={"basicprotocol:config"})
|
||||
public String policyCfgForm(Model model,String ids,AppPolicyCfg entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),null);
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
@@ -166,7 +166,7 @@ public class BasicProtocolController extends BaseController {
|
||||
AppPolicyCfg entity = new AppPolicyCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
@@ -255,7 +255,7 @@ public class BasicProtocolController extends BaseController {
|
||||
classMap.put(entity.getMenuNameCode(), AppPolicyCfg.class);
|
||||
classMap.put("NTC_IP", IpPortCfg.class);
|
||||
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
|
||||
String cfgIndexInfoNoExport=",ratelimit,block_by_app_server_ip,encrypted_tunnel_behavior,behaviour_type,social_app,behaviour_type,expression_type,match_method,whether_hexbinary,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport=",encrypted_tunnel_behavior,behaviour_type,social_app,behaviour_type,expression_type,match_method,whether_hexbinary,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
|
||||
@@ -130,7 +130,7 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
||||
@RequiresPermissions(value={"encryptedtunnelbehav:config"})
|
||||
public String policyCfgForm(Model model,String ids,AppPolicyCfg entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),null);
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
@@ -187,7 +187,7 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
||||
AppPolicyCfg entity = new AppPolicyCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
@@ -293,7 +293,7 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
||||
classMap.put(entity.getMenuNameCode(), AppPolicyCfg.class);
|
||||
classMap.put("NTC_IP", IpPortCfg.class);
|
||||
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
|
||||
String cfgIndexInfoNoExport=",ratelimit,block_by_app_server_ip,social_app,basic_protocol,expression_type,match_method,whether_hexbinary,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport=",social_app,basic_protocol,expression_type,match_method,whether_hexbinary,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.nis.web.controller.configuration.maintenance;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
@@ -20,6 +23,8 @@ import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.domain.configuration.UserManage;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -30,11 +35,16 @@ public class UserManageController extends BaseController{
|
||||
@RequestMapping(value = {"/list"})
|
||||
@RequiresPermissions(value={"user:manage:view"})
|
||||
public String list(Model model,HttpServletRequest request,HttpServletResponse response
|
||||
,@ModelAttribute("cfg")UserManage entity
|
||||
,RedirectAttributes redirectAttributes){
|
||||
,@ModelAttribute("cfg")UserManage entity){
|
||||
Page<UserManage> page = userManageService.findPage(new Page<UserManage>(request, response,"r"), entity);
|
||||
if(!StringUtil.isEmpty(entity.getErrorType())){
|
||||
if("create".equals(entity.getErrorType())){
|
||||
Properties msgProp = getMsgProp();
|
||||
String error=msgProp.getProperty("user")+" "+entity.getCgiError()+" "+msgProp.getProperty("vpn_ip")+" "+msgProp.getProperty("save_failed");
|
||||
model.addAttribute("message", error);
|
||||
}
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
// initPageCondition(model,entity);
|
||||
return "/cfg/maintenance/userManage/list";
|
||||
}
|
||||
|
||||
@@ -80,18 +90,49 @@ public class UserManageController extends BaseController{
|
||||
public String save(Model model,HttpServletRequest request,HttpServletResponse response
|
||||
,String ids,UserManage entity
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
try{
|
||||
userManageService.save(entity,model,request);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
return "redirect:" + adminPath +"/maintenance/userManage/list";
|
||||
Date createTime=new Date();
|
||||
String errorIp="";
|
||||
String errorType="";
|
||||
if(entity.getId()==null){
|
||||
entity.setCreateTime(createTime);
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
entity.setIsValid(Constants.VALID_NO);
|
||||
String[] ipArray =entity.getServerIp().split(",");
|
||||
for (String ip : ipArray) {
|
||||
userManageService.saveip(entity,ip,model,request);
|
||||
}
|
||||
UserManage oldUser=userManageService.getUserByLoginName(entity.getUserName());
|
||||
if(oldUser!=null){
|
||||
String[] ips=oldUser.getServerIp().split(",");
|
||||
String erorIp =userManageService.getMessageIp(ipArray, ips);
|
||||
if(!StringUtil.isEmpty(erorIp)){
|
||||
errorType="create";
|
||||
errorIp=entity.getUserName()+" "+erorIp;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
entity.setEditTime(createTime);
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
String[] ipArray =entity.getServerIp().split(",");
|
||||
UserManage oldUser=userManageService.getUserById(String.valueOf(entity.getId()));
|
||||
int num=0;
|
||||
for (String ip : ipArray) {
|
||||
userManageService.updateip(entity,ip,num,model,request);
|
||||
num++;
|
||||
}
|
||||
UserManage user=userManageService.getUserById(String.valueOf(entity.getId()));
|
||||
if(user!=null){
|
||||
String[] ips=user.getServerIp().split(",");
|
||||
String erorIp =userManageService.getMessageIp(ipArray, ips);
|
||||
if(!StringUtil.isEmpty(erorIp)){
|
||||
errorType="create";
|
||||
errorIp=user.getUserName()+" "+erorIp;
|
||||
}
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/maintenance/userManage/list?cgiError="+errorIp+"&errorType="+errorType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 验证登录名是否有效
|
||||
* @param oldLoginName
|
||||
|
||||
@@ -20,10 +20,13 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.AvFileSampleCfg;
|
||||
import com.nis.domain.configuration.AvVoipAccountCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.DdosIpCfg;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.DdosIpCfg;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
@@ -47,7 +50,7 @@ public class DdosCfgController extends BaseController {
|
||||
@RequiresPermissions(value={"ddos:ip:config"})
|
||||
public String form(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")DdosIpCfg cfg){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg = ddosCfgService.getDdosIpCfg(Long.parseLong(ids));
|
||||
cfg = ddosCfgService.getDdosIpCfg(Long.parseLong(ids),null);
|
||||
initUpdateFormCondition(model, cfg);
|
||||
}else{
|
||||
initFormCondition(model,cfg);
|
||||
@@ -145,5 +148,24 @@ public class DdosCfgController extends BaseController {
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据索引表信息异步获取子表信息
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/ajaxDdosInfo"})
|
||||
public String getDdosInfo(Model model,Long cfgId,Integer index,Integer compileId) {
|
||||
DdosIpCfg cfg = ddosCfgService.getDdosIpCfg(cfgId, compileId);
|
||||
List<String[]> tabList = new ArrayList();
|
||||
//获取DdosIpCfg信息
|
||||
String cfgType = null;
|
||||
if(!cfg.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"1",cfg.getCfgType()});
|
||||
cfgType = cfg.getCfgType();
|
||||
}
|
||||
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/ddosSubList";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AvFileSampleCfg;
|
||||
import com.nis.domain.configuration.AvSignSampleCfg;
|
||||
import com.nis.domain.configuration.AvSignSampleCfgModel;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
@@ -116,17 +118,57 @@ public class AvController extends BaseController {
|
||||
//return "/cfg/av/signSampleList";
|
||||
return "/cfg/av/switchSignSample";
|
||||
}
|
||||
// 日志获取样例获取域配置信息
|
||||
@RequestMapping(value = {"ajaxSignSampleList"})
|
||||
public String ajaxSignSampleList(Model model,Long cfgId,Integer index,Integer compileId) {
|
||||
List<String[]> tabList = new ArrayList<String[]>();
|
||||
AvSignSampleCfg cfg = new AvSignSampleCfg();
|
||||
cfg.setCfgId(cfgId);
|
||||
cfg.setCompileId(compileId);
|
||||
List<AvSignSampleCfg> list = avCfgService.getSignSampleList(cfg);
|
||||
if(list!=null){
|
||||
cfg=list.get(0);
|
||||
}
|
||||
cfg.setCfgType("5");
|
||||
String cfgType = null;
|
||||
if(cfg.getCfgType()!=null){
|
||||
tabList.add(new String[]{"5",cfg.getCfgType()});
|
||||
cfgType = cfg.getCfgType();
|
||||
}
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/av/switchSignSampleSubList";
|
||||
}
|
||||
|
||||
//文件样例配置界面
|
||||
@RequestMapping(value = {"/sample/fileSampleForm"})
|
||||
public String fileSampleForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,AvFileSampleCfg entity){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
entity = avCfgService.getAvFileSampleById(Long.parseLong(ids));
|
||||
entity = avCfgService.getAvFileSampleById(Long.parseLong(ids),null);
|
||||
}
|
||||
|
||||
initFormCondition(model,entity);
|
||||
model.addAttribute("_cfg", entity);
|
||||
return "/cfg/av/fileSampleForm";
|
||||
}
|
||||
// 日志获取样例获取域配置信息
|
||||
@RequestMapping(value = {"ajaxfileSampleList"})
|
||||
public String ajaxAvContIpList(Model model,Long cfgId,Integer index,Integer compileId) {
|
||||
AvFileSampleCfg cfg = avCfgService.getAvFileSampleById(cfgId,compileId);
|
||||
List<String[]> tabList = new ArrayList<String[]>();
|
||||
if(cfg!=null){
|
||||
String cfgType = null;
|
||||
if(!cfg.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"5",cfg.getCfgType()});
|
||||
cfgType = cfg.getCfgType();
|
||||
}
|
||||
}
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/av/fileSampleSubList";
|
||||
}
|
||||
//标志样例配置界面
|
||||
@RequestMapping(value = {"/sample/audioSignSampleForm"})
|
||||
public String audioSignSampleForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,AvSignSampleCfg entity){
|
||||
@@ -293,7 +335,7 @@ public class AvController extends BaseController {
|
||||
AvFileSampleCfg entity = new AvFileSampleCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = avCfgService.getAvFileSampleById(Long.parseLong(id));
|
||||
entity = avCfgService.getAvFileSampleById(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
|
||||
@@ -55,7 +55,7 @@ public class BgpCfgController extends BaseController{
|
||||
@RequiresPermissions(value={"other:bgp:config"})
|
||||
public String bgpForm(Model model,String ids,CfgIndexInfo entity,RedirectAttributes redirectAttributes) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = bgpCfgService.getBgpCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = bgpCfgService.getBgpCfg(Long.parseLong(ids),null);
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
@@ -134,7 +134,7 @@ public class BgpCfgController extends BaseController{
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = bgpCfgService.getBgpCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = bgpCfgService.getBgpCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
|
||||
@@ -66,7 +66,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
@RequiresPermissions(value={"fileTransfer:ftp:config"})
|
||||
public String ftpForm(Model model,String compileIds,String ids,CfgIndexInfo entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = fileTransferCfgService.getFtpCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = fileTransferCfgService.getFtpCfg(Long.parseLong(ids),null);
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
@@ -163,7 +163,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = fileTransferCfgService.getFtpCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = fileTransferCfgService.getFtpCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
@@ -203,7 +203,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
@RequiresPermissions(value={"fileTransfer:fileDigest:config"})
|
||||
public String fileDigestForm(Model model,String ids,FileDigestCfg entity,RedirectAttributes redirectAttributes) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = fileTransferCfgService.getFileDigestCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = fileTransferCfgService.getFileDigestCfg(Long.parseLong(ids),null);
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
@@ -335,7 +335,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
public String p2pForm(Model model,String ids,CfgIndexInfo entity) {
|
||||
// 跳转操作页面(根据ids判断是新增 or 修改)
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(ids),null);
|
||||
|
||||
// 添加配置域Key,用于修改页面区分各域配置
|
||||
P2pHashCfg hashCfg = new P2pHashCfg();
|
||||
@@ -454,7 +454,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
|
||||
@@ -61,7 +61,7 @@ public class MailCfgController extends BaseController{
|
||||
@RequiresPermissions(value={"mail:config"})
|
||||
public String mailForm(Model model,String ids,CfgIndexInfo entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = mailCfgService.getMailCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = mailCfgService.getMailCfg(Long.parseLong(ids),null);
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
@@ -168,7 +168,7 @@ public class MailCfgController extends BaseController{
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = mailCfgService.getMailCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = mailCfgService.getMailCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
|
||||
@@ -80,7 +80,7 @@ public class WebsiteController extends BaseController{
|
||||
@RequiresPermissions(value={"website:http:config"})
|
||||
public String httpForm(Model model,String ids,CfgIndexInfo entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = websiteCfgService.getHttpCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = websiteCfgService.getHttpCfg(Long.parseLong(ids),null);
|
||||
|
||||
//设置http各类配置的配置域类型
|
||||
IpPortCfg ipCfg = new IpPortCfg();
|
||||
@@ -212,7 +212,7 @@ public class WebsiteController extends BaseController{
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = websiteCfgService.getHttpCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = websiteCfgService.getHttpCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
@@ -243,7 +243,7 @@ public class WebsiteController extends BaseController{
|
||||
@RequiresPermissions(value={"website:ssl:config"})
|
||||
public String sslForm(Model model,String ids,CfgIndexInfo entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = websiteCfgService.getSslCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = websiteCfgService.getSslCfg(Long.parseLong(ids),null);
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
@@ -307,7 +307,7 @@ public class WebsiteController extends BaseController{
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = websiteCfgService.getSslCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = websiteCfgService.getSslCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
@@ -335,7 +335,7 @@ public class WebsiteController extends BaseController{
|
||||
@RequiresPermissions(value={"website:dns:config"})
|
||||
public String dnsForm(Model model,String ids,CfgIndexInfo entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = websiteCfgService.getDnsCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = websiteCfgService.getDnsCfg(Long.parseLong(ids),null);
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
@@ -400,7 +400,7 @@ public class WebsiteController extends BaseController{
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = websiteCfgService.getDnsCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = websiteCfgService.getDnsCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
|
||||
@@ -81,7 +81,7 @@ public class WhiteListController extends CommonController{
|
||||
public String ipForm(Model model,String ids,CfgIndexInfo entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
|
||||
entity = this.ipCfgService.getIpPortCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = this.ipCfgService.getIpPortCfg(Long.parseLong(ids),null);
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
@@ -100,7 +100,7 @@ public class WhiteListController extends CommonController{
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = ipCfgService.getIpPortCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = ipCfgService.getIpPortCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
@@ -157,7 +157,7 @@ public class WhiteListController extends CommonController{
|
||||
@RequiresPermissions(value={"whitelist:domain:config"})
|
||||
public String domainForm(Model model,String ids,CfgIndexInfo entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = domainService.getDomainCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = domainService.getDomainCfg(Long.parseLong(ids),null);
|
||||
HttpUrlCfg urlCfg = new HttpUrlCfg();
|
||||
urlCfg.setCfgType(Constants.HTTP_URL_REGION);
|
||||
entity.setHttpUrl(urlCfg);
|
||||
@@ -234,7 +234,7 @@ public class WhiteListController extends CommonController{
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = domainService.getDomainCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = domainService.getDomainCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
|
||||
@@ -70,7 +70,7 @@ public class HttpRedirectPolicyController extends BaseController{
|
||||
,logical=Logical.OR)
|
||||
public String form(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")CfgIndexInfo entity){
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(ids),entity.getCompileId());
|
||||
entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(ids),null);
|
||||
|
||||
HttpUrlCfg urlCfg = new HttpUrlCfg();
|
||||
urlCfg.setCfgType(Constants.HTTP_REDIRECT_URL_REGION);
|
||||
@@ -227,7 +227,7 @@ public class HttpRedirectPolicyController extends BaseController{
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(id),entity.getCompileId());
|
||||
entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(id),null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.AvFileSampleCfg;
|
||||
import com.nis.domain.configuration.AvSignSampleCfg;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
@@ -9,7 +11,7 @@ import com.nis.web.dao.MyBatisDao;
|
||||
@MyBatisDao
|
||||
public interface AvCfgDao {
|
||||
|
||||
public AvFileSampleCfg getAvFileSampleById(Long cfgId);
|
||||
public AvFileSampleCfg getAvFileSampleById(@Param("cfgId")Long cfgId,@Param("compileId")Integer compileId);
|
||||
public AvSignSampleCfg getAvSignSampleById(Long cfgId);
|
||||
public List<AvFileSampleCfg> getAvFileSampleList(AvFileSampleCfg entity);
|
||||
public List<AvSignSampleCfg> getAvSignSampleList(AvSignSampleCfg entity);
|
||||
|
||||
@@ -81,11 +81,18 @@
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.cfg_type,a.cfg_region_code,a.LEVEL,a.do_log
|
||||
</sql>
|
||||
|
||||
<select id="getAvFileSampleById" resultMap="AvFileSampleMap" parameterType="java.lang.Long" >
|
||||
<select id="getAvFileSampleById" resultMap="AvFileSampleMap">
|
||||
SELECT
|
||||
<include refid="AvFileSample_Column" />
|
||||
FROM av_file_sample_cfg a
|
||||
WHERE a.CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
<where>
|
||||
<if test="cfgId !=null">
|
||||
CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getAvSignSampleById" resultMap="AvSignSampleMap" parameterType="java.lang.Long" >
|
||||
|
||||
@@ -83,6 +83,7 @@ public interface ConfigSynchronizationDao {
|
||||
public List<DnsResStrategy> getDnsStrategyList(BaseCfg entity);
|
||||
public List<DnsIpCfg> getDnsIpCfgList(BaseCfg entity);
|
||||
public List<IpPortCfg> getIpPortListByService(BaseCfg entity);
|
||||
public List<IpPortCfg> getIpDropList(@Param("tableName")String tableName,@Param("compileIds")List compileIds);
|
||||
|
||||
public List<AppPolicyCfg> getAppPolicyList(BaseCfg entity);
|
||||
public List<AppFeatureIndex> getAppFeatureIndexList(BaseCfg entity);
|
||||
|
||||
@@ -744,8 +744,24 @@
|
||||
a.antiddos_protocol,a.bps_threadshold
|
||||
</sql>
|
||||
<sql id="IpCfg_Column" >
|
||||
a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
,a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type,a.compile_id
|
||||
a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port,
|
||||
a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type,a.compile_id
|
||||
</sql>
|
||||
<sql id="IpCfg_AllColumn" >
|
||||
a.cfg_id,a.cfg_desc,a.action,a.is_valid,a.is_audit,a.creator_id,a.audit_time,
|
||||
a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||
a.area_effective_ids,a.function_id,a.do_log,a.dns_strategy_id,a.user_region1,a.user_region2,
|
||||
a.user_region3,a.user_region4,a.user_region5,
|
||||
a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port,
|
||||
a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type
|
||||
</sql>
|
||||
<sql id="IpDropCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.action,a.is_valid,a.is_audit,a.creator_id,a.audit_time,
|
||||
a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||
a.area_effective_ids,a.function_id,a.user_region1,a.user_region2,
|
||||
a.user_region3,a.user_region4,a.user_region5,
|
||||
a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port,
|
||||
a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type
|
||||
</sql>
|
||||
<sql id="AsnIpCfg_Column" >
|
||||
a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
@@ -979,6 +995,17 @@
|
||||
</foreach>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getIpDropList" resultMap="ipPortMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="IpDropCfg_Column" />
|
||||
FROM ${tableName} a
|
||||
<where>
|
||||
and a.compile_id in
|
||||
<foreach collection="compileIds" index="index" item="compileId" open="(" separator="," close=")">
|
||||
#{compileId}
|
||||
</foreach>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getAppIpPortList" resultMap="ipPortMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="AppIpCfg_Column" />
|
||||
@@ -1217,12 +1244,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getIpPortListByService" resultMap="ipPortMap" >
|
||||
select
|
||||
a.cfg_id,a.cfg_desc,a.action,a.is_valid,a.is_audit,a.creator_id,a.audit_time,
|
||||
a.service_id,a.request_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||
a.area_effective_ids,a.function_id,a.do_log,a.user_region1,a.user_region2,
|
||||
a.user_region3,a.user_region4,a.user_region5,
|
||||
<include refid="IpCfg_Column"></include>
|
||||
<include refid="IpCfg_AllColumn"></include>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,u.name as auditor_name
|
||||
<if test="serviceId==1028">
|
||||
|
||||
@@ -12,5 +12,5 @@ import com.nis.web.dao.MyBatisDao;
|
||||
@MyBatisDao
|
||||
public interface DdosCfgDao extends CrudDao<DdosIpCfg> {
|
||||
List<DdosIpCfg> findPage(DdosIpCfg cfg);
|
||||
DdosIpCfg getDdosIpCfg(Long cfgId);
|
||||
DdosIpCfg getDdosIpCfg(@Param("cfgId")Long cfgId,@Param("compileId")Integer compileId);
|
||||
}
|
||||
|
||||
@@ -182,7 +182,14 @@
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
from ddos_ip_cfg r
|
||||
where r.cfg_id=#{cfgId}
|
||||
<where>
|
||||
<if test="cfgId !=null">
|
||||
CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.DdosIpCfg" >
|
||||
|
||||
@@ -52,8 +52,8 @@ public class AvCfgService extends BaseService{
|
||||
@Autowired
|
||||
protected AvCfgDao avCfgDao;
|
||||
|
||||
public AvFileSampleCfg getAvFileSampleById(Long cfgId){
|
||||
return avCfgDao.getAvFileSampleById(cfgId);
|
||||
public AvFileSampleCfg getAvFileSampleById(Long cfgId,Integer compileId){
|
||||
return avCfgDao.getAvFileSampleById(cfgId,compileId);
|
||||
}
|
||||
public AvSignSampleCfg getAvSignSampleById(Long cfgId){
|
||||
return avCfgDao.getAvSignSampleById(cfgId);
|
||||
@@ -112,7 +112,7 @@ public class AvCfgService extends BaseService{
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
}else{
|
||||
AvFileSampleCfg oldEntity = this.getAvFileSampleById(entity.getCfgId());
|
||||
AvFileSampleCfg oldEntity = this.getAvFileSampleById(entity.getCfgId(),entity.getCompileId());
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
entity.setIsValid(0);
|
||||
|
||||
@@ -54,6 +54,7 @@ import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.ServiceConfigTemplateUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.CommonPolicyDao;
|
||||
@@ -286,7 +287,7 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
//批量获取regionId,groupId(相同编译下的IP类配置多条ip只获取一个组号),分组复用的域配置不需要重新获取regionId,groupId
|
||||
List<Integer> regionIds = ConfigServiceUtil.getId(3, ipList.size()+strList.size()+complexStrList.size()+numList.size()+fileList.size());
|
||||
List<Integer> groupIds = ConfigServiceUtil.getId(2, strList.size()+complexStrList.size()+numList.size()+fileList.size());
|
||||
List<Integer> groupIds = ConfigServiceUtil.getId(2, ipList.size()+strList.size()+complexStrList.size()+numList.size()+fileList.size());
|
||||
for(CfgIndexInfo cfg:list){
|
||||
maatCfg = new MaatCfg();
|
||||
maatCfg.initDefaultValue();
|
||||
@@ -350,14 +351,15 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
}
|
||||
if(ipList.size()>0){
|
||||
List<Integer> ipGroupId = ConfigServiceUtil.getId(2,1);//多条IP只获取一个groupId
|
||||
// List<Integer> ipGroupId = ConfigServiceUtil.getId(2,1);//多条IP只获取一个groupId
|
||||
for(int index=0;index<ipList.size();index++){
|
||||
IpPortCfg ip = ipList.get(index);
|
||||
if(ip.getCompileId().equals(cfg.getCompileId())){
|
||||
// BeanUtils.copyProperties(cfg, ip);
|
||||
ip.setRegionId(regionIds.get(0));
|
||||
regionIds.remove(0);
|
||||
ip.setGroupId(ipGroupId.get(0));
|
||||
ip.setGroupId(groupIds.get(0));
|
||||
groupIds.remove(0);
|
||||
ip.setIsValid(entity.getIsValid());
|
||||
ip.setAuditTime(StringUtil.isEmpty(entity.getAuditTime()) ? cfg.getAuditTime():entity.getAuditTime());
|
||||
list1.add(ip);
|
||||
@@ -523,7 +525,8 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
}else {
|
||||
//调用服务接口配置全量更新
|
||||
// JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
|
||||
// FileUtils.writeToFile("d:\\configSync\\"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".txt", json, false);
|
||||
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
|
||||
}
|
||||
}
|
||||
return hasData;
|
||||
@@ -591,7 +594,7 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
//批量获取regionId,groupId(相同编译下的IP类配置多条ip只获取一个组号),compileIds.size()表示app策略本身有一个字符串域
|
||||
List<Integer> regionIds = ConfigServiceUtil.getId(3, ipList.size()+strList.size()+compileIds.size()+complexStrList.size()+numList.size()+fileList.size());
|
||||
List<Integer> groupIds = ConfigServiceUtil.getId(2, strList.size()+compileIds.size()+complexStrList.size()+numList.size()+fileList.size());
|
||||
List<Integer> groupIds = ConfigServiceUtil.getId(2, ipList.size()+strList.size()+compileIds.size()+complexStrList.size()+numList.size()+fileList.size());
|
||||
for(AppPolicyCfg cfg:list){
|
||||
maatCfg = new MaatCfg();
|
||||
maatCfg.initDefaultValue();
|
||||
@@ -661,14 +664,15 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
|
||||
|
||||
if(ipList.size()>0){
|
||||
List<Integer> ipGroupId = ConfigServiceUtil.getId(2,1);//多条IP只获取一个groupId
|
||||
// List<Integer> ipGroupId = ConfigServiceUtil.getId(2,1);//多条IP只获取一个groupId
|
||||
for(int index=0;index<ipList.size();index++){
|
||||
IpPortCfg ip = ipList.get(index);
|
||||
if(ip.getCompileId().equals(cfg.getCompileId())){
|
||||
// BeanUtils.copyProperties(cfg, ip);
|
||||
ip.setRegionId(regionIds.get(0));
|
||||
regionIds.remove(0);
|
||||
ip.setGroupId(ipGroupId.get(0));
|
||||
ip.setGroupId(groupIds.get(0));
|
||||
groupIds.remove(0);
|
||||
ip.setIsValid(entity.getIsValid());
|
||||
ip.setAuditTime(StringUtil.isEmpty(entity.getAuditTime()) ? cfg.getAuditTime():entity.getAuditTime());
|
||||
list1.add(ip);
|
||||
@@ -800,7 +804,8 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
}else {
|
||||
//调用服务接口配置全量更新
|
||||
// JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
|
||||
// FileUtils.writeToFile("d:\\configSync\\"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".txt", json, false);
|
||||
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
|
||||
}
|
||||
}
|
||||
return hasData;
|
||||
@@ -870,7 +875,7 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
//批量获取regionId,groupId(相同编译下的IP类配置多条ip只获取一个组号),分组复用的域配置不需要重新获取regionId,groupId
|
||||
List<Integer> regionIds = ConfigServiceUtil.getId(3, ipList.size()+strList.size()+complexStrList.size()+numList.size()+fileList.size());
|
||||
List<Integer> groupIds = ConfigServiceUtil.getId(2, strList.size()+complexStrList.size()+numList.size()+fileList.size());
|
||||
List<Integer> groupIds = ConfigServiceUtil.getId(2, ipList.size()+strList.size()+complexStrList.size()+numList.size()+fileList.size());
|
||||
for(AppFeatureIndex cfg:list){
|
||||
maatCfg = new MaatCfg();
|
||||
maatCfg.initDefaultValue();
|
||||
@@ -917,14 +922,15 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
}
|
||||
if(ipList.size()>0){
|
||||
List<Integer> ipGroupId = ConfigServiceUtil.getId(2,1);//多条IP只获取一个groupId
|
||||
// List<Integer> ipGroupId = ConfigServiceUtil.getId(2,1);//多条IP只获取一个groupId
|
||||
for(int index=0;index<ipList.size();index++){
|
||||
IpPortCfg ip = ipList.get(index);
|
||||
if(ip.getCompileId().equals(cfg.getCompileId())){
|
||||
// BeanUtils.copyProperties(cfg, ip);
|
||||
ip.setRegionId(regionIds.get(0));
|
||||
regionIds.remove(0);
|
||||
ip.setGroupId(ipGroupId.get(0));
|
||||
ip.setGroupId(groupIds.get(0));
|
||||
groupIds.remove(0);
|
||||
ip.setIsValid(entity.getIsValid());
|
||||
ip.setAuditTime(StringUtil.isEmpty(entity.getAuditTime()) ? cfg.getAuditTime():entity.getAuditTime());
|
||||
list1.add(ip);
|
||||
@@ -1055,7 +1061,8 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
}else {
|
||||
//调用服务接口配置全量更新
|
||||
// JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
|
||||
// FileUtils.writeToFile("d:\\configSync\\"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".txt", json, false);
|
||||
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
|
||||
}
|
||||
}
|
||||
return hasData;
|
||||
@@ -1263,6 +1270,7 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
}else {
|
||||
//调用服务接口配置全量更新
|
||||
// FileUtils.writeToFile("d:\\configSync\\"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".txt", json, false);
|
||||
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
|
||||
}
|
||||
|
||||
@@ -1447,7 +1455,8 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
}else {
|
||||
//调用服务接口配置全量更新
|
||||
// JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
|
||||
// FileUtils.writeToFile("d:\\configSync\\"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".txt", json, false);
|
||||
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1564,7 +1573,8 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
}else {
|
||||
//调用服务接口配置全量更新
|
||||
// JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
|
||||
// FileUtils.writeToFile("d:\\configSync\\"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".txt", json, false);
|
||||
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1619,63 +1629,81 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
configCompileList = new ArrayList();
|
||||
List list = new ArrayList();
|
||||
List newList = new ArrayList();
|
||||
if(className.equals("AvFileSampleCfg")){
|
||||
list = configSynchronizationDao.getAvFileCfgList(entity);
|
||||
}else if(className.equals("PxyObjKeyring")){
|
||||
list = configSynchronizationDao.getPxyObjKeyringCfgList(entity);
|
||||
if(entity.getServiceId().equals(3)){//ip drop回调类配置用了主表和子表关系
|
||||
list = configSynchronizationDao.getCfgIndexList(entity);
|
||||
List<Integer> compileIds = Lists.newArrayList();
|
||||
for(int i=0;i<list.size();i++){
|
||||
PxyObjKeyring cfg = (PxyObjKeyring) list.get(i);
|
||||
newList.add(convertCallBackProxyObjKeyring(cfg));
|
||||
CfgIndexInfo cfg = (CfgIndexInfo) list.get(i);
|
||||
compileIds.add(cfg.getCompileId());
|
||||
}
|
||||
}else if(className.equals("PxyObjTrustedCaCert")){
|
||||
list = configSynchronizationDao.getPxyObjTrustedCertCfgList(entity);
|
||||
for(int i=0;i<list.size();i++){
|
||||
PxyObjTrustedCaCert cfg = (PxyObjTrustedCaCert) list.get(i);
|
||||
newList.add(convertCallBackProxyObjTrustedCa(cfg,null));
|
||||
}
|
||||
}else if(className.equals("PxyObjTrustedCaCrl")){
|
||||
list = configSynchronizationDao.getPxyObjTrustedCrlCfgList(entity);
|
||||
for(int i=0;i<list.size();i++){
|
||||
PxyObjTrustedCaCrl cfg = (PxyObjTrustedCaCrl) list.get(i);
|
||||
newList.add(convertCallBackProxyObjTrustedCa(null,cfg));
|
||||
}
|
||||
}else if(className.equals("DnsResStrategy")){
|
||||
list = configSynchronizationDao.getDnsStrategyList(entity);
|
||||
for(int i=0;i<list.size();i++){
|
||||
DnsResStrategy cfg = (DnsResStrategy) list.get(i);
|
||||
newList.add(convertCallBackDnsResStrategy(cfg));
|
||||
}
|
||||
}else if(className.equals("DnsIpCfg")){
|
||||
list = configSynchronizationDao.getDnsIpCfgList(entity);
|
||||
for(int i=0;i<list.size();i++){
|
||||
DnsIpCfg cfg = (DnsIpCfg) list.get(i);
|
||||
List subList = configSynchronizationDao.getIpDropList("ip_port_cfg", compileIds);
|
||||
for(int i=0;i<subList.size();i++){
|
||||
IpPortCfg cfg = (IpPortCfg) subList.get(i);
|
||||
newList.add(convertCallBackIp(cfg,cfg.getGroupId()));
|
||||
}
|
||||
}else if(className.equals("IpPortCfg")){
|
||||
list = configSynchronizationDao.getIpPortListByService(entity);
|
||||
for(int i=0;i<list.size();i++){
|
||||
IpPortCfg cfg = (IpPortCfg) list.get(i);
|
||||
newList.add(convertCallBackIp(cfg,cfg.getGroupId()));
|
||||
}else{
|
||||
if(className.equals("AvFileSampleCfg")){
|
||||
list = configSynchronizationDao.getAvFileCfgList(entity);
|
||||
}else if(className.equals("PxyObjKeyring")){
|
||||
list = configSynchronizationDao.getPxyObjKeyringCfgList(entity);
|
||||
for(int i=0;i<list.size();i++){
|
||||
PxyObjKeyring cfg = (PxyObjKeyring) list.get(i);
|
||||
newList.add(convertCallBackProxyObjKeyring(cfg));
|
||||
}
|
||||
}else if(className.equals("PxyObjTrustedCaCert")){
|
||||
list = configSynchronizationDao.getPxyObjTrustedCertCfgList(entity);
|
||||
for(int i=0;i<list.size();i++){
|
||||
PxyObjTrustedCaCert cfg = (PxyObjTrustedCaCert) list.get(i);
|
||||
newList.add(convertCallBackProxyObjTrustedCa(cfg,null));
|
||||
}
|
||||
}else if(className.equals("PxyObjTrustedCaCrl")){
|
||||
list = configSynchronizationDao.getPxyObjTrustedCrlCfgList(entity);
|
||||
for(int i=0;i<list.size();i++){
|
||||
PxyObjTrustedCaCrl cfg = (PxyObjTrustedCaCrl) list.get(i);
|
||||
newList.add(convertCallBackProxyObjTrustedCa(null,cfg));
|
||||
}
|
||||
}else if(className.equals("DnsResStrategy")){
|
||||
list = configSynchronizationDao.getDnsStrategyList(entity);
|
||||
for(int i=0;i<list.size();i++){
|
||||
DnsResStrategy cfg = (DnsResStrategy) list.get(i);
|
||||
newList.add(convertCallBackDnsResStrategy(cfg));
|
||||
}
|
||||
}else if(className.equals("DnsIpCfg")){
|
||||
list = configSynchronizationDao.getDnsIpCfgList(entity);
|
||||
for(int i=0;i<list.size();i++){
|
||||
DnsIpCfg cfg = (DnsIpCfg) list.get(i);
|
||||
newList.add(convertCallBackIp(cfg,cfg.getGroupId()));
|
||||
}
|
||||
}else if(className.equals("IpPortCfg")){
|
||||
list = configSynchronizationDao.getIpPortListByService(entity);
|
||||
for(int i=0;i<list.size();i++){
|
||||
IpPortCfg cfg = (IpPortCfg) list.get(i);
|
||||
newList.add(convertCallBackIp(cfg,cfg.getGroupId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
page.setList(list);
|
||||
if(page.isLastPage()){
|
||||
hasData = false;
|
||||
}
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(newList);
|
||||
if(isUpdateCfg) {
|
||||
logger.info("配置批量下发:"+json);
|
||||
//调用服务接口同步回调类配置
|
||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
if(result!=null){
|
||||
logger.info("配置批量下发响应信息:"+result.getMsg());
|
||||
if(newList.size()>0){
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(newList);
|
||||
if(isUpdateCfg) {
|
||||
logger.info("配置批量下发:"+json);
|
||||
//调用服务接口同步回调类配置
|
||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
if(result!=null){
|
||||
logger.info("配置批量下发响应信息:"+result.getMsg());
|
||||
}
|
||||
}else {
|
||||
// logger.info("回调类配置同步:"+json);
|
||||
// FileUtils.writeToFile("d:\\configSync\\"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".txt", json, false);
|
||||
//调用服务接口同步回调类配置
|
||||
JSONObject result = ConfigServiceUtil.configSync(json,2,entity.getServiceId(),entity.getTableName(),(hasData?null:"FINISHED"));
|
||||
// logger.info("回调类配置同步:"+result.getMsg());
|
||||
}
|
||||
}else {
|
||||
logger.info("回调类配置同步:"+json);
|
||||
//调用服务接口同步回调类配置
|
||||
JSONObject result = ConfigServiceUtil.configSync(json,2,entity.getServiceId(),entity.getTableName(),(hasData?null:"FINISHED"));
|
||||
// logger.info("回调类配置同步:"+result.getMsg());
|
||||
}
|
||||
|
||||
return hasData;
|
||||
|
||||
@@ -62,8 +62,8 @@ public class DdosCfgService extends BaseService{
|
||||
return page;
|
||||
}
|
||||
|
||||
public DdosIpCfg getDdosIpCfg(Long cfgId) {
|
||||
return ddosCfgDao.getDdosIpCfg(cfgId);
|
||||
public DdosIpCfg getDdosIpCfg(Long cfgId,Integer compileId) {
|
||||
return ddosCfgDao.getDdosIpCfg(cfgId,compileId);
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdate(DdosIpCfg entity){
|
||||
@@ -224,7 +224,7 @@ public class DdosCfgService extends BaseService{
|
||||
public void audit(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime) throws Exception{
|
||||
DdosIpCfg entity = new DdosIpCfg();
|
||||
|
||||
entity=ddosCfgDao.getDdosIpCfg(Long.valueOf(id));
|
||||
entity=ddosCfgDao.getDdosIpCfg(Long.valueOf(id),entity.getCompileId());
|
||||
List<DdosIpCfg> list = new ArrayList();
|
||||
|
||||
entity.setCfgId(Long.valueOf(id));
|
||||
@@ -265,7 +265,7 @@ public class DdosCfgService extends BaseService{
|
||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||
|
||||
|
||||
entity=this.getDdosIpCfg(entity.getCfgId());
|
||||
entity=this.getDdosIpCfg(entity.getCfgId(),entity.getCompileId());
|
||||
|
||||
if(entity.getIsAudit()==1){
|
||||
List<DdosIpCfg> ipList=new ArrayList<DdosIpCfg>();
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -9,20 +11,28 @@ import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.session.ExecutorType;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.eclipse.jetty.util.ajax.JSON;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.ui.Model;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.UserManage;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.dao.configuration.AppCfgDao;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
import com.nis.web.dao.configuration.UserManageDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
import com.nis.web.service.SpringContextHolder;
|
||||
|
||||
@Service
|
||||
public class UserManageService extends BaseService{
|
||||
@@ -45,77 +55,128 @@ public class UserManageService extends BaseService{
|
||||
return userManageDao.getUserById(id);
|
||||
}
|
||||
|
||||
public void save(UserManage entity,Model model, HttpServletRequest request){
|
||||
Date createTime=new Date();
|
||||
if(entity.getId()==null){
|
||||
public static String getMessageIp(String[] oldIp,String[] ip){
|
||||
String ips=null;
|
||||
for (int i = 0; i < oldIp.length; i++) {
|
||||
boolean flag=true;
|
||||
for (int j = 0; j < ip.length; j++) {
|
||||
if(oldIp[i].equals(ip[j])){
|
||||
flag=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
if(ips==null){
|
||||
ips=oldIp[i];
|
||||
}else{
|
||||
ips=ips+","+oldIp[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
return ips;
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveip(UserManage entity,String ips,Model model, HttpServletRequest request){
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try {
|
||||
entity.setCreateTime(createTime);
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
entity.setIsValid(Constants.VALID_NO);
|
||||
userManageDao.insert(entity);
|
||||
//cgi接口添加
|
||||
String[] ipArray = entity.getServerIp().split(",");
|
||||
for(String ip :ipArray){
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
UserManage user=userManageDao.getUserByLoginName(entity.getUserName());
|
||||
if(user==null){
|
||||
entity.setServerIp(ips);
|
||||
((UserManageDao) batchSqlSession.getMapper(UserManageDao.class)).insert(entity);
|
||||
}else{
|
||||
user.setServerIp(user.getServerIp()+","+ips);
|
||||
((UserManageDao) batchSqlSession.getMapper(UserManageDao.class)).update(user);
|
||||
}
|
||||
//cgi接口添加
|
||||
//循环调用接口增加
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("server_ip", ip);
|
||||
params.put("server_ip", ips);
|
||||
params.put("user_name", entity.getUserName());
|
||||
params.put("user_pwd", entity.getUserPwd());
|
||||
Map<String,String> map=getUrl(params,Constants.NTC_IP_REUSE_USER_CREATE,request);
|
||||
//返回处理
|
||||
}
|
||||
} catch (MaatConvertException e) {
|
||||
String url =Constants.IP_REUSE_CALL_CGI_URL+ Constants.NTC_IP_REUSE_USER_CREATE ;
|
||||
String recv = HttpClientUtil.getCGI(url, params, request);
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
map = (Map<String, String>) JSON.parse(recv);
|
||||
String error = map.get("error");
|
||||
if (!StringUtil.isEmpty(error)) {
|
||||
batchSqlSession.rollback();
|
||||
} else {
|
||||
batchSqlSession.commit();
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
}else{
|
||||
try {
|
||||
entity.setEditTime(createTime);
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
//获取修改之前数据
|
||||
UserManage olduser=userManageDao.getUserById(String.valueOf(entity.getId()));
|
||||
userManageDao.update(entity);
|
||||
//cgi接口删除旧数据
|
||||
String[] ipArray = olduser.getServerIp().split(",");
|
||||
for(String ip :ipArray){
|
||||
//循环调用接口删除
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("server_ip", ip);
|
||||
params.put("user_name", olduser.getUserName());
|
||||
Map<String,String> map=getUrl(params,Constants.NTC_IP_REUSE_USER_DELETE,request);
|
||||
//返回处理
|
||||
|
||||
} finally {
|
||||
if (batchSqlSession != null) {
|
||||
batchSqlSession.close();
|
||||
}
|
||||
if(StringUtil.isEmpty(entity.getUserName())){
|
||||
entity.setUserName(olduser.getUserName());
|
||||
}
|
||||
if(StringUtil.isEmpty(entity.getUserPwd())){
|
||||
entity.setUserPwd(olduser.getUserPwd());
|
||||
}
|
||||
String[] newIpArray = entity.getServerIp().split(",");
|
||||
for(String newIp :newIpArray){
|
||||
//循环调用接口添加
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("server_ip", newIp);
|
||||
params.put("user_name", entity.getUserName());
|
||||
params.put("user_pwd", entity.getUserPwd());
|
||||
Map<String,String> map=getUrl(params,Constants.NTC_IP_REUSE_USER_CREATE,request);
|
||||
//返回处理
|
||||
}
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void updateip(UserManage entity,String ips,int num,Model model, HttpServletRequest request){
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try {
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
if(num==0){
|
||||
UserManage olduser=userManageDao.getUserById(String.valueOf(entity.getId()));
|
||||
//接口旧数据删除
|
||||
//cgi接口删除旧数据
|
||||
String[] ipArray = olduser.getServerIp().split(",");
|
||||
for(String ip :ipArray){
|
||||
//循环调用接口删除
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("server_ip", ip);
|
||||
params.put("user_name", olduser.getUserName());
|
||||
Map<String,String> map=getUrl(params,Constants.NTC_IP_REUSE_USER_DELETE,request);
|
||||
//返回处理
|
||||
}
|
||||
entity.setServerIp(ips);
|
||||
((UserManageDao) batchSqlSession.getMapper(UserManageDao.class)).update(entity);
|
||||
}else{
|
||||
UserManage user=userManageDao.getUserById(String.valueOf(entity.getId()));
|
||||
user.setServerIp(user.getServerIp()+","+ips);
|
||||
((UserManageDao) batchSqlSession.getMapper(UserManageDao.class)).update(user);
|
||||
}
|
||||
// cgi接口添加
|
||||
// 循环调用接口增加
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("server_ip", ips);
|
||||
params.put("user_name", entity.getUserName());
|
||||
params.put("user_pwd", entity.getUserPwd());
|
||||
String url = Constants.IP_REUSE_CALL_CGI_URL + Constants.NTC_IP_REUSE_USER_CREATE;
|
||||
String recv = HttpClientUtil.getCGI(url, params, request);
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
map = (Map<String, String>) JSON.parse(recv);
|
||||
String error = map.get("error");
|
||||
if (!StringUtil.isEmpty(error)) {
|
||||
batchSqlSession.rollback();
|
||||
} else {
|
||||
batchSqlSession.commit();
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (batchSqlSession != null) {
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Map<String,String> getUrl(Map<String, Object> params,String urlType,HttpServletRequest request){
|
||||
Map<String,String> map=new HashMap<String,String>();
|
||||
try{
|
||||
String url =Constants.IP_REUSE_CALL_CGI_URL+ urlType ;
|
||||
String recv = HttpClientUtil.getCGI(url, params, request);
|
||||
logger.info("查询结果:" + recv);
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
map=(Map<String,String>)JSON.parse(recv);
|
||||
}
|
||||
@@ -134,7 +195,6 @@ public class UserManageService extends BaseService{
|
||||
try{
|
||||
String url =Constants.IP_REUSE_CALL_CGI_URL+ Constants.NTC_IP_REUSE_USER_GET ;
|
||||
String recv = HttpClientUtil.getCGI(url, params, request);
|
||||
logger.info("查询结果:" + recv);
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
map=(Map<String,String>)JSON.parse(recv);
|
||||
}
|
||||
|
||||
@@ -1336,4 +1336,5 @@ ip_total=IP Total
|
||||
available_ip_total=Available IP Total
|
||||
address_pool_id=Address Pool ID
|
||||
log_to_cfg=Config
|
||||
address_pool_is_used=Address pool is used and cannot perform this operation!
|
||||
address_pool_is_used=Address pool is used and cannot perform this operation!
|
||||
cgi_service_failed=Request CGI server failed
|
||||
@@ -1322,16 +1322,17 @@ user_info=\u7528\u6237\u4FE1\u606F
|
||||
user_list=\u7528\u6237\u5217\u8868
|
||||
equal_password=\u5BC6\u7801\u4E0D\u4E00\u81F4\uFF01
|
||||
outgoing_unicast_packets=\u4E0A\u4F20\u6570\u636E\u5305\u6570
|
||||
outgoing_unicast_total_size=\u4E0A\u4F20\u6570\u636E\u5305\u6570\u603B\u91CF
|
||||
outgoing_broadcast_packets=\u4E0A\u4F20\u5B57\u8282\u6570
|
||||
outgoing_broadcast_total_size=\u4E0A\u4F20\u5B57\u8282\u6570\u603B\u91CF
|
||||
outgoing_unicast_total_size=\u4E0A\u4F20\u5B57\u8282\u6570
|
||||
outgoing_broadcast_packets=outgoing_broadcast_packets
|
||||
outgoing_broadcast_total_size=outgoing_broadcast_total_size
|
||||
incoming_unicast_packets=\u4E0B\u8F7D\u6570\u636E\u5305\u6570
|
||||
incoming_unicast_total_size=\u4E0B\u8F7D\u6570\u636E\u5305\u6570\u603B\u91CF
|
||||
incoming_broadcast_packets=\u4E0B\u8F7D\u5B57\u8282\u6570
|
||||
incoming_broadcast_total_size=\u4E0B\u8F7D\u5B57\u8282\u6570\u603B\u91CF
|
||||
incoming_unicast_total_size=\u4E0B\u8F7D\u6570\u636E\u5B57\u8282\u6570
|
||||
incoming_broadcast_packets=incoming_broadcast_packets
|
||||
incoming_broadcast_total_size=incoming_broadcast_total_size
|
||||
address_pool=\u5730\u5740\u6C60
|
||||
ip_total=IP\u603B\u6570
|
||||
available_ip_total=\u53EF\u7528IP\u6570
|
||||
address_pool_id=\u5730\u5740\u6C60ID
|
||||
log_to_cfg=\u914D\u7F6E
|
||||
address_pool_is_used=\u5730\u5740\u6C60\u5DF2\u88AB\u4F7F\u7528\uFF0C\u65E0\u6CD5\u6267\u884C\u8BE5\u64CD\u4F5C\uFF01
|
||||
log_to_cfg=\u914D\u7F6E
|
||||
address_pool_is_used=\u5730\u5740\u6C60\u5DF2\u88AB\u4F7F\u7528\uFF0C\u65E0\u6CD5\u6267\u884C\u8BE5\u64CD\u4F5C\uFF01
|
||||
cgi_service_failed=\u8BF7\u6C42CGI\u670D\u52A1\u63A5\u53E3\u5931\u8D25
|
||||
@@ -18,7 +18,9 @@
|
||||
<serviceCfg cfgType="1" tableName="asn_ip_cfg" groupReuse="true" groupId="userRegion4"></serviceCfg>
|
||||
<userRegion regionKey="ASN_ID" regionColumn="userRegion5" userRegionPosition="0" ></userRegion>
|
||||
</service>
|
||||
<service id="3" functionId="5" serviceType="2" tableName="ip_port_cfg" className="IpPortCfg" desc="IP丢弃"/>
|
||||
<service id="3" functionId="5" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="IP丢弃">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
</service>
|
||||
<service id="514" functionId="5" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="IP限速">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="0"></userRegion>
|
||||
@@ -86,14 +88,14 @@
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="mail_keyword_cfg" ></serviceCfg>
|
||||
</service>
|
||||
<service id="132" functionId="34" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="邮件地址监测">
|
||||
<!--<service id="132" functionId="34" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="邮件地址监测">
|
||||
<serviceCfg cfgType="2" tableName="mail_keyword_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
</service>
|
||||
<service id="20" functionId="34" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="邮件地址封堵">
|
||||
<serviceCfg cfgType="2" tableName="mail_keyword_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
</service>
|
||||
</service>-->
|
||||
<service id="132" functionId="35" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="邮件地址监测">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="mail_keyword_cfg" ></serviceCfg>
|
||||
@@ -174,7 +176,7 @@
|
||||
</service>
|
||||
<service id="512" functionId="200" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="IP拦截监测">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<userRegion regionKey="keyring_id" regionColumn="userRegion1" handleType="none" ></userRegion>
|
||||
<userRegion regionKey="keyring_id" regionColumn="userRegion1" userRegionPosition="0" ></userRegion>
|
||||
</service>
|
||||
<service id="521" functionId="200" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="IP拦截白名单">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
@@ -262,48 +264,45 @@
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<userRegion regionKey="PROTO_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="1"></userRegion>
|
||||
</service>
|
||||
<service id="33" functionId="63" serviceType="1" tableName="app_policy_cfg" className="AppPolicyCfg" desc="APP封堵">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="BEHAV_ID" regionColumn="behavCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="0"></userRegion>
|
||||
</service>
|
||||
<service id="145" functionId="63" serviceType="1" tableName="app_policy_cfg" className="AppPolicyCfg" desc="APP监测">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="BEHAV_ID" regionColumn="behavCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="0"></userRegion>
|
||||
</service>
|
||||
<service id="1056" functionId="63" serviceType="1" tableName="app_policy_cfg" className="AppPolicyCfg" desc="APP限速">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="BEHAV_ID" regionColumn="behavCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="0"></userRegion>
|
||||
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="1"></userRegion>
|
||||
</service>
|
||||
<service id="36" functionId="408" serviceType="1" tableName="app_policy_cfg" className="AppPolicyCfg" desc="隧道协议行为封堵">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="BEHAV_ID" regionColumn="behavCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="0"></userRegion>
|
||||
</service>
|
||||
<service id="148" functionId="408" serviceType="1" tableName="app_policy_cfg" className="AppPolicyCfg" desc="隧道协议行为监测">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="BEHAV_ID" regionColumn="behavCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="0"></userRegion>
|
||||
</service>
|
||||
<service id="1060" functionId="408" serviceType="1" tableName="app_policy_cfg" className="AppPolicyCfg" desc="隧道协议行为限速">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="BEHAV_ID" regionColumn="behavCode" userRegionPosition="1"></userRegion>
|
||||
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="0"></userRegion>
|
||||
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="1"></userRegion>
|
||||
</service>
|
||||
<service id="1028" functionId="405" serviceType="1" cfgType="1" tableName="app_ip_cfg" className="AppIpCfg" desc="APP IP特征">
|
||||
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<mapping path="/nis/ntc/whitelist/ajax*" exclue="true"/>
|
||||
<mapping path="/nis/app/feature/ajax*" exclue="true"/>
|
||||
<mapping path="/nis/proxy/cache/ajax*" exclue="true"/>
|
||||
<mapping path="/nis/manipulation/ddos/ajax*" exclue="true"/>
|
||||
<!-- 对同一路径,启用多个装饰器 -->
|
||||
<mapping>
|
||||
<path>/articles/*</path>
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
<th><spring:message code="behaviour_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -446,7 +446,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">
|
||||
|
||||
@@ -357,7 +357,7 @@
|
||||
<th><spring:message code="label"/></th>
|
||||
<th class="sort-column r.is_valid"><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
@@ -500,7 +500,7 @@
|
||||
<span indexTable="${cfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span>
|
||||
</c:when></c:choose>
|
||||
</td>
|
||||
<td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
<th class="sort-column r.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -421,7 +421,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
<th><spring:message code="sample_file"/></th>
|
||||
<th><spring:message code="harm_level"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
@@ -350,7 +350,7 @@
|
||||
<span indexTable="${cfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span>
|
||||
</c:when></c:choose>
|
||||
</td>
|
||||
<td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
|
||||
|
||||
<td>${cfg.requestName }</td>
|
||||
|
||||
54
src/main/webapp/WEB-INF/views/cfg/av/fileSampleSubList.jsp
Normal file
54
src/main/webapp/WEB-INF/views/cfg/av/fileSampleSubList.jsp
Normal file
@@ -0,0 +1,54 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<script src="${pageContext.request.contextPath}/static/global/scripts/app.min.js" type="text/javascript"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
})
|
||||
</script>
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<c:forEach items="${tabList}" var="region" varStatus="regionStatus">
|
||||
<div id="${region[1]}Title${index}" onclick="switchSubCfgTabInfo('${region[1]}',${index})"
|
||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||
<spring:message code='${region[1]}' />
|
||||
<i id="${region[1]}${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<c:forEach items="${tabList}" var="region">
|
||||
<c:if test="${region[0] eq 5 }">
|
||||
<c:set value="${_cfg}" var="cfg"></c:set>
|
||||
<c:if test="${region[1] eq cfg.cfgType }">
|
||||
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='src_file' />:</label>
|
||||
<a href="javascript:;" data-original-title="${cfg.srcUrl}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(cfg.srcUrl,100)}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='sample_file' />:</label>
|
||||
<a href="${cfg.sampleUrl }" target="_blank" data-original-title="${cfg.sampleUrl }"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fn:substring(cfg.sampleUrl,0,100) }
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</html>
|
||||
@@ -358,7 +358,7 @@
|
||||
<th><spring:message code="label"/></th>
|
||||
<th class="sort-column r.is_valid" ><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
@@ -502,7 +502,7 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
<th class="sort-column r.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -419,7 +419,7 @@
|
||||
<span indexTable="${cfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span>
|
||||
</c:when></c:choose>
|
||||
</td>
|
||||
<td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
<th><spring:message code="label"/></th>
|
||||
<th class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></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>
|
||||
@@ -416,7 +416,7 @@
|
||||
<span indexTable="${cfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span>
|
||||
</c:when></c:choose>
|
||||
</td>
|
||||
<td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<script src="${pageContext.request.contextPath}/static/global/scripts/app.min.js" type="text/javascript"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
})
|
||||
</script>
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<c:forEach items="${tabList}" var="region" varStatus="regionStatus">
|
||||
<div id="${region[1]}Title${index}" onclick="switchSubCfgTabInfo('${region[1]}',${index})"
|
||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||
<spring:message code='level' />
|
||||
<i id="${region[1]}${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<c:forEach items="${tabList}" var="region">
|
||||
<c:if test="${region[0] eq 5 }">
|
||||
<c:set value="${_cfg}" var="cfg"></c:set>
|
||||
<c:if test="${region[1] eq cfg.cfgType }">
|
||||
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='level'/>:</label>
|
||||
${cfg.level}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</html>
|
||||
@@ -365,7 +365,7 @@
|
||||
<th class="sort-column r.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -412,7 +412,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -380,7 +380,7 @@
|
||||
<th><spring:message code="basic_protocol"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -439,7 +439,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">
|
||||
|
||||
@@ -500,7 +500,7 @@
|
||||
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'cancel_approved'}"><span data-audit="cancel" class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<%-- <%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%> --%>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
|
||||
@@ -324,7 +324,7 @@
|
||||
<th class="sort-column r.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
|
||||
<th><spring:message code="antiddos_protocol"/></th>
|
||||
@@ -383,7 +383,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
|
||||
133
src/main/webapp/WEB-INF/views/cfg/ddosSubList.jsp
Normal file
133
src/main/webapp/WEB-INF/views/cfg/ddosSubList.jsp
Normal file
@@ -0,0 +1,133 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
})
|
||||
</script>
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<c:forEach items="${tabList}" var="region" varStatus="regionStatus">
|
||||
<div id="${region[1]}Title${index}" onclick="switchSubCfgTabInfo('${region[1]}',${index})"
|
||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||
<spring:message code='${region[1]}' />
|
||||
<i id="${region[1]}${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
</div>
|
||||
<c:forEach items="${tabList}" var="region">
|
||||
<c:if test="${region[0] eq 1 }">
|
||||
<c:set value="${_cfg}" var="cfg"></c:set>
|
||||
<c:if test="${region[1] eq cfg.cfgType }">
|
||||
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='ip_type'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
||||
<c:if test="${cfg.ipType==ipTypeC.itemCode}"> <spring:message code="${ipTypeC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='server_port'/>:</label> <label>${cfg.destPort }</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='ip_pattern'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
||||
<c:if test="${cfg.ipPattern==ipPatternC.itemCode}"> <spring:message code="${ipPatternC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='antiddos_protocol'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('ANTIDDOS_PROTOCOL')}" var="dicC">
|
||||
<c:if test="${cfg.antiddosProtocol eq dicC.itemCode}"> <spring:message code="${dicC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='client_ip'/>:</label>
|
||||
<label>
|
||||
${cfg.srcIpAddress}
|
||||
</label>
|
||||
</div>
|
||||
</div> --%>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='port_pattern'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
||||
<c:if test="${cfg.portPattern eq portPatternC.itemCode}"> <spring:message code="${portPatternC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='bps_threadshold'/>:</label> <label> ${cfg.bpsThreadshold}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='server_ip'/>:</label> <label> ${cfg.destIpAddress }</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='pps_threadshold'/>:</label> <label> ${cfg.ppsThreadshold }</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='direction'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('DIRECTION')}" var="directionC">
|
||||
<c:if test="${cfg.direction eq directionC.itemCode}"> <spring:message code="${directionC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='protocol'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
|
||||
<c:if test="${cfg.protocol eq protocolC.itemCode}"> <spring:message code="${protocolC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</html>
|
||||
@@ -377,7 +377,7 @@
|
||||
<th><spring:message code="behaviour_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -434,7 +434,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
<th class="sort-column a.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -391,7 +391,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
<th class="sort-column a.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -405,7 +405,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
<th class="sort-column a.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -407,7 +407,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="35" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${indexCfg.isAudit}" functionId="35" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -37,7 +37,42 @@
|
||||
$("#exportValue").val($("#intype").val());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$("td[addrPoolId]").each(function(){
|
||||
var td = $(this);
|
||||
var audit = $(this).attr("audit")
|
||||
var addrPoolId = $(this).attr("addrPoolId");
|
||||
var timeout=$.validator.messages.timeout;
|
||||
var failed=$.validator.messages.failed;
|
||||
// 判断是否为审核通过状态
|
||||
if(audit == 1){
|
||||
$.ajax({
|
||||
type:'get',
|
||||
timeout:10000,// 超时时间
|
||||
url:'http://192.168.11.137:8090/command/?cmd=IpNumGet&addr_pool_id='+addrPoolId,
|
||||
dataType:'json',
|
||||
async:true,
|
||||
success:function(data){
|
||||
//alert(JSON.stringify(data));
|
||||
$(td).html(data.num);
|
||||
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){
|
||||
if(status=="timeout"){
|
||||
$(td).html(timeout);
|
||||
}else if(status !="success"){
|
||||
$(td).html(failed);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}else {
|
||||
$(td).html(0);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -323,7 +358,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td>${cfg.ipTotal }</td>
|
||||
<td>${cfg.availableIpTotal }</td>
|
||||
<td audit="${cfg.isAudit}" addrPoolId="${cfg.addrPoolId }"><div class="loading-total"></div></td>
|
||||
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
|
||||
@@ -61,9 +61,10 @@
|
||||
html+="<table class='table table-bordered table-condensed text-nowrap' style='width: 100%;'>";
|
||||
html+="<thead>";
|
||||
html+="<th><spring:message code="user_name"/></th><th><spring:message code="vpn_ip"/></th><th><spring:message code="create_time"/></th><th><spring:message code="last_login"/></th><th><spring:message code="num_logins"/></th>";
|
||||
html+="<th><spring:message code="outgoing_unicast_packets"/></th><th><spring:message code="outgoing_unicast_total_size"/></th><th><spring:message code="outgoing_broadcast_packets"/></th>";
|
||||
html+="<th><spring:message code="outgoing_broadcast_total_size"/></th><th><spring:message code="incoming_unicast_packets"/></th><th><spring:message code="incoming_unicast_total_size"/></th>";
|
||||
html+="<th><spring:message code="incoming_broadcast_packets"/></th><th><spring:message code="incoming_broadcast_total_size"/></th>";
|
||||
html+="<th><spring:message code="outgoing_unicast_packets"/></th><th><spring:message code="outgoing_unicast_total_size"/></th>";
|
||||
/* html+="<th><spring:message code="outgoing_broadcast_packets"/></th><th><spring:message code="outgoing_broadcast_total_size"/></th>"; */
|
||||
html+="<th><spring:message code="incoming_unicast_packets"/></th><th><spring:message code="incoming_unicast_total_size"/></th>";
|
||||
/* html+="<th><spring:message code="incoming_broadcast_packets"/></th><th><spring:message code="incoming_broadcast_total_size"/></th>"; */
|
||||
html+="</thead>";
|
||||
html+="<tbody>";
|
||||
for(i=0;i<data.length;i++){
|
||||
@@ -83,18 +84,18 @@
|
||||
html+="</td>";
|
||||
html+="<td class='taskStatus'>"+(data[i].Outgoing_Unicast_Total_Size==null?"":data[i].Outgoing_Unicast_Total_Size);
|
||||
html+="</td>";
|
||||
html+="<td class='taskStatus'>"+(data[i].Outgoing_Broadcast_Packets==null?"":data[i].Outgoing_Broadcast_Packets);
|
||||
/* html+="<td class='taskStatus'>"+(data[i].Outgoing_Broadcast_Packets==null?"":data[i].Outgoing_Broadcast_Packets);
|
||||
html+="</td>";
|
||||
html+="<td class='taskStatus'>"+(data[i].Outgoing_Broadcast_Total_Size==null?"":data[i].Outgoing_Broadcast_Total_Size);
|
||||
html+="</td>";
|
||||
html+="</td>"; */
|
||||
html+="<td class='taskStatus'>"+(data[i].Incoming_Unicast_Packets==null?"":data[i].Incoming_Unicast_Packets);
|
||||
html+="</td>";
|
||||
html+="<td class='taskStatus'>"+(data[i].Incoming_Unicast_Total_Size==null?"":data[i].Incoming_Unicast_Total_Size);
|
||||
html+="</td>";
|
||||
html+="<td class='taskStatus'>"+(data[i].Incoming_Broadcast_Packets==null?"":data[i].Incoming_Broadcast_Packets);
|
||||
/* html+="<td class='taskStatus'>"+(data[i].Incoming_Broadcast_Packets==null?"":data[i].Incoming_Broadcast_Packets);
|
||||
html+="</td>";
|
||||
html+="<td class='taskStatus'>"+(data[i].Incoming_Broadcast_Total_Size==null?"":data[i].Incoming_Broadcast_Total_Size);
|
||||
html+="</td>";
|
||||
html+="</td>"; */
|
||||
html+="</tr>";
|
||||
}
|
||||
html+="</tbody>";
|
||||
|
||||
@@ -14,14 +14,15 @@
|
||||
return this.optional(element) || (tel.test(value));
|
||||
}, "用户名仅支持英文大小写、数字");
|
||||
$("#no").focus();
|
||||
$("#inputForm")
|
||||
|
||||
$("#inputForm")
|
||||
.validate(
|
||||
{
|
||||
rules : {
|
||||
userName : {
|
||||
remote : "${ctx}/maintenance/userManage/checkLoginName?oldUserName="
|
||||
+ encodeURIComponent('${user.userName}'),
|
||||
userCheck:true
|
||||
userCheck : true
|
||||
},
|
||||
},
|
||||
messages : {
|
||||
@@ -32,31 +33,23 @@
|
||||
equalTo : "<spring:message code='equal_password'/>"
|
||||
}
|
||||
},
|
||||
errorPlacement : function(error,element) {
|
||||
/* $("#messageBox").text("<spring:message code='enter_error'/>");
|
||||
if (element.is(":checkbox")|| element.is(":radio")|| element.parent().is(".input-append")) {
|
||||
error.appendTo(element.parent().parent());
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
} */
|
||||
$(element).parents(".form-group").find("div[for='"+ element.attr("name")+ "']").append(error);
|
||||
},
|
||||
submitHandler : function(form) {
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer : "#messageBox",
|
||||
errorPlacement : function(error,
|
||||
element) {
|
||||
$("#messageBox")
|
||||
.text(
|
||||
"<spring:message code='enter_error'/>");
|
||||
if (element.is(":checkbox")
|
||||
|| element.is(":radio")
|
||||
|| element
|
||||
.parent()
|
||||
.is(
|
||||
".input-append")) {
|
||||
error.appendTo(element
|
||||
.parent().parent());
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
}
|
||||
errorContainer : "#messageBox"
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -93,6 +86,7 @@
|
||||
</c:set>
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="vpn_ip" /></label>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
<div class="col-md-4">
|
||||
<sys:treeselect id="serverIp" name="serverIp"
|
||||
value="${user.serverIp}" labelName="user.serverIp"
|
||||
@@ -102,13 +96,13 @@
|
||||
url="/maintenance/userManage/treeData?isLeafShow=false&cfgType=3&specific=true" extId="0"
|
||||
checked="true" cssClass="form-control required" />
|
||||
</div>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
<div for="user.serverIp"></div>
|
||||
<div for="user.serverIp"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group hidden">
|
||||
<label class="col-md-3 control-label"><spring:message
|
||||
code="user_name" /></label>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
<div class="col-md-4">
|
||||
<select name="userType" data-live-search="true" class="selectpicker form-control required">
|
||||
<c:forEach items="${fns:getDictList('USER_TYPE')}" var="userTypes">
|
||||
@@ -116,12 +110,12 @@
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message
|
||||
code="user_name" /></label>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
<div class="col-md-4">
|
||||
<input id="oldUserName" name="oldUserName" type="hidden"
|
||||
value="${user.userName}">
|
||||
@@ -133,35 +127,37 @@
|
||||
<form:input path="userName" htmlEscape="false" maxlength="50"
|
||||
class="required form-control" />
|
||||
</div>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
<div for="userName"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message
|
||||
code="password" /></label>
|
||||
<c:if test="${empty user.id}">
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
</c:if>
|
||||
<div class="col-md-4">
|
||||
<input id="userPwd" name="userPwd" type="password" value=""
|
||||
maxlength="50" minlength="3"
|
||||
class="${empty user.id?'required':''} form-control" />
|
||||
</div>
|
||||
<c:if test="${empty user.id}">
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
</c:if>
|
||||
<c:if test="${not empty user.id}">
|
||||
<span class="help-inline"><spring:message
|
||||
code="nochange_blank" /></span>
|
||||
</c:if>
|
||||
<div for="userPwd"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message
|
||||
code="confirm_password"></spring:message></label>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
<div class="col-md-4">
|
||||
<input id="newUserPwd" name="newUserPwd" type="password"
|
||||
value="" maxlength="50" minlength="3" equalTo="#userPwd"
|
||||
class="form-control" />
|
||||
<c:if test="${empty user.id}"></c:if>
|
||||
</div>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
<div for="newUserPwd"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
<th class="sort-column a.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -405,7 +405,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -334,7 +334,7 @@
|
||||
<th><spring:message code="label"/></th>
|
||||
<th class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></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>
|
||||
@@ -446,7 +446,7 @@
|
||||
<c:when test="${indexCfg.isAudit eq '3'}"><span indexTable="${indexCfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>${indexCfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.editorName }</td>
|
||||
|
||||
@@ -567,7 +567,7 @@
|
||||
<th><spring:message code="do_log"/></th>
|
||||
</c:if>
|
||||
<c:if test="${action ne 128}">
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
</c:if>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
@@ -672,7 +672,7 @@
|
||||
</td>
|
||||
</c:if>
|
||||
<c:if test="${action ne 128}">
|
||||
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
</c:if>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
<th><spring:message code="match_method"/></th>
|
||||
<th class="sort-column r.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -343,7 +343,7 @@
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span indexTable="${cfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
<th><spring:message code="match_method"/></th>
|
||||
<th class="sort-column r.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -346,7 +346,7 @@
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span indexTable="${cfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${cfg.isAudit}" functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}" serviceId="${cfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
<th><spring:message code="policy_name"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -409,7 +409,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -515,7 +515,7 @@
|
||||
<th class="sort-column a.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -561,7 +561,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
<th class="sort-column a.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -402,7 +402,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
<th class="sort-column a.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<%-- <th><spring:message code="log_total"/></th> --%>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -384,7 +384,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="8" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<%-- <td audit="${indexCfg.isAudit}" functionId="8" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td> --%>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -20,7 +20,48 @@ $(document).ready(function(){
|
||||
.attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
var compileId=$(this).attr("compileId");
|
||||
// var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/manipulation/ddos/ajaxDdosInfo',
|
||||
data:{"compileId":compileId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -157,7 +198,6 @@ $(document).ready(function(){
|
||||
</div>
|
||||
<sys:message content="${message}" type="${messageTypes }"/>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap logTb">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -208,6 +248,7 @@ $(document).ready(function(){
|
||||
<c:forEach var="log" items="${page.list }" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="log-open-cfg" compileId="${log.cfgId }"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<a href="javascript:void(0)" name="viewLogInfo"><i class="icon-book-open"></i></a>
|
||||
</td>
|
||||
<td>${log.cfgId }</td>
|
||||
|
||||
@@ -20,7 +20,48 @@ $(document).ready(function(){
|
||||
.attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
var compileId=$(this).attr("compileId");
|
||||
// var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/av/ajaxSignSampleList',
|
||||
data:{"compileId":compileId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -212,6 +253,7 @@ $(document).ready(function(){
|
||||
<c:forEach var="log" items="${page.list }" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="log-open-cfg" compileId="${log.cfgId }"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<a href="javascript:void(0)" name="viewLogInfo"><i class="icon-book-open"></i></a>
|
||||
</td>
|
||||
<td>${log.cfgId }</td>
|
||||
|
||||
@@ -29,6 +29,49 @@
|
||||
"value", '');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
var compileId=$(this).attr("compileId");
|
||||
// var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/av/ajaxfileSampleList',
|
||||
data:{"compileId":compileId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -270,6 +313,7 @@
|
||||
<c:forEach var="log" items="${page.list }" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="log-open-cfg" compileId="${log.cfgId }"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<a href="javascript:void(0)" name="viewLogInfo"><i class="icon-book-open"></i></a>
|
||||
</td>
|
||||
<td>${log.cfgId }</td>
|
||||
|
||||
@@ -20,7 +20,48 @@ $(document).ready(function(){
|
||||
.attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
var compileId=$(this).attr("compileId");
|
||||
// var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/av/ajaxfileSampleList',
|
||||
data:{"compileId":compileId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -212,6 +253,7 @@ $(document).ready(function(){
|
||||
<c:forEach var="log" items="${page.list }" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="log-open-cfg" compileId="${log.cfgId }"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<a href="javascript:void(0)" name="viewLogInfo"><i class="icon-book-open"></i></a>
|
||||
</td>
|
||||
<td>${log.cfgId }</td>
|
||||
|
||||
@@ -20,7 +20,48 @@ $(document).ready(function(){
|
||||
.attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
var compileId=$(this).attr("compileId");
|
||||
// var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/av/ajaxfileSampleList',
|
||||
data:{"compileId":compileId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -212,6 +253,7 @@ $(document).ready(function(){
|
||||
<c:forEach var="log" items="${page.list }" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="log-open-cfg" compileId="${log.cfgId }"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<a href="javascript:void(0)" name="viewLogInfo"><i class="icon-book-open"></i></a>
|
||||
</td>
|
||||
<td>${log.cfgId }</td>
|
||||
|
||||
@@ -21,6 +21,48 @@ $(document).ready(function(){
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
var compileId=$(this).attr("compileId");
|
||||
// var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/av/ajaxfileSampleList',
|
||||
data:{"compileId":compileId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -211,6 +253,7 @@ $(document).ready(function(){
|
||||
<c:forEach var="log" items="${page.list }" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="log-open-cfg" compileId="${log.cfgId }"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<a href="javascript:void(0)" name="viewLogInfo"><i class="icon-book-open"></i></a>
|
||||
</td>
|
||||
<td>${log.cfgId }</td>
|
||||
|
||||
@@ -20,7 +20,48 @@ $(document).ready(function(){
|
||||
.attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
var compileId=$(this).attr("compileId");
|
||||
// var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/av/ajaxfileSampleList',
|
||||
data:{"compileId":compileId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -212,6 +253,7 @@ $(document).ready(function(){
|
||||
<c:forEach var="log" items="${page.list }" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="log-open-cfg" compileId="${log.cfgId }"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<a href="javascript:void(0)" name="viewLogInfo"><i class="icon-book-open"></i></a>
|
||||
</td>
|
||||
<td>${log.cfgId }</td>
|
||||
|
||||
@@ -21,6 +21,48 @@ $(document).ready(function(){
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
var compileId=$(this).attr("compileId");
|
||||
// var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/av/ajaxfileSampleList',
|
||||
data:{"compileId":compileId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -212,6 +254,7 @@ $(document).ready(function(){
|
||||
<c:forEach var="log" items="${page.list }" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="log-open-cfg" compileId="${log.cfgId }"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<a href="javascript:void(0)" name="viewLogInfo"><i class="icon-book-open"></i></a>
|
||||
</td>
|
||||
<td>${log.cfgId }</td>
|
||||
|
||||
@@ -20,7 +20,48 @@ $(document).ready(function(){
|
||||
.attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
var compileId=$(this).attr("compileId");
|
||||
// var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/av/ajaxfileSampleList',
|
||||
data:{"compileId":compileId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -218,6 +259,7 @@ $(document).ready(function(){
|
||||
<c:forEach var="log" items="${page.list }" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="log-open-cfg" compileId="${log.cfgId }"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<a href="javascript:void(0)" name="viewLogInfo"><i class="icon-book-open"></i></a>
|
||||
</td>
|
||||
<td>${log.cfgId }</td>
|
||||
|
||||
Reference in New Issue
Block a user