Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into develop

This commit is contained in:
duandongmei
2018-10-18 13:53:48 +08:00
37 changed files with 576 additions and 71 deletions

View File

@@ -56,6 +56,16 @@ public class InlineIp {
private Date opTime;
@Expose
private Integer policyGroup;
@Expose
private String userRegion;//用于存储协议跟流量阀值
public String getUserRegion() {
return userRegion;
}
public void setUserRegion(String userRegion) {
this.userRegion = userRegion;
}
/**
* action
* @return action

View File

@@ -22,6 +22,28 @@ public class DdosIpCfg extends BaseIpCfg {
*/
private static final long serialVersionUID = -5446903784736960824L;
private String antiddosProtocol;//目前支持TCP_SYN, DNS, NTP
private Long bpsThreadshold;// 即DDoS攻击保护动作触发阈值每秒Bit数和每秒包数
private Long ppsThreadshold;
public String getAntiddosProtocol() {
return antiddosProtocol;
}
public void setAntiddosProtocol(String antiddosProtocol) {
this.antiddosProtocol = antiddosProtocol;
}
public Long getBpsThreadshold() {
return bpsThreadshold;
}
public void setBpsThreadshold(Long bpsThreadshold) {
this.bpsThreadshold = bpsThreadshold;
}
public Long getPpsThreadshold() {
return ppsThreadshold;
}
public void setPpsThreadshold(Long ppsThreadshold) {
this.ppsThreadshold = ppsThreadshold;
}
}

View File

@@ -2,6 +2,7 @@ package com.nis.web.controller;
import java.beans.PropertyEditorSupport;
import java.io.IOException;
import java.lang.reflect.Field;
import java.net.URLEncoder;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -2237,6 +2238,11 @@ public class BaseController {
map.put("labels", labels);
String fileName = msgProp.getProperty(functionName, functionName)+"_"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
if(request.getHeader("User-Agent").toUpperCase().indexOf("MSIE")>0){
fileName = URLEncoder.encode(fileName, "UTF-8");
}else{
fileName = new String(fileName.getBytes("UTF-8"),"ISO8859-1");
}
new ExportExcel(msgProp,titleList,noExportMap,classMap,1).setDataList(msgProp,dataMap,map).write(response, fileName).dispose();
}
}

View File

@@ -456,4 +456,91 @@ public class FileTransferCfgController extends BaseController{
}
return "redirect:" + adminPath +"/ntc/fileTransfer/p2pList?functionId="+functionId;
}
//ftp配置导出
@RequestMapping(value = "exportftp")
public void exportdns(Model model,HttpServletRequest request,HttpServletResponse response,
@ModelAttribute("cfg")CfgIndexInfo entity,String ids,RedirectAttributes redirectAttributes){
try {
//export data info
List<String> titleList=new ArrayList<String>();
Map<String, Class<?>> classMap=new HashMap<String, Class<?>>();
Map<String, List> dataMap=new HashMap<String, List>();
Map<String, String> noExportMap=new HashMap<String, String>();
/*//导出选中记录
* if(!StringUtil.isEmpty(ids)){
for(String id:ids.split(",")){
Long.parseLong(id);
}
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
}else{*/
//条件导出数据大于最大导出数,只导出最大导出条数
entity.setTableName(IpPortCfg.getTablename());
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
pageInfo.setPageNo(1);
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
}else{
pageInfo.setPageNo(1);
pageInfo.setPageSize(-1);
}
Page<CfgIndexInfo> page = fileTransferCfgService.getFtpList(pageInfo, entity);
titleList.add(entity.getMenuNameCode());
titleList.add("NTC_IP");
titleList.add("NTC_FTP_URL");
titleList.add("NTC_FTP_CONTENT");
titleList.add("NTC_SUBSCRIBE_ID");
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
classMap.put("NTC_IP", IpPortCfg.class);
classMap.put("NTC_FTP_URL", BaseStringCfg.class);
classMap.put("NTC_FTP_CONTENT", BaseStringCfg.class);
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
String cfgIndexInfoNoExport=",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"
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
String ntcSubscribeIdCfgNoExport=",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"
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
String regionCfgNoExport=",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"
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
noExportMap.put("NTC_IP", ipPortInfoNoExport);
noExportMap.put("NTC_FTP_URL", regionCfgNoExport);
noExportMap.put("NTC_FTP_CONTENT", regionCfgNoExport);
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
List<BaseStringCfg> ftpkeyList=new ArrayList<BaseStringCfg>();
List<BaseStringCfg> ftpurlList=new ArrayList<BaseStringCfg>();
for (CfgIndexInfo cfg : page.getList()) {
Map<String, List> maps=fileTransferCfgService.exportftp(cfg);
ftpkeyList.addAll(maps.get("NTC_FTP_CONTENT"));
ftpurlList.addAll(maps.get("NTC_FTP_URL"));
ipList.addAll(maps.get("NTC_UNIVERSAL_IP"));
subscribeInfoList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
}
dataMap.put(entity.getMenuNameCode(), page.getList());
dataMap.put("NTC_IP", ipList);
dataMap.put("NTC_FTP_URL", ftpurlList);
dataMap.put("NTC_FTP_CONTENT", ftpkeyList);
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
} catch (Exception e) {
logger.error("ftp export failed",e);
addMessage(redirectAttributes, "export_failed");
}
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
}
}

View File

@@ -32,6 +32,7 @@ import com.nis.domain.configuration.NtcSubscribeIdCfg;
import com.nis.domain.maat.ToMaatResult;
import com.nis.exceptions.MaatConvertException;
import com.nis.util.ConfigServiceUtil;
import com.nis.util.Constants;
import com.nis.util.FileUtils;
import com.nis.util.JsonMapper;
import com.nis.web.controller.BaseController;
@@ -174,4 +175,100 @@ public class MailCfgController extends BaseController{
}
return "redirect:" + adminPath +"/ntc/mail/mailList?functionId="+functionId;
}
//mail配置导出
@RequestMapping(value = "exportmail")
public void exportdns(Model model,HttpServletRequest request,HttpServletResponse response,
@ModelAttribute("cfg")CfgIndexInfo entity,String ids,RedirectAttributes redirectAttributes){
try {
//export data info
List<String> titleList=new ArrayList<String>();
Map<String, Class<?>> classMap=new HashMap<String, Class<?>>();
Map<String, List> dataMap=new HashMap<String, List>();
Map<String, String> noExportMap=new HashMap<String, String>();
/*//导出选中记录
* if(!StringUtil.isEmpty(ids)){
for(String id:ids.split(",")){
Long.parseLong(id);
}
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
}else{*/
//条件导出数据大于最大导出数,只导出最大导出条数
entity.setTableName(IpPortCfg.getTablename());
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
pageInfo.setPageNo(1);
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
}else{
pageInfo.setPageNo(1);
pageInfo.setPageSize(-1);
}
Page<CfgIndexInfo> page = mailCfgService.getMailList(pageInfo, entity);
titleList.add(entity.getMenuNameCode());
String cfgIndexInfoNoExport=",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"
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
String ntcSubscribeIdCfgNoExport=",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"
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
String regionCfgNoExport=",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"
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
if(entity.getFunctionId()!=null){
if(entity.getFunctionId()!=37){
titleList.add("NTC_IP");
titleList.add("NTC_MAIL_BODY");
classMap.put("NTC_IP", IpPortCfg.class);
classMap.put("NTC_MAIL_BODY", ComplexkeywordCfg.class);
noExportMap.put("NTC_IP", ipPortInfoNoExport);
noExportMap.put("NTC_MAIL_BODY", regionCfgNoExport);
}
}
titleList.add("NTC_MAIL_HDR");
titleList.add("NTC_SUBSCRIBE_ID");
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
classMap.put("NTC_MAIL_HDR", ComplexkeywordCfg.class);
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
noExportMap.put("NTC_MAIL_HDR", regionCfgNoExport);
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
List<ComplexkeywordCfg> mailBodyList=new ArrayList<ComplexkeywordCfg>();
List<ComplexkeywordCfg> mailReqHdrList=new ArrayList<ComplexkeywordCfg>();
for (CfgIndexInfo cfg : page.getList()) {
Map<String, List> maps=mailCfgService.exportmail(cfg);
mailReqHdrList.addAll(maps.get("NTC_MAIL_HDR"));
mailBodyList.addAll(maps.get("NTC_MAIL_BODY"));
ipList.addAll(maps.get("NTC_UNIVERSAL_IP"));
subscribeInfoList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
}
if(entity.getFunctionId()!=null){
if(entity.getFunctionId()!=37){
dataMap.put("NTC_IP", ipList);
dataMap.put("NTC_MAIL_BODY", mailBodyList);
}
}
dataMap.put(entity.getMenuNameCode(), page.getList());
dataMap.put("NTC_MAIL_HDR", mailReqHdrList);
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
} catch (Exception e) {
logger.error("mail export failed",e);
addMessage(redirectAttributes, "export_failed");
}
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
}
}

View File

@@ -640,5 +640,83 @@ public class WebsiteController extends BaseController{
}
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId();
}
//dns配置导出
@RequestMapping(value = "exportdns")
public void exportdns(Model model,HttpServletRequest request,HttpServletResponse response,
@ModelAttribute("cfg")CfgIndexInfo entity,String ids,RedirectAttributes redirectAttributes){
try {
//export data info
List<String> titleList=new ArrayList<String>();
Map<String, Class<?>> classMap=new HashMap<String, Class<?>>();
Map<String, List> dataMap=new HashMap<String, List>();
Map<String, String> noExportMap=new HashMap<String, String>();
/*//导出选中记录
* if(!StringUtil.isEmpty(ids)){
for(String id:ids.split(",")){
Long.parseLong(id);
}
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
}else{*/
//条件导出数据大于最大导出数,只导出最大导出条数
entity.setTableName(IpPortCfg.getTablename());
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
pageInfo.setPageNo(1);
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
}else{
pageInfo.setPageNo(1);
pageInfo.setPageSize(-1);
}
Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(pageInfo, entity);
titleList.add(entity.getMenuNameCode());
titleList.add("NTC_IP");
titleList.add("NTC_DNS_REGION");
titleList.add("NTC_SUBSCRIBE_ID");
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
classMap.put("NTC_IP", IpPortCfg.class);
classMap.put("NTC_DNS_REGION", ComplexkeywordCfg.class);
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
String cfgIndexInfoNoExport=",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"
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
String ntcSubscribeIdCfgNoExport=",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"
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
String regionCfgNoExport=",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"
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
noExportMap.put("NTC_IP", ipPortInfoNoExport);
noExportMap.put("NTC_DNS_REGION", regionCfgNoExport);
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
List<ComplexkeywordCfg> regionInfoList=new ArrayList<ComplexkeywordCfg>();
for (CfgIndexInfo cfg : page.getList()) {
CfgIndexInfo cfgIndexInfo=websiteCfgService.exportdns(cfg);
ipList.addAll(cfgIndexInfo.getIpPortList());
subscribeInfoList.addAll(cfgIndexInfo.getNtcSubscribeIdCfgList());
regionInfoList.addAll(cfgIndexInfo.getDomainList());
}
dataMap.put(entity.getMenuNameCode(), page.getList());
dataMap.put("NTC_IP", ipList);
dataMap.put("NTC_DNS_REGION", regionInfoList);
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
} catch (Exception e) {
logger.error("dns export failed",e);
addMessage(redirectAttributes, "export_failed");
}
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
}
}

View File

@@ -286,7 +286,7 @@ public class WhiteListController extends CommonController{
titleList.add("NTC_IP");
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
classMap.put("NTC_IP", IpPortCfg.class);
String cfgIndexInfoNoExport=",group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
String cfgIndexInfoNoExport=",do_log,letter,whether_area_block,classification,attribute,label,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
String ipPortInfoNoExport=",protocol,direction,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"
@@ -308,6 +308,61 @@ public class WhiteListController extends CommonController{
}
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
}
//ip配置导出
@RequestMapping(value = "exportdomain")
public void exportdomain(Model model,HttpServletRequest request,HttpServletResponse response,
@ModelAttribute("cfg")CfgIndexInfo entity,String ids,RedirectAttributes redirectAttributes){
try {
//export data info
List<String> titleList=new ArrayList<String>();
Map<String, Class<?>> classMap=new HashMap<String, Class<?>>();
Map<String, List> dataMap=new HashMap<String, List>();
Map<String, String> noExportMap=new HashMap<String, String>();
/*//导出选中记录
* if(!StringUtil.isEmpty(ids)){
for(String id:ids.split(",")){
Long.parseLong(id);
}
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
}else{*/
//条件导出数据大于最大导出数,只导出最大导出条数
entity.setTableName(IpPortCfg.getTablename());
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
pageInfo.setPageNo(1);
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
}else{
pageInfo.setPageNo(1);
pageInfo.setPageSize(-1);
}
Page<CfgIndexInfo> page = domainService.getDomainList(pageInfo, entity);
titleList.add(entity.getMenuNameCode());
titleList.add("NTC_HTTP_URL");
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
String cfgIndexInfoNoExport=",do_log,letter,whether_area_block,classification,attribute,label,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
String httpUrlInfoNoExport=",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"
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
noExportMap.put("NTC_HTTP_URL", httpUrlInfoNoExport);
List<HttpUrlCfg> httpurlList=new ArrayList<HttpUrlCfg>();
for (CfgIndexInfo cfg : page.getList()) {
CfgIndexInfo cfgIndexInfo=domainService.exportDomainInfo(cfg);
httpurlList.addAll(cfgIndexInfo.getHttpUrlList());
}
dataMap.put(entity.getMenuNameCode(), page.getList());
dataMap.put("NTC_HTTP_URL", httpurlList);
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
} catch (Exception e) {
logger.error("ip white export failed",e);
addMessage(redirectAttributes, "export_failed");
}
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
}
}

View File

@@ -59,6 +59,9 @@ public class DdosLogController extends BaseController{
params.put("pageNo", page.getPageNo());
if(entry!=null&&entry.getIsBlock()!=null) {
params.put("searchIsBlock", entry.getIsBlock());
}else {
entry.setIsBlock(1);//默认保护ddos日志
params.put("searchIsBlock", entry.getIsBlock());
}
//查询值判断
initLogSearchValue(entry,params);

View File

@@ -34,6 +34,9 @@
<result column="function_id" property="functionId" jdbcType="INTEGER" />
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
<result column="antiddos_protocol" property="antiddosProtocol" jdbcType="VARCHAR" />
<result column="bps_threadshold" property="bpsThreadshold" jdbcType="BIGINT" />
<result column="pps_threadshold" property="ppsThreadshold" jdbcType="BIGINT" />
</resultMap>
<sql id="columns">
@@ -42,7 +45,7 @@
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable
,r.area_effective_ids,r.function_id,r.cfg_region_code
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.antiddos_protocol,r.bps_threadshold,r.pps_threadshold
</sql>
<select id="findPage" resultMap="ddosIpCfgMap">
@@ -213,7 +216,10 @@
dest_port,
dest_ip_address,
cfg_type,
cfg_region_code
cfg_region_code,
antiddos_protocol,
bps_threadshold,
pps_threadshold
)values (
#{cfgDesc,jdbcType=VARCHAR},
#{action,jdbcType=INTEGER},
@@ -245,7 +251,10 @@
#{destPort,jdbcType=VARCHAR},
#{destIpAddress,jdbcType=VARCHAR},
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER}
#{cfgRegionCode,jdbcType=INTEGER},
#{antiddosProtocol,jdbcType=VARCHAR},
#{bpsThreadshold,jdbcType=BIGINT},
#{ppsThreadshold,jdbcType=BIGINT}
)
</insert>
@@ -340,6 +349,9 @@
<if test="cfgRegionCode != null " >
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
</if>
antiddos_protocol = #{antiddosProtocol,jdbcType=VARCHAR},
bps_threadshold = #{bpsThreadshold,jdbcType=BIGINT},
pps_threadshold = #{ppsThreadshold,jdbcType=BIGINT}
</trim>
</set>
<where>

View File

@@ -909,61 +909,33 @@
update cfg_index_info
<set >
<trim suffixOverrides=",">
<if test="cfgDesc != null and cfgDesc != ''" >
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
</if>
<if test="action != null" >
action = #{action,jdbcType=INTEGER},
</if>
<if test="doLog != null" >
do_log = #{doLog,jdbcType=INTEGER},
</if>
<if test="isValid != null" >
is_valid = #{isValid,jdbcType=INTEGER},
</if>
<if test="isAudit != null" >
is_audit = #{isAudit,jdbcType=INTEGER},
</if>
<if test="creatorId != null" >
creator_id = #{creatorId,jdbcType=INTEGER},
</if>
<if test="createTime != null and createTime != ''" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="editorId != null" >
editor_id = #{editorId,jdbcType=INTEGER},
</if>
edit_time = #{editTime,jdbcType=TIMESTAMP},
<if test="serviceId != null" >
service_id = #{serviceId,jdbcType=INTEGER},
</if>
<if test="requestId != null" >
request_id = #{requestId,jdbcType=INTEGER},
</if>
<if test="isAreaEffective != null" >
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
</if>
<if test="classify != null and classify != ''" >
classify = #{classify,jdbcType=VARCHAR},
</if>
<if test="attribute != null and attribute != ''" >
attribute = #{attribute,jdbcType=VARCHAR},
</if>
<if test="lable != null and lable != ''" >
lable = #{lable,jdbcType=VARCHAR},
</if>
<if test="areaEffectiveIds != null" >
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
</if>
<if test="functionId != null" >
function_id = #{functionId,jdbcType=INTEGER},
</if>
user_region1 = #{userRegion1,jdbcType=VARCHAR},
user_region2 = #{userRegion2,jdbcType=VARCHAR},
user_region3 = #{userRegion3,jdbcType=VARCHAR},
user_region4 = #{userRegion4,jdbcType=VARCHAR},
user_region5 = #{userRegion5,jdbcType=VARCHAR},
dns_strategy_id = #{dnsStrategyId,jdbcType=INTEGER},
editor_id = #{editorId,jdbcType=INTEGER},
edit_time = #{editTime,jdbcType=TIMESTAMP},
service_id = #{serviceId,jdbcType=INTEGER},
request_id = #{requestId,jdbcType=INTEGER},
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
classify = #{classify,jdbcType=VARCHAR},
attribute = #{attribute,jdbcType=VARCHAR},
lable = #{lable,jdbcType=VARCHAR},
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
function_id = #{functionId,jdbcType=INTEGER},
user_region1 = #{userRegion1,jdbcType=VARCHAR},
user_region2 = #{userRegion2,jdbcType=VARCHAR},
user_region3 = #{userRegion3,jdbcType=VARCHAR},
user_region4 = #{userRegion4,jdbcType=VARCHAR},
user_region5 = #{userRegion5,jdbcType=VARCHAR},
dns_strategy_id = #{dnsStrategyId,jdbcType=INTEGER},
</trim>
</set>
where cfg_id = #{cfgId,jdbcType=BIGINT}

View File

@@ -3,12 +3,15 @@ package com.nis.web.service.configuration;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.google.gson.Gson;
import com.nis.domain.Page;
import com.nis.domain.callback.InlineIp;
import com.nis.domain.configuration.DdosIpCfg;
@@ -123,11 +126,19 @@ public class DdosCfgService extends BaseService{
ddosCfgDao.update(entity);
entity=ddosCfgDao.getDdosIpCfg(Long.valueOf(id));
String antiddosProtocol = entity.getAntiddosProtocol();
Long bpsThreadshold = entity.getBpsThreadshold();
Long ppsThreadshold = entity.getPpsThreadshold();
Map map= new HashMap();
map.put("protocol", antiddosProtocol);
map.put("bps_threadshold", bpsThreadshold);
map.put("pps_threadshold", ppsThreadshold);
String json="";
if(entity.getIsAudit()==1){
List<InlineIp> ipList=new ArrayList<InlineIp>();
InlineIp resStrategy=convertCallBackIp(entity,null);
resStrategy.setUserRegion(new Gson().toJson(map));
ipList.add(resStrategy);
//调用服务接口下发配置数据
json=gsonToJson(ipList);
@@ -145,6 +156,7 @@ public class DdosCfgService extends BaseService{
}else if(entity.getIsAudit()==3){
List<InlineIp> resStrategyList=new ArrayList<>();
InlineIp resStrategy=convertCallBackIp(entity,entity.getDnsStrategyId());
resStrategy.setUserRegion(new Gson().toJson(map));
resStrategyList.add(resStrategy);
//调用服务接口取消配置
json=gsonToJson(resStrategyList);

View File

@@ -16,6 +16,7 @@ import com.nis.domain.configuration.AreaIpCfg;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.HttpUrlCfg;
import com.nis.domain.configuration.IpPortCfg;
import com.nis.domain.configuration.NtcSubscribeIdCfg;
import com.nis.domain.maat.MaatCfg;
import com.nis.domain.maat.MaatCfg.DigestCfg;
@@ -23,6 +24,7 @@ import com.nis.domain.maat.MaatCfg.GroupCfg;
import com.nis.domain.maat.MaatCfg.IpCfg;
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
import com.nis.domain.maat.MaatCfg.StringCfg;
import com.nis.domain.specific.ConfigGroupInfo;
import com.nis.domain.maat.ToMaatBean;
import com.nis.domain.maat.ToMaatResult;
import com.nis.exceptions.MaatConvertException;
@@ -666,4 +668,10 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
page.setList(list);
return page;
}
public CfgIndexInfo exportDomainInfo(CfgIndexInfo entity){
List<HttpUrlCfg> httpUrlList = websiteCfgDao.getHttpUrlList(entity);
entity.setHttpUrlList(httpUrlList);
return entity;
}
}

View File

@@ -86,6 +86,23 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
entity.setStringList(keywordList);
return entity;
}
public Map<String, List> exportftp(CfgIndexInfo entity){
Map<String, List> dataMap=new HashMap<String, List>();
List<IpPortCfg> ipPortList = fileTransferCfgDao.getIpPortList(entity);
entity.setCfgType("NTC_FTP_CONTENT");
List<BaseStringCfg> keywordList = fileTransferCfgDao.getFtpKeywordList(entity);
entity.setCfgType("NTC_FTP_URL");
List<BaseStringCfg> urlwordList = fileTransferCfgDao.getFtpKeywordList(entity);
List<NtcSubscribeIdCfg> subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
dataMap.put("NTC_SUBSCRIBE_ID", subscribeIdList);
dataMap.put("NTC_FTP_CONTENT", keywordList);
dataMap.put("NTC_FTP_URL", urlwordList);
dataMap.put("NTC_UNIVERSAL_IP", ipPortList);
return dataMap;
}
/**
* 保存ftp配置
* @param entity

View File

@@ -20,6 +20,7 @@ import com.nis.domain.configuration.BaseStringCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.ComplexkeywordCfg;
import com.nis.domain.configuration.FileDigestCfg;
import com.nis.domain.configuration.HttpBodyCfg;
import com.nis.domain.configuration.IpPortCfg;
import com.nis.domain.configuration.MailKeywordCfg;
import com.nis.domain.configuration.NtcSubscribeIdCfg;
@@ -79,6 +80,22 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
entity.setAreaCfg(areaCfg);
return entity;
}
public Map<String, List> exportmail(CfgIndexInfo entity){
Map<String, List> dataMap=new HashMap<String, List>();
List<IpPortCfg> ipPortList = mailCfgDao.getIpPortList(entity);
entity.setCfgType("NTC_MAIL_HDR");
List<ComplexkeywordCfg> mailHdrList =mailCfgDao.getMailKeywordList(entity);
entity.setCfgType("NTC_MAIL_BODY");
List<ComplexkeywordCfg> mailBodyList = mailCfgDao.getMailKeywordList(entity);
List<NtcSubscribeIdCfg> subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
dataMap.put("NTC_SUBSCRIBE_ID", subscribeIdList);
dataMap.put("NTC_MAIL_BODY", mailBodyList);
dataMap.put("NTC_MAIL_HDR", mailHdrList);
dataMap.put("NTC_UNIVERSAL_IP", ipPortList);
return dataMap;
}
/**
* 保存mail配置
* @param entity

View File

@@ -33,6 +33,7 @@ import com.nis.domain.maat.MaatCfg.DigestCfg;
import com.nis.domain.maat.MaatCfg.GroupCfg;
import com.nis.domain.maat.MaatCfg.IpCfg;
import com.nis.domain.maat.MaatCfg.StringCfg;
import com.nis.domain.specific.ConfigGroupInfo;
import com.nis.exceptions.MaatConvertException;
import com.nis.util.ConfigServiceUtil;
import com.nis.util.Constants;
@@ -99,6 +100,19 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
return dataMap;
}
public CfgIndexInfo exportdns(CfgIndexInfo entity){
List<IpPortCfg> ipPortList = websiteCfgDao.getIpPortList(entity);
List<ComplexkeywordCfg> domainList = websiteCfgDao.getDnsDomainList(entity);
List<NtcSubscribeIdCfg> subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
entity.setIpPortList(ipPortList);
entity.setDomainList(domainList);
entity.setNtcSubscribeIdCfgList(subscribeIdList);
return entity;
}
public CfgIndexInfo getSslCfg(Long cfgId){
CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId);
List<IpPortCfg> ipPortList = websiteCfgDao.getIpPortList(entity);

View File

@@ -1166,7 +1166,7 @@ ASN_POLICY_MONIT=ASN Policy Monitor
p2p_monit=P2P Monitor
av_content_url_whitelist=Multimedia Content Url White List
av_content_ip_whitelist=Multimedia Content IP White List
active_port=Active Port
active_port=Traffic Port
visits=Visits
percentage=Percentage
APP_SSL=APP SSL Feature
@@ -1252,7 +1252,7 @@ select_certificate=Please Select Certificate Type First
root_certificate=der cer crt pem
intermediate_entity_certificate=p12
private_certificate=pem key p12
antiddos_protocol=DDOS协议
antiddos_protocol=DDOS Protocol
bps_threadshold=Traffic Threshold Bit/S
pps_threadshold=Traffic Threshold Pkt/S
one_more_greater_zero=At Least One Threshold Is Not 0.

View File

@@ -1168,7 +1168,7 @@ ASN_POLICY_MONIT=ASN Policy Monitor
p2p_monit=P2P Monitor
av_content_url_whitelist=Multimedia Content Url White List
av_content_ip_whitelist=Multimedia Content IP White List
active_port=\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u041f\u043e\u0440\u0442 \u0422\u041e\u041f 10
active_port=Traffic Port
visits=\u041f\u043e\u0441\u0435\u0449\u0430\u0435\u043c\u043e\u0441\u0442\u044c
percentage=\u041f\u0440\u043e\u0446\u0435\u043d\u0442
APP_SSL=APP SSL Feature
@@ -1272,7 +1272,7 @@ select_certificate=Please Select Certificate Type First
root_certificate=der cer crt pem
intermediate_entity_certificate=p12
private_certificate=pem key p12
antiddos_protocol=DDOS\u534f\u8bae
antiddos_protocol=DDOS Protocol
bps_threadshold=Traffic Threshold Bit/S
pps_threadshold=Traffic Threshold Pkt/S
one_more_greater_zero=At Least One Threshold Is Not 0.

View File

@@ -1162,7 +1162,7 @@ ASN_POLICY_MONIT=ASN\u7B56\u7565\u76D1\u6D4B
p2p_monit=P2P\u76D1\u6D4B
av_content_url_whitelist=\u591A\u5A92\u4F53\u5185\u5BB9URL\u914D\u7F6E\u767D\u540D\u5355
av_content_ip_whitelist=\u591A\u5A92\u4F53\u5185\u5BB9IP\u914D\u7F6E\u767D\u540D\u5355
active_port=\u6D3B\u8DC3\u7AEF\u53E3
active_port=\u7AEF\u53E3\u6D41\u91CF
visits=\u8BBF\u95EE\u6B21\u6570
percentage=\u767E\u5206\u6BD4
APP_SSL=APP SSL\u7279\u5F81

View File

@@ -501,8 +501,9 @@ droprate=Droprate
bandwidth=Bandwidth
intercept_domain_intensity=DOMAIN_INTENSITY
#IP\u9ed8\u8ba4\u503c
ipv4_default_ip_value=\:\:
ipv4_default_ip_subnet_value=0.0.0.0/32
ipv4_default_ip_value=0.0.0.0
ipv6_default_ip_value=\:\:
ipv4_default_ip_subnet_value=0.0.0.0/16
ipv6_default_ip_subnet_value=::/128
ipv4_default_ip_range_value=0.0.0.0-0.0.0.0
ipv6_default_ip_range_value=::-::

View File

@@ -0,0 +1,9 @@
#增加邮件地址头域subscribe_id
INSERT INTO function_region_dict
(`config_service_type`, `config_multi_keywords`, `config_expr_type`, `config_hex`, `config_match_method`, `dict_id`, `function_id`, `config_region_code`, `config_region_value`, `config_district`, `config_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_maat`, `region_type`, `config_ip_type`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`)
VALUES
('', '1', '0,1', '0,1,2', '0,1,2,3', 599, 37, 1, 'NTC_MAIL_HDR', 'From,To', '邮件地址头域配置', 1, NULL, NULL, NULL, NULL, 1, 3, '', '', '', '', '', '', 1);
INSERT INTO function_region_dict
(`config_service_type`, `config_multi_keywords`, `config_expr_type`, `config_hex`, `config_match_method`, `dict_id`, `function_id`, `config_region_code`, `config_region_value`, `config_district`, `config_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_maat`, `region_type`, `config_ip_type`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`)
VALUES
('', '', '', '', '', 600, 37, 2, 'NTC_SUBSCRIBE_ID', '', '邮件地址subscribeId配置', 1, NULL, NULL, NULL, NULL, 1, 2, '', '', '', '', '', '', 2);

View File

@@ -0,0 +1,12 @@
INSERT INTO function_service_dict
(`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`)
VALUES
('37', '5', '128', 'whitelist', '8888', 'mail_address_whitelist', NULL, '0', NULL, NULL, NULL, NULL, '1,2');
INSERT INTO function_service_dict
(`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`)
VALUES
('37', '5', '1', 'monit', '132', 'mail_address_monit', NULL, '1', NULL, NULL, NULL, NULL, '1,2');
INSERT INTO function_service_dict
(`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`)
VALUES
('37', '5', '16', 'reject', '20', 'mail_address_reject', NULL, '1', NULL, NULL, NULL, NULL, '1,2');

View File

@@ -0,0 +1,14 @@
#增加邮件主菜单
INSERT INTO `sys_menu` VALUES ('1144', '931', '0,1,86,931,', 'mail', '邮件', '5', '', '', '', '1', '', '1', '2018-09-10 14:31:09', '1', '2018-09-10 14:31:09', '', '1', null, '0', '0', '');
INSERT INTO `sys_menu` VALUES ('1145', '934', '0,1,150,934,', 'mail', '邮件', '5', '', '', '', '1', '', '1', '2018-09-10 14:31:09', '1', '2018-09-10 14:31:09', '', '1', null, '0', '0', '');
INSERT INTO `sys_menu` VALUES ('1146', '937', '0,1,151,937,', 'mail', '邮件', '5', '', '', '', '1', '', '1', '2018-09-10 14:31:09', '1', '2018-09-10 14:31:09', '', '1', null, '0', '0', '');
#增加邮件地址菜单
INSERT INTO `sys_menu` VALUES ('1140', '1144', '0,1,86,931,1144,', 'mail_address', '邮件地址配置', '10', '/ntc/mail/mailList', '', '', '1', 'mail:config', '1', '2018-09-10 14:31:09', '1', '2018-09-10 14:31:09', '', '1', null, '0', '0', '37');
INSERT INTO `sys_menu` VALUES ('1141', '1145', '0,1,150,934,1145,', 'mail_address', '邮件地址审核', '10', '/ntc/mail/mailList', '', '', '1', 'mail:confirm', '1', '2018-09-10 14:31:09', '1', '2018-09-10 14:31:09', '', '1', null, '0', '0', '37');
INSERT INTO `sys_menu` VALUES ('1142', '1146', '0,1,151,937,1146,', 'mail_address', '邮件地址审计', '10', '/ntc/mail/mailList', '', '', '1', 'mail:audit', '1', '2018-09-10 14:31:09', '1', '2018-09-10 14:31:09', '', '1', null, '0', '0', '37');
#修改邮件菜单
UPDATE sys_menu set parent_id='1144',parent_ids='0,1,86,931,1144,',code='advanced',sort='30' where id=682;
UPDATE sys_menu set parent_id='1145',parent_ids='0,1,150,934,1145,',code='advanced',sort='30' where id=683;
UPDATE sys_menu set parent_id='1146',parent_ids='0,1,151,937,1146,',code='advanced',sort='30' where id=815;

View File

@@ -2,7 +2,44 @@
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<h3 class="form-section"><spring:message code="block_config"/></h3>
<div class="row ipInfo">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<!-- 目前支持TCP_SYN, DNS, NTP单选。 -->
<label class="control-label col-md-3"><spring:message code="antiddos_protocol"/></label>
<div class="col-md-6">
<select id="antiddosProtocol" name="antiddosProtocol" class="selectpicker show-tick form-control">
<option value=""><spring:message code="select"/></option>
<option value="TCP_SYN" <c:if test="${_cfg.antiddosProtocol=='TCP_SYN'}">selected</c:if>>TCP_SYN</option>
<option value="UDP_DNS" <c:if test="${_cfg.antiddosProtocol=='UDP_DNS'}">selected</c:if>>UDP_DNS</option>
<option value="UDP_NTP" <c:if test="${_cfg.antiddosProtocol=='UDP_NTP'}">selected</c:if>>UDP_NTP</option>
</select>
</div>
<div for="antiddosProtocol"></div>
</div>
</div><!-- 目前支持TCP_SYN, DNS, NTP单选。 -->
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="bps_threadshold"/></label>
<div class="col-md-6">
<input id="bpsThreadshold" class="form-control digits" maxlength="18" type="text" name="bpsThreadshold" value="${_cfg.bpsThreadshold}">
</div>
<div for="bpsThreadshold"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="pps_threadshold"/></label>
<div class="col-md-6">
<input id="ppsThreadshold" class="form-control digits" maxlength="18" type="text" name="ppsThreadshold" value="${_cfg.ppsThreadshold}">
</div>
<div for="ppsThreadshold"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>

View File

@@ -160,7 +160,7 @@
</div>
<input id="intype" class="form-control input-medium" type="text" value="">
<input id="intype" class="form-control input-small" type="text" value="">
<div class="input-group-btn">
<form:select id="actionSelect" path="action" class="selectpicker select2 input-small" >
<form:option value=""><spring:message code="select"/></form:option>

View File

@@ -164,7 +164,7 @@
</div>
<input id="intype" class="form-control input-medium" type="text" value="">
<input id="intype" class="form-control input-small" type="text" value="">
<div class="input-group-btn">
<form:select id="actionSelect" path="action" class="selectpicker select2 input-small" >
<form:option value=""><spring:message code="select"/></form:option>

View File

@@ -20,6 +20,10 @@ $(function(){
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
},
submitHandler: function(form){
if(($("#antiddosProtocol").val()!="")&&(!($("#bpsThreadshold").val().trim()>0)&&!($("#ppsThreadshold").val().trim()>0))){
top.$.jBox.tip("<spring:message code='one_more_greater_zero'/>", "<spring:message code='info'/>");
return;
}
loading('onloading...');
form.submit();
},

View File

@@ -307,6 +307,9 @@
<th><spring:message code="protocol"/></th>
<th class="sort-column r.action"><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th>
<th><spring:message code="antiddos_protocol"/></th>
<th><spring:message code="bps_threadshold"/></th>
<th><spring:message code="pps_threadshold"/></th>
<th><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th>
@@ -373,6 +376,9 @@
</a>
</c:if>
</td>
<td>${cfg.antiddosProtocol }</td>
<td>${cfg.bpsThreadshold }</td>
<td>${cfg.ppsThreadshold }</td>
<td>${cfg.requestName }</td>
<td >
<c:set var="classify"></c:set>

View File

@@ -161,7 +161,7 @@
</div>
<input id="intype" class="form-control input-medium" type="text" value="">
<input id="intype" class="form-control input-small" type="text" value="">
<div class="input-group-btn">
<form:select id="actionSelect" path="action" class="selectpicker select2 input-small" >
<form:option value=""><spring:message code="select"/></form:option>

View File

@@ -172,6 +172,7 @@
<shiro:hasPermission name="fileTransfer:ftp:config">
<sys:delRow url="${ctx}/ntc/fileTransfer/ftpForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/fileTransfer/updateFtpCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/fileTransfer/exportftp?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/fileTransfer/ftpList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
</shiro:hasPermission>
<shiro:hasPermission name="fileTransfer:ftp:confirm">
<div class="btn-group">

View File

@@ -169,6 +169,7 @@
<shiro:hasPermission name="mail:config">
<sys:delRow url="${ctx}/ntc/mail/mailForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/mail/updateMailCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/mail/exportmail?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/mail/mailList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
</shiro:hasPermission>
<shiro:hasPermission name="mail:confirm">
<div class="btn-group">

View File

@@ -168,6 +168,7 @@
<shiro:hasPermission name="website:dns:config">
<sys:delRow url="${ctx}/ntc/website/dnsForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/website/updateDnsCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/website/exportdns?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/website/dnsList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
</shiro:hasPermission>
<shiro:hasPermission name="website:dns:confirm">
<div class="btn-group">

View File

@@ -324,9 +324,9 @@
</div>
<div class="pull-right">
<shiro:hasPermission name="website:http:config">
<sys:delRow url="${ctx}/ntc/website/httpForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url ="${ctx}/ntc/website/httpForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/website/updateHttpCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<%-- <sys:delRow url="${ctx}/ntc/website/exportHttp?functionId=${cfg.functionId }" id="contentTable" searchUrl="${ctx}/ntc/website/httpList?functionId=${cfg.functionId}" label="export"></sys:delRow> --%>
<sys:delRow url="${ctx}/ntc/website/exportHttp?functionId=${cfg.functionId }" id="contentTable" searchUrl="${ctx}/ntc/website/httpList?functionId=${cfg.functionId}" label="export"></sys:delRow>
</shiro:hasPermission>
<shiro:hasPermission name="website:http:confirm">
<div class="btn-group">

View File

@@ -168,6 +168,7 @@
<shiro:hasPermission name="whitelist:domain:config">
<sys:delRow url="${ctx}/ntc/whitelist/domain/form" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/whitelist/domain/updateValid?isValid=-1&functionId=${cfg.functionId}" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/whitelist/exportdomain?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/whitelist/domain/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
</shiro:hasPermission>
<shiro:hasPermission name="whitelist:domain:confirm">
<div class="btn-group">

View File

@@ -167,6 +167,7 @@
<shiro:hasPermission name="whitelist:ip:config">
<sys:delRow url="${ctx}/ntc/whitelist/ip/form" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/whitelist/updateIpValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/whitelist/exportIpAddr?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/whitelist/ip/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
</shiro:hasPermission>
<shiro:hasPermission name="whitelist:ip:confirm">
<div class="btn-group">

View File

@@ -197,7 +197,7 @@
<spring:message code="traffic_app_chart"/>&nbsp;&nbsp;<!-- <a href="#"><i class="fa fa-list-ul"></i></a> -->
<a href="javascipt:void(0)" onclick="appTypeList();return false;"><i class="fa fa-refresh"></i></a>
</div>
<!--app应用图 --><div id="chart_3" class="" style="width:100%;height: 400px;"></div>
<!--app应用图 --><div id="chart_3" class="" style="width:100%;height: 420px;"></div>
</div>
</div>
@@ -637,7 +637,7 @@ function systemList(){
$("#tbodyData1").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'>No Data</td><td></td></tr>");
}
//终端图-操作系统
echart_2(rs);
echart_2(rs.reverse());
}
},
});
@@ -655,7 +655,7 @@ function osClick(osType,obj){
dataType:"json",
cache:false,async:true,
success:function (rs) {
echart_5(rs);
echart_5(rs.reverse());
},
});
}
@@ -670,7 +670,7 @@ function bsClick(bsType,obj){
dataType:"json",
cache:false,async:true,
success:function (rs) {
echart_2(rs);
echart_2(rs.reverse());
},
});
}
@@ -728,7 +728,7 @@ function browserList() {
$("#tbodyData1").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'>No Data</td><td></td></tr>");
}
//终端图-浏览器
echart_5(rs);
echart_5(rs.reverse());
}
},
});
@@ -782,7 +782,7 @@ function websiteList() {
$("#tbodyData2").prepend("<tr class='frist rowData'><td></td><td style='color:#fff'>No Data</td><td></td></tr>");
}
//网站统计图
echart_4(rs);
echart_4(rs.reverse());
}
},
});
@@ -800,7 +800,7 @@ function webClick(websiteServiceId,obj){
dataType:"json",
cache:false,async:true,
success:function (rs) {
echart_6(rs);
echart_6(rs.reverse());
},
});
}

View File

@@ -237,6 +237,13 @@ jQuery.validator.addMethod("protocolPort",function(value, element) {
var protocolElement=$("[name='"+name.replace("destPort","protocol")+"']");
protocolVal=protocolElement.val();
}
//端口/掩码格式
if(srcPortVal&&srcPortVal.indexOf("/")>-1){
srcPortVal=srcPortVal.split("/")[0];
}
if(destPortVal&&destPortVal.indexOf("/")>-1){
destPortVal=destPortVal.split("/")[0];
}
if(protocolVal==0){
return true;
}else if((protocolVal!=tcp&&protocolVal!=udp&&srcPortVal>0)||(protocolVal!=tcp&&protocolVal!=udp&&destPortVal>0)){
@@ -276,13 +283,13 @@ jQuery.validator.addMethod("ipCheck",function(value, element) {
var srcIpIsHidden=srcIpAddressE.is(":hidden");
var destIpIsHidden=destIpAddressE.is(":hidden");
var IPv4RangeDefault="0.0.0.0-0.0.0.0";
/*if(ipPattern==1){//ip/掩码格式
if(ipPattern==1){//ip/掩码格式
srcIpAddress=srcIpAddress.indexOf("/") >-1 ?srcIpAddress.split("/")[0] : srcIpAddress;
destIpAddress=destIpAddress.indexOf("/") >-1 ?destIpAddress.split("/")[0] : destIpAddress;
}else if (ipPattern==2){
srcIpAddress=srcIpAddress.indexOf("-") >-1 ?srcIpAddress.split("-")[0] : srcIpAddress;
destIpAddress=destIpAddress.indexOf("-") >-1 ?destIpAddress.split("-")[0] : destIpAddress;
}*/
}
if(srcIpIsHidden){
if((srcIpAddress == destIpAddress)){
$.validator.messages.ipCheck=$.validator.messages.destIpIsNotValue+destIpAddress;

View File

@@ -1,7 +1,7 @@
$(function(){
//增加描述新增时的文字长度限制
$("form input[name='cfgDesc']").attr("maxlength","128");
$("form input[name$='cfgKeywords']").attr("maxlength","2048");
$("form input[name$='cfgKeywords']").attr("maxlength","1024");
//截取过长的文字 使用id选择器;例如:tab对象->tr->td对象. 排除日志table .logTb
$("#contentTable").not(".logTb").find("td").each(function(i){
//获取td当前对象的文本,如果长度大于25;