develop

Conflicts:
	src/main/resources/messages/message_en.properties
	src/main/resources/messages/message_ru.properties
	src/main/resources/messages/message_zh_CN.properties
	拦截域名增加拦截强度
This commit is contained in:
duandongmei
2018-10-15 19:22:17 +08:00
25 changed files with 270 additions and 135 deletions

View File

@@ -26,7 +26,7 @@ public class NtcDdosLog extends BaseLogEntity<NtcDdosLog> {
@ApiModelProperty(value = "攻击累积字节数", required = true)
protected String attackTotalByte;
@ApiModelProperty(value = "攻击流量是否被丢弃", required = true)
protected Integer isBlcok;
protected Integer isBlock;
public Integer getAttackType() {
@@ -71,11 +71,11 @@ public class NtcDdosLog extends BaseLogEntity<NtcDdosLog> {
public void setAttackTotalByte(String attackTotalByte) {
this.attackTotalByte = attackTotalByte;
}
public Integer getIsBlcok() {
return isBlcok;
public Integer getIsBlock() {
return isBlock;
}
public void setIsBlcok(Integer isBlcok) {
this.isBlcok = isBlcok;
public void setIsBlock(Integer isBlock) {
this.isBlock = isBlock;
}
}

View File

@@ -24,24 +24,17 @@ import com.nis.domain.FunctionRegionDict;
import com.nis.domain.FunctionServiceDict;
import com.nis.domain.Page;
import com.nis.domain.SysDataDictionaryItem;
import com.nis.domain.basics.PolicyGroupInfo;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.IpPortCfg;
import com.nis.domain.configuration.NtcSubscribeIdCfg;
import com.nis.domain.configuration.template.IpAddrTemplate;
import com.nis.domain.configuration.template.IpAllTemplate;
import com.nis.domain.configuration.template.IpsecTemplate;
import com.nis.domain.configuration.template.TunnelIpTemplate;
import com.nis.domain.specific.ConfigGroupInfo;
import com.nis.exceptions.MaatConvertException;
import com.nis.util.Constants;
import com.nis.util.DictUtils;
import com.nis.util.StringUtil;
import com.nis.util.excel.ExcelField;
import com.nis.util.excel.ExportExcel;
import com.nis.web.controller.BaseController;
import com.nis.web.controller.configuration.CommonController;
import com.nis.web.security.UserUtils;
/**

View File

@@ -57,6 +57,9 @@ public class DdosLogController extends BaseController{
Map<String, Object> params=new HashMap<>();
params.put("pageSize", page.getPageSize());
params.put("pageNo", page.getPageNo());
if(entry!=null&&entry.getIsBlock()!=null) {
params.put("searchIsBlock", entry.getIsBlock());
}
//查询值判断
initLogSearchValue(entry,params);

View File

@@ -179,6 +179,9 @@ public class UserController extends BaseController{
@RequiresPermissions("sys:user:view")
@RequestMapping(value = {"list"})
public String list(SysUser user, HttpServletRequest request, HttpServletResponse response, Model model) {
if(UserUtils.getUser().getIdentity().equals(0)){
user.setIdentity(0);
}
Page<SysUser> page = userService.findUser(new Page<SysUser>(request, response), user);
model.addAttribute("page", page);
return "/sys/userList";

View File

@@ -292,7 +292,9 @@
<if test="loginId != null and loginId !=''">
AND u.login_id=#{loginId}
</if>
<if test="identity != null and identity!=1">
AND u.identity=#{identity}
</if>
<if test="name != null and name != ''">
AND u.name like

View File

@@ -205,7 +205,8 @@
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
,a.edit_time,a.auditor_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.cfg_region_code
,a.area_effective_ids,a.function_id,a.cfg_region_code,a.user_region1,a.user_region2,
a.user_region3,a.user_region4,a.user_region5
</sql>
<select id="getById" resultMap="BaseIpMap" parameterType="java.lang.Long" >
SELECT

View File

@@ -136,7 +136,11 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
ipCfgDao.saveCfgIndex(entity);
if(entity.getIpPortList()!=null){
for(IpPortCfg cfg:entity.getIpPortList()){
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
if(Constants.IPSEC_PROTOCOL.intValue()==cfg.getProtocol().intValue()) {
BeanUtils.copyProperties(entity, cfg,new String[]{"userRegion1","cfgRegionCode","cfgType"});
}else {
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
}
ipCfgDao.saveIpPortCfg(cfg);
}
}
@@ -172,7 +176,11 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
entity.setCreatorId(entity.getCurrentUser().getId());
if(entity.getIpPortList()!=null){
for(IpPortCfg cfg:entity.getIpPortList()){
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
if(Constants.IPSEC_PROTOCOL.intValue()==cfg.getProtocol().intValue()) {
BeanUtils.copyProperties(entity, cfg,new String[]{"userRegion1","cfgRegionCode","cfgType"});
}else {
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
}
ipCfgDao.saveIpPortCfg(cfg);
}
}
@@ -551,24 +559,25 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
}
}
}
IpPortCfg cfg = new IpPortCfg();
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
cfg.setTableName(IpPortCfg.getTablename());
ipCfgDao.auditCfg(cfg);
if(isAudit==1){
for(IpPortCfg cfg:entity.getIpPortList()) {
BeanUtils.copyProperties(entity, cfg, new String[]{"userRegion1","userRegion2","userRegion3","userRegion4","userRegion5","ipType","direction",
"protocol","protocolId","areaEffectiveIds","cfgRegionCode",
"cfgType","ipPattern","srcIpAddress","portPattern","srcPort","destIpAddress","destPort"});
cfg.setTableName(IpPortCfg.getTablename());
ipCfgDao.auditCfg(cfg);
}
if(isAudit==1&&maatType==Constants.MAAT_TYPE){
for(IpPortCfg cfg:entity.getIpPortList()) {
if(Constants.IPSEC_PROTOCOL==cfg.getProtocol().intValue()) {
cfg.setProtocol(Integer.parseInt(cfg.getUserRegion1()));
}
}
Map<String,List> map = cfgConvert(ipRegionList,entity.getIpPortList(),1,entity,groupRelationList);
groupRelationList=map.get("groupList");
ipRegionList=map.get("dstList");
if(map.get("numRegionList")!=null){
numRegionList.addAll(map.get("numRegionList"));
}
if(Constants.SERVICE_IP_MULITIPLEX==cfg.getServiceId().intValue()){
String region=Constants.USERREGION_IR_STRATEGY+"="+cfg.getDnsStrategyId()+Constants.USER_REGION_SPLIT
+Constants.USERREGION_IR_TYPE+"="+cfg.getIrType();
maatCfg.setUserRegion(region);
}else if(Constants.SERVICE_IP_RATELIMIT==cfg.getServiceId().intValue()){
maatCfg.setUserRegion(Constants.USERREGION_RATE_LIMIT+"="+cfg.getRatelimit());
}
}
}
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
@@ -576,7 +585,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
ipCfgDao.auditCfg(cfg);
if(isAudit==1){
if(isAudit==1&&maatType==Constants.MAAT_TYPE){
Map<String,List> map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList);
groupRelationList=map.get("groupList");
strRegionList=map.get("dstList");
@@ -589,7 +598,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
cfg.setTableName(AreaIpCfg.getTablename());
ipCfgDao.auditCfg(cfg);
if(isAudit==1){
if(isAudit==1&&maatType==Constants.MAAT_TYPE){
Map<String,List> map = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
groupRelationList=map.get("groupList");
areaIpRegionList=map.get("dstList");
@@ -600,8 +609,15 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
if(maatType==Constants.CALLBACK_TYPE){
List<InlineIp> ipList=new ArrayList<>();
for(IpPortCfg cfg :entity.getIpPortList()) {
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
Integer ipsecProtocol=null;
if(Constants.IPSEC_PROTOCOL==cfg.getProtocol().intValue()) {
ipsecProtocol=Integer.parseInt(cfg.getUserRegion1());
}
BeanUtils.copyProperties(entity, cfg, new String[]{"userRegion1","cfgId"});
InlineIp ip=convertCallBackIp(cfg,null);
if(ipsecProtocol!=null) {
ip.setProtocol(ipsecProtocol);
}
ipList.add(ip);
}
//调用服务接口下发配置数据
@@ -660,8 +676,15 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
if(maatType==Constants.CALLBACK_TYPE){
List<InlineIp> ipList=new ArrayList<>();
for(IpPortCfg cfg :entity.getIpPortList()) {
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
Integer ipsecProtocol=null;
if(Constants.IPSEC_PROTOCOL==cfg.getProtocol().intValue()) {
ipsecProtocol=Integer.parseInt(cfg.getUserRegion1());
}
BeanUtils.copyProperties(entity, cfg, new String[]{"userRegion1","cfgId"});
InlineIp ip=convertCallBackIp(cfg,null);
if(ipsecProtocol!=null) {
ip.setProtocol(ipsecProtocol);
}
ipList.add(ip);
}
//调用服务接口下发配置数据

View File

@@ -1248,4 +1248,4 @@ ipsec_protocol=IPSEC Protocol
intercept_intensity=Intercept Intensity
weak_intensity=Weak
stronger_intensity=Strong
strong_intensity=Stronger
strong_intensity=Stronger

View File

@@ -1264,8 +1264,8 @@ mail_address=Mail Address
mail_address_whitelist=Mail Address Whitelist
mail_address_monit=Mail Address Monit
mail_address_reject=Mail Address Reject
ipsec_protocol=IPSEC Protocol
ipsec_protocol=IPSEC Protocol
intercept_intensity=Intercept Intensity
weak_intensity=Weak
stronger_intensity=Strong
strong_intensity=Stronger
strong_intensity=Stronger

View File

@@ -1224,14 +1224,14 @@ area_id=\u5730\u57DF
link_num=\u8FDE\u63A5\u6B21\u6570
stat_time=\u7EDF\u8BA1\u65F6\u95F4
log_menu=\u64CD\u4F5C\u83DC\u5355
system_log=\u65E5\u5FD7\u7BA1\u7406
log_management=\u65E5\u5FD7\u7BA1\u7406
log_date=\u65E5\u671F\u8303\u56F4
log_exception=\u53EA\u67E5\u8BE2\u5F02\u5E38\u4FE1\u606F
log_user=\u64CD\u4F5C\u7528\u6237
log_submission=\u63D0\u4EA4\u65B9\u5F0F
log_ip=\u64CD\u4F5C\u8005IP
log_exception_info=\u5F02\u5E38\u4FE1\u606F
system_log=\u65E5\u5FD7\u7BA1\u7406
system_log=Log Management
protected_ddos=\u4FDD\u62A4DDOS\u653B\u51FB
usual_ddos=\u5E38\u7528DDOS\u653B\u51FB
mail_address=\u90AE\u4EF6\u5730\u5740
@@ -1241,5 +1241,6 @@ mail_address_reject=\u90AE\u4EF6\u5730\u5740\u7BA1\u63A7
ipsec_protocol=IPSEC\u534F\u8BAE
intercept_intensity=\u62E6\u622A\u5F3A\u5EA6
weak_intensity=\u5F31
stronger_intensity=\u5F3A
strong_intensity=\u8F83\u5F3A
stronger_intensity=\u8F83\u5F3A
strong_intensity=\u5F3A

View File

@@ -0,0 +1,20 @@
delete from sys_dict_info where item_type=1;
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('8', '1', '7172', 'Astana', '阿斯塔纳市', '0', '1', '1', '1', '1', '2018-05-30 10:08:30', '1', '2018-05-30 10:11:48', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('9', '1', '7272', 'Almaty', '阿拉木图市', '0', '1', '1', '1', '1', '2018-05-30 10:09:00', '1', '2018-05-30 10:12:29', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('10', '1', '7292', 'Aktau', '阿克套', '0', '1', '1', '1', '1', '2018-05-30 10:12:12', '1', '2018-05-30 10:12:20', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('11', '1', '72822', 'Taldykurgan', '塔尔德库尔干', '0', '1', '1', '1', '1', '2018-05-30 10:13:42', '1', '2018-06-05 15:49:38', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('12', '1', '7132', 'Aktubinsk', '阿克图宾斯克', '0', '1', '1', '1', '1', '2018-05-30 10:14:36', '1', '2018-05-30 10:14:36', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('13', '1', '7122', 'Atyrau', '阿特劳州', '0', '1', '1', '1', '1', '2018-05-30 10:15:11', '1', '2018-05-30 10:15:45', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('14', '1', '7182', 'Pavlodar', '巴甫洛达尔州', '0', '1', '1', '1', '1', '2018-05-30 10:15:27', '1', '2018-05-30 10:15:38', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('15', '1', '7162', 'Kokshetau', '科克舍套', '0', '1', '1', '1', '1', '2018-05-30 10:15:59', '1', '2018-05-30 10:16:06', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('16', '1', '7212', 'Karaganda', '卡拉干达州', '0', '1', '1', '1', '1', '2018-05-30 10:16:24', '1', '2018-05-30 10:16:24', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('17', '1', '7142', 'Kostanay', '科斯塔奈州', '0', '1', '1', '1', '1', '2018-05-30 10:16:43', '1', '2018-05-30 10:16:43', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('18', '1', '7242', 'Kyzylorda', '克孜勒奥尔达州', '0', '1', '1', '1', '1', '2018-05-30 10:17:04', '1', '2018-05-30 10:22:54', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('19', '1', '7252', 'Shymkent', '奇姆肯特', '0', '1', '1', '1', '1', '2018-05-30 10:21:14', '1', '2018-05-30 10:21:14', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('20', '1', '7152', 'Petropavl', '彼得罗巴甫尔', '0', '1', '1', '1', '1', '2018-05-30 10:21:29', '1', '2018-05-30 10:22:37', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('21', '1', '7222', 'Semey', '塞米伊', '0', '1', '1', '1', '1', '2018-05-30 10:21:51', '1', '2018-05-30 10:22:45', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('22', '1', '7262', 'Taraz', '塔拉兹', '0', '1', '1', '1', '1', '2018-05-30 10:22:11', '1', '2018-05-30 10:22:11', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('23', '1', '7112', 'Uralsk', '乌拉尔斯克州', '0', '1', '1', '1', '1', '2018-05-30 10:22:28', '1', '2018-08-07 17:40:13', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('24', '1', '7232', 'Ust-Kamenogorsk', '乌斯季卡缅诺戈尔斯克', '0', '1', '1', '1', '1', '2018-10-15 12:59:02', '1', '2018-10-15 12:59:06', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('25', '1', '7102', 'Zhezkazgan', '杰兹卡兹甘', '0', '1', '1', '1', '1', '2018-10-15 13:02:07', '1', '2018-10-15 13:02:10', '0');
INSERT INTO `sys_dict_info` (`sys_dict_id`, `item_type`, `item_code`, `item_value`, `item_desc`, `parent_id`, `is_leaf`, `level_no`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_initianlize`) VALUES ('26', '1', '717', 'NationalCenter', '国家中心', '0', '1', '1', '1', '1', '2018-10-15 13:02:58', '1', '2018-10-15 13:03:01', '0');

View File

@@ -0,0 +1,3 @@
INSERT INTO `sys_menu` VALUES ('1138', '801', '0,1,152,801,', 'protected_ddos', '保护ddos攻击', '10', '/log/ntc/ntcDdosLogs/list?isBlock=1', '', '', '1', '', '1', '2018-09-17 16:38:57', '1', '2018-09-17 16:38:57', '', '0', null, '0', '0', '301');
INSERT INTO `sys_menu` VALUES ('1139', '801', '0,1,152,801,', 'usual_ddos', '常用ddos攻击', '20', '/log/ntc/ntcDdosLogs/list?isBlock=0', '', '', '1', '', '1', '2018-09-17 16:38:57', '1', '2018-09-17 16:38:57', '', '0', null, '0', '0', '305');
UPDATE sys_menu set href='',function_id=null where id=801;

View File

@@ -66,7 +66,7 @@ $(function(){
<div for="areaCode"></div>
</div>
</div>
<div class="col-md-6 hidden">
<div class="col-md-6 ">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="isp"/></label>
<div class="col-md-6">
@@ -105,7 +105,7 @@ $(function(){
<div for="areaIsp[${status.index}].area"></div>
</div>
</div>
<div class="col-md-6 hidden">
<div class="col-md-6 ">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="isp"/></label>
<div class="col-md-6">

View File

@@ -64,6 +64,20 @@
</div>
</div>
</c:if>
<div class="col-md-6 ipsecProtocol hidden">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ipsec_protocol"/></label>
<div class="col-md-6">
<select name="${cfgName}.userRegion1" class="selectpicker show-tick form-control required" disabled="disabled">
<option value=""><spring:message code="select"/></option>
<c:forEach items="${fns:getDictList('IPSEC_PROTOCOL')}" var="ipType">
<option value="${ipType.itemCode}" <c:if test="${_cfg.ipPortList[0].userRegion1==ipType.itemCode}">selected</c:if> ><spring:message code="${ipType.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="${cfgName}.userRegion1"></div>
</div>
</div>
</div>
<div class="row ip">
<div class="col-md-6">

View File

@@ -32,7 +32,12 @@
}else{
hideAction(1,asnRegionCode);
}
$("[name$='protocol']").each(function(){
showHideIPSECProtocol($(this));
});
$("[name$='protocol']").on("change",function(){
showHideIPSECProtocol($(this));
});
if(isAsn==0){
$("[class~='glyphicon-plus'][class~='ipPortList']").click();
$("[class~='boxSolid'][class~='asn']").find(".glyphicon-remove").click();
@@ -108,6 +113,7 @@
changeIPVal(tabInfo);
}
processAction(isAsn,tabInfo);
$("[name$='protocol']").change();
/* if(tabInfo){
tabInfo.find("[name$='cfgType']").val(cfgType);
tabInfo.find("[name$='cfgRegionCode']").val(cfgRegionCode);
@@ -372,6 +378,23 @@ var processAction=function(configType,obj){
}
}
var showHideIPSECProtocol=function(obj){
var name=$(obj).attr("name");
var userRegion1=$("select[name='"+name.replace("protocol","userRegion1")+"']");
if($(obj).val()==8){
if(userRegion1){
userRegion1.removeAttr("disabled");
userRegion1.parents(".ipsecProtocol").removeClass("hidden");
userRegion1.selectpicker("refresh");
}
}else{
if(userRegion1){
userRegion1.attr("disabled","disabled");
userRegion1.parents(".ipsecProtocol").addClass("hidden");
userRegion1.selectpicker("refresh");
}
}
}
</script>
</head>
<body>

View File

@@ -31,7 +31,8 @@ $(document).ready(function(){
<div class="theme-panel hidden-xs hidden-sm">
</div>
<h3 class="page-title">
<spring:message code="target_ip_protect"/>
<c:if test="${log.isBlock eq 1 }"><spring:message code="protected_ddos"/></c:if>
<c:if test="${log.isBlock eq 0 }"><spring:message code="usual_ddos"/></c:if>
</h3>
<h5 class="page-header"></h5>
@@ -44,6 +45,7 @@ $(document).ready(function(){
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<input id="functionId" name="functionId" type="hidden" value="${log.functionId}"/>
<input id="isLogTotalSearch" name="isLogTotalSearch" type="hidden" value="${log.isLogTotalSearch}"/>
<input id="isBlock" name="isBlock" type="hidden" value="${log.isBlock}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${log.isFilterAction }"/>
@@ -89,7 +91,7 @@ $(document).ready(function(){
<div class="row">
<div class="col-md-2 hidden">
<div class="form-group">
<label><spring:message code="transport_layer_protocol"/></label>
<label><spring:message code="protocol_type"/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="transProto" class="selectpicker form-control" >
<form:option value=""><spring:message code="select"/></form:option>
@@ -167,23 +169,23 @@ $(document).ready(function(){
<th><spring:message code='last_attack_time'/></th>
<th><spring:message code='attack_max_pps'/></th>
<th><spring:message code='attack_max_bps'/></th>
<th><spring:message code='attack_total_pkt'/></th>
<th><spring:message code='attack_total_byte'/></th>
<th><spring:message code='is_blcok'/></th>
<%-- <th><spring:message code='attack_total_pkt'/></th> --%>
<%-- <th><spring:message code='attack_total_byte'/></th> --%>
<%-- <th><spring:message code='is_blcok'/></th> --%>
<th><spring:message code='clj_ip'/></th>
<th><spring:message code='transport_layer_protocol'/></th>
<th><spring:message code='protocol'/></th>
<th><spring:message code='addr_type'/></th>
<th><spring:message code='serverip'/></th>
<th><spring:message code='clientip'/></th>
<%-- <th><spring:message code='clientip'/></th> --%>
<th><spring:message code='serverport'/></th>
<th><spring:message code='clientport'/></th>
<%-- <th><spring:message code='clientport'/></th> --%>
<th><spring:message code='deviceid'/></th>
<th><spring:message code='direct'/></th>
<th><spring:message code='stream_type'/></th>
<%-- <th><spring:message code='nest_addr_list'/></th> --%>
<th><spring:message code='server_locate'/></th>
<th><spring:message code='client_locate'/></th>
<%-- <th><spring:message code='client_locate'/></th> --%>
<th><spring:message code='s_asn'/></th>
<th><spring:message code='d_asn'/></th>
<th><spring:message code='s_subscribe_id'/></th>
@@ -222,13 +224,13 @@ $(document).ready(function(){
<td><fmt:formatDate value="${log.lastAttackTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
<td>${log.attackMaxPps}</td>
<td>${log.attackMaxBps}</td>
<td>${log.attackTotalPkt}</td>
<td>${log.attackTotalByte}</td>
<td>
<%-- <td>${log.attackTotalPkt}</td> --%>
<%-- <td>${log.attackTotalByte}</td> --%>
<%-- <td>
<c:forEach items="${fns:getDictList('SYS_YES_NO')}" var="dic">
<c:if test="${dic.itemCode eq log.isBlcok}"><spring:message code="${dic.itemValue}"/></c:if>
<c:if test="${dic.itemCode eq log.isBlock}"><spring:message code="${dic.itemValue}"/></c:if>
</c:forEach>
</td>
</td> --%>
<td title="${log.capIp }">${fns:abbr(log.capIp, 42)}</td>
<td>${log.transProto}</td>
<td>
@@ -237,9 +239,9 @@ $(document).ready(function(){
</c:forEach>
</td>
<td title="${log.dIp }">${fns:abbr(log.dIp, 42)}</td>
<td title="${log.sIp }">${fns:abbr(log.sIp, 42)}</td>
<%-- <td title="${log.sIp }">${fns:abbr(log.sIp, 42)}</td> --%>
<td>${log.dPort}</td>
<td>${log.sPort}</td>
<%-- <td>${log.sPort}</td> --%>
<td>
<c:forEach items="${fns:getDictList('DEVICE')}" var="device">
<c:if test="${device.itemCode eq log.deviceId}"><spring:message code="${device.itemValue}"/></c:if>
@@ -259,7 +261,7 @@ $(document).ready(function(){
<%-- ${fns:stringFormat(log.addrList,30)} --%>
<!-- </td> -->
<td>${log.serverLocate}</td>
<td>${log.clientLocate}</td>
<%-- <td>${log.clientLocate}</td> --%>
<td>${log.sAsn}</td>
<td>${log.dAsn}</td>
<td>${log.sSubscribeId}</td>

View File

@@ -106,23 +106,30 @@
</div>
<span class="help-inline"><font color="red">*</font> </span>
</div>
<input type="hidden" name="roleType" value="user"/>
<%-- <div class="form-group">
<label class="col-md-3 control-label"><spring:message code="role_type"/>:</label>
<div class="col-md-4">
<form:input path="roleType" htmlEscape="false" maxlength="50" class="required"/>
<span class="help-inline" title="activiti有3种预定义的组类型security-role、assignment、user 如果使用Activiti Explorer需要security-role才能看到manage页签需要assignment才能claim任务">
工作流组用户组类型security-role管理员、assignment可进行任务分配、user普通用户</span>
<form:select path="roleType" class="form-control">
<form:option value="assignment"><spring:message code="task_allot"/></form:option>
<form:option value="security-role"><spring:message code="manager"/></form:option>
<form:option value="user"><spring:message code="ordinary_man"/></form:option>
</form:select>
<span class="help-inline" title="activiti有3种预定义的组类型security-role、assignment、user 如果使用Activiti Explorer需要security-role才能看到manage页签需要assignment才能claim任务">
<spring:message code="role_type_info"/></span>
</div>
</div>
--%>
<c:choose>
<c:when test="${fns:getUser().identity eq 1}">
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="role_type"/>:</label>
<div class="col-md-4">
<!-- <form:input path="roleType" htmlEscape="false" maxlength="50" class="required"/>
<span class="help-inline" title="activiti有3种预定义的组类型security-role、assignment、user 如果使用Activiti Explorer需要security-role才能看到manage页签需要assignment才能claim任务">
工作流组用户组类型security-role管理员、assignment可进行任务分配、user普通用户</span> -->
<form:select path="roleType" class="form-control">
<%-- <form:option value="assignment"><spring:message code="task_allot"/></form:option> --%>
<form:option value="security-role"><spring:message code="manager"/></form:option>
<form:option value="user"><spring:message code="ordinary_man"/></form:option>
</form:select>
<%-- <span class="help-inline" title="activiti有3种预定义的组类型security-role、assignment、user 如果使用Activiti Explorer需要security-role才能看到manage页签需要assignment才能claim任务">
<spring:message code="role_type_info"/></span> --%>
</div>
</div>
</c:when>
<c:otherwise>
<input type="hidden" name="roleType" value="user"/>
</c:otherwise>
</c:choose>
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="data_range"/>:</label>

View File

@@ -40,18 +40,36 @@
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
<tr><th><spring:message code="role_name"/></th><th><spring:message code="data_range"/></th><th><spring:message code="desc"/></th><shiro:hasPermission name="sys:role:edit"><th><spring:message code="operation"/></th></shiro:hasPermission></tr>
<tr>
<th><spring:message code="role_name"/></th>
<th><spring:message code="data_range"/></th>
<th><spring:message code="desc"/></th>
<c:if test="${fns:getUser().identity eq 1}">
<th><spring:message code="role_type"/></th>
</c:if>
<shiro:hasPermission name="sys:role:edit">
<th><spring:message code="operation"/></th>
</shiro:hasPermission>
</tr>
<c:forEach items="${list}" var="role">
<tr>
<td><a href="form?id=${role.id}">${role.name}</a></td>
<td>${fns:getDictLabel('SYS_DATA_SCOPE',role.dataScope,'无')}</td>
<td title="${role.remark}">${fns:abbr(role.remark,30)}</td>
<shiro:hasPermission name="sys:role:edit"><td>
<%--<a href="${ctx}/sys/role/assign?id=${role.id}"><spring:message code="allot"/></a> --%>
<a href="${ctx}/sys/role/form?id=${role.id}"><spring:message code="edit"/></a>
<a href="${ctx}/sys/role/delete?id=${role.id}" onclick="return confirmx('<spring:message code="sure_delete"/>', this.href)"><spring:message code="delete"/></a>
</td></shiro:hasPermission>
</tr>
<c:if test="${fns:getUser().identity eq 1 or (fns:getUser().identity eq 0 and role.roleType eq 'user')}">
<tr>
<td><a href="form?id=${role.id}">${role.name}</a></td>
<td>${fns:getDictLabel('SYS_DATA_SCOPE',role.dataScope,'无')}</td>
<td title="${role.remark}">${fns:abbr(role.remark,30)}</td>
<c:if test="${fns:getUser().identity eq 1}">
<td>
<c:if test="${role.roleType eq 'user' }"><spring:message code="ordinary_man"/></c:if>
<c:if test="${role.roleType eq 'security-role' }"><spring:message code="manager"/></c:if>
</td>
</c:if>
<shiro:hasPermission name="sys:role:edit"><td>
<%--<a href="${ctx}/sys/role/assign?id=${role.id}"><spring:message code="allot"/></a> --%>
<a href="${ctx}/sys/role/form?id=${role.id}"><spring:message code="edit"/></a>
<a href="${ctx}/sys/role/delete?id=${role.id}" onclick="return confirmx('<spring:message code="sure_delete"/>', this.href)"><spring:message code="delete"/></a>
</td></shiro:hasPermission>
</tr>
</c:if>
</c:forEach>
</table>

View File

@@ -12,12 +12,12 @@
$("#inputForm").validate({
rules: {
loginId: {remote: "${ctx}/sys/user/checkLoginName?oldLoginId=" + encodeURIComponent('${user.loginId}')},
// 'office.name': {officeIsValid: true },
'office.name': {officeIsValid: true },
'entity.name': {required: true }
},
messages: {
loginId: {remote: "<spring:message code='name_existed'/>"},
// 'office.name': {officeIsValid: "<spring:message code='company_range'/>"},
'office.name': {officeIsValid: "<spring:message code='company_range'/>"},
confirmNewPassword: {equalTo: "<spring:message code='equal_password'/>"}
},
submitHandler: function(form){
@@ -121,18 +121,18 @@
</div>
<span class="help-inline"><font color="red">*</font> </span>
</div>
<input type="hidden" name="company.id" value="0"/>
<!-- <input type="hidden" name="company.id" value="0"/> -->
<input type="hidden" name="entity.id" value="0"/>
<input type="hidden" name="office.id" value="0"/>
<%-- <div class="form-group">
<label class="col-md-3 control-label"><spring:message code="owner_company"/>:</label>
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="organizer"/>:</label>
<div class="col-md-4">
<sys:treeselect id="company" name="company.id" value="${user.company.id}" labelName="company.name" labelValue="${user.company.name}"
title="company" url="/sys/office/treeData?type=1" cssClass="required form-control" notAllowSelectRoot="true"/>
title="company" url="/sys/office/treeData" cssClass="required form-control" notAllowSelectRoot="true"/>
</div>
</div>
<div class="form-group">
<%-- <div class="form-group">
<label class="col-md-3 control-label"><spring:message code="organizer"/>:</label>
<div class="col-md-4">
<sys:treeselect id="entity" name="entity.id" value="${user.entity.id}" labelName="entity.name" labelValue="${user.entity.name}"
@@ -172,18 +172,24 @@
</div>
<span class="help-inline"><font color="red">*</font> </span>
</div>
<input type="hidden" name="identity" value="0"/>
<%-- <div class="form-group">
<label class="col-md-3 control-label"><spring:message code="identify_mark"></spring:message>:</label>
<div class="col-md-4 ">
<form:select path="identity" class="selectpicker select2 form-control">
<form:option value="0"><spring:message code="ordinary_man"/></form:option>
<form:option value="1"><spring:message code="manager"/></form:option>
</form:select>
<span class="help-inline"><font><spring:message code="manager_info"/></font></span>
</div>
</div> --%>
<c:choose>
<c:when test="${fns:getUser().identity eq 1}">
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="identify_mark"></spring:message>:</label>
<div class="col-md-4 ">
<form:select path="identity" class="selectpicker select2 form-control">
<form:option value="0"><spring:message code="ordinary_man"/></form:option>
<form:option value="1"><spring:message code="manager"/></form:option>
</form:select>
<span class="help-inline"><font><spring:message code="manager_info"/></font></span>
</div>
</div>
</c:when>
<c:otherwise>
<input type="hidden" name="identity" value="0"/>
</c:otherwise>
</c:choose>
<input type="hidden" name="email" value="0"/>
<%-- <div class="form-group">
<label class="col-md-3 control-label"><spring:message code="mail"/>:</label>
@@ -201,10 +207,12 @@
<div class="mt-checkbox-inline">
<c:forEach items="${allRoles}" var="role">
<label class="mt-checkbox">
<form:checkbox path="roleIdList" value="${role.id }" class="required" /> ${role.name }
<span></span>
</label>
<c:if test="${fns:getUser().identity eq 1 or (fns:getUser().identity eq 0 and role.roleType eq 'user' )}">
<label class="mt-checkbox">
<form:checkbox path="roleIdList" value="${role.id }" class="required" /> ${role.name }
<span></span>
</label>
</c:if>
</c:forEach>
<span class="help-inline "><font color="red">*</font> </span>
@@ -229,7 +237,9 @@
<div class="row">
<div class="col-md-offset-3 col-md-9">
<shiro:hasPermission name="sys:user:edit"></shiro:hasPermission>
<c:if test="${fns:getUser().id ne user.id }">
<button type="submit" class="btn blue"><spring:message code="submit"></spring:message></button>
</c:if>
<button type="button" class="btn blue btn-outline" onclick="history.go(-1)"><spring:message code="cancel"></spring:message></button>
</div>
</div>

View File

@@ -119,11 +119,14 @@
class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<%-- <th><spring:message code="company" /></th>
<th><spring:message code="group" /></th> --%>
<%--<th><spring:message code="group" /></th> --%>
<th class="sort-column login_id"><spring:message code="login_name" /></th>
<th class="sort-column name"><spring:message code="name" /></th>
<%-- <th><spring:message code="identify_mark" /></th> --%>
<th><spring:message code="organizer" /></th>
<c:if test="${fns:getUser().identity eq 1}">
<th><spring:message code="identify_mark" /></th>
</c:if>
<%-- <th><spring:message code="mail" /></th> --%>
<th><spring:message code="create_time" /></th>
<%--<th>角色</th> --%>
@@ -135,14 +138,26 @@
<tbody>
<c:forEach items="${page.list}" var="user">
<tr>
<td><a href="${ctx}/sys/user/form?id=${user.id}">${user.loginId}</a></td>
<td>${user.name}</td>
<td>${user.company.name }</td>
<c:if test="${fns:getUser().identity eq 1}">
<td>
<c:if test="${user.identity eq 0 }"><spring:message code="ordinary_man"/></c:if>
<c:if test="${user.identity eq 1 }"><spring:message code="manager"/></c:if>
</td>
</c:if>
<td><fmt:formatDate value="${user.createTime}"
pattern="yyyy-MM-dd HH:mm:ss" /></td>
<shiro:hasPermission name="sys:user:edit"></shiro:hasPermission>
<td><a href="${ctx}/sys/user/form?id=${user.id}"><spring:message code="edit" /></a> <a
href="${ctx}/sys/user/delete?id=${user.id}"
onclick="return confirmx('<spring:message code="sure_delete"/>', this.href)"><spring:message code="delete" /></a></td>
<td>
<c:if test="${fns:getUser().identity eq 1 or (fns:getUser().identity eq 0 and user.identity eq 0)}">
<a href="${ctx}/sys/user/form?id=${user.id}"><spring:message code="edit" /></a> <a
href="${ctx}/sys/user/delete?id=${user.id}"
onclick="return confirmx('<spring:message code="sure_delete"/>', this.href)"><spring:message code="delete" /></a>
</c:if>
</td>
</tr>
</c:forEach>
</tbody>

View File

@@ -237,8 +237,8 @@ jQuery.validator.addMethod("protocolPort",function(value, element) {
var protocolElement=$("[name='"+name.replace("destPort","protocol")+"']");
protocolVal=protocolElement.val();
}
if((protocolVal==0&&srcPortVal>0)||(protocolVal==0&&destPortVal>0)){
$.validator.messages.protocolPort=$.validator.messages.protocolPort;
if(protocolVal==0){
return true;
}else if((protocolVal!=tcp&&protocolVal!=udp&&srcPortVal>0)||(protocolVal!=tcp&&protocolVal!=udp&&destPortVal>0)){
$.validator.messages.protocolPort=$.validator.messages.protocolPort1;
return false;
@@ -250,7 +250,7 @@ jQuery.validator.addMethod("protocolPort",function(value, element) {
//ip地址校验
jQuery.validator.addMethod("ipCheck",function(value, element) {
var ipv4_ip_subnet_regexp=/^(0|1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])\.(0|1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(0|1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(0|1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\/(3[0-2]|1[6-9]|2[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\d|25[0-5]|[1-9]\d|\d)\.(0|1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(0|1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)$/;
@@ -370,7 +370,7 @@ jQuery.validator.addMethod("ipCheck",function(value, element) {
$.validator.messages.ipCheck=$.validator.messages.ipPart;
return false;
//}else if(!/^(0|2|4|8|16|32|64|128)$/.test(ipMaskArr[1])){
}else if(!/^(128)$/.test(ipMaskArr[1])){
}else if(!/^([2-9]|[1-9][0-9]|1[0-2][0-8])$/.test(ipMaskArr[1])){
$.validator.messages.ipCheck=$.validator.messages.ipv6MaskPart;
return false;
} else{
@@ -410,7 +410,6 @@ jQuery.validator.addMethod("ipCheck",function(value, element) {
}else if(typeInt==46){
var name=$(element).attr("name");
if(name.indexOf("srcIpAddress")>-1){
console.log("client ip must ipv4");
if(ipPattern==1){//ip/掩码格式
if(this.optional(element)||(/^(\d+)\.(\d+)\.(\d+)\.(\d+)\/(\d+)$/.test(value) && (RegExp.$1 <256 && RegExp.$2<256 && RegExp.$3<256 && RegExp.$4<256 && RegExp.$5<=32))){
if(ipv4_ip_subnet_regexp.test(value)){
@@ -468,7 +467,6 @@ jQuery.validator.addMethod("ipCheck",function(value, element) {
}
}
}else if(name.indexOf("destIpAddress")>-1){
console.log("server ip must ipv6");
if(ipPattern==1){//ip/掩码格式
if(this.optional(element)||ipv6_ip_subnet_regexp.test(value)){
return true;
@@ -485,7 +483,7 @@ jQuery.validator.addMethod("ipCheck",function(value, element) {
$.validator.messages.ipCheck=$.validator.messages.ipPart;
return false;
//}else if(!/^(0|2|4|8|16|32|64|128)$/.test(ipMaskArr[1])){
}else if(!/^(128)$/.test(ipMaskArr[1])){
}else if(!/^([2-9]|[1-9][0-9]|1[0-2][0-8])$/.test(ipMaskArr[1])){
$.validator.messages.ipCheck=$.validator.messages.ipv6MaskPart;
return false;
} else{
@@ -526,7 +524,6 @@ jQuery.validator.addMethod("ipCheck",function(value, element) {
}else if(typeInt==64){
var name=$(element).attr("name");
if(name.indexOf("srcIpAddress")>-1){
console.log("client ip must ipv6");
if(ipPattern==1){//ip/掩码格式
if(this.optional(element)||ipv6_ip_subnet_regexp.test(value)){
return true;
@@ -543,7 +540,7 @@ jQuery.validator.addMethod("ipCheck",function(value, element) {
$.validator.messages.ipCheck=$.validator.messages.ipPart;
return false;
//}else if(!/^(0|2|4|8|16|32|64|128)$/.test(ipMaskArr[1])){
}else if(!/^(128)$/.test(ipMaskArr[1])){
}else if(!/^([2-9]|[1-9][0-9]|1[0-2][0-8])$/.test(ipMaskArr[1])){
$.validator.messages.ipCheck=$.validator.messages.ipv6MaskPart;
return false;
} else{

View File

@@ -27,7 +27,7 @@
ipMask:"Please enter a correct IP/mask",
ipPart:"Invalid IP part",
//ipv6MaskPart:"Mask must be exponent of 2,not greater than 128",
ipv6MaskPart:"Mask must be 128",
ipv6MaskPart:"Mask must between 2 and 128",
//ipMaskRange:"IP mask must between 0 and 32",
ipMaskRange:"IP mask must between 16 and 32",
srcIpNotEqDestIp:"Client IP ",
@@ -74,6 +74,6 @@
log_1_hour:"Log For The Last Hour",
input:"Please Enter ",
protocolPort:"TCP protocol or UDP protocol must be chosen when port is greater than 0",
protocolPort1:"Only when TCP protocol or UDP protocol is chosen can port greater than 0"
protocolPort1:"Only when TCP protocol or UDP protocol is chosen can port greater than 0,ALL protocol has no limit"
});
}(jQuery));

View File

@@ -27,7 +27,7 @@
ipMask:"Введите правильный IP/маску",
ipPart:"Недопустимая часть IP",
//ipv6MaskPart:"Mаска-показатель степени 2, небольше 128",
ipv6MaskPart:"掩码必须为128",
ipv6MaskPart:"掩码介于2到128",
//ipMaskRange:"Маска IP между 0 и 32",
ipMaskRange:"Маска IP должна между 16 и 32",
srcIpNotEqDestIp:"IP Источник",
@@ -74,6 +74,6 @@
log_1_hour:"Log For The Last Hour",
input:"Please Enter ",
protocolPort:"TCP protocol or UDP protocol must be chosen when port is greater than 0",
protocolPort1:"Only when TCP protocol or UDP protocol is chosen can port greater than 0"
protocolPort1:"Only when TCP protocol or UDP protocol is chosen can port greater than 0,ALL protocol has no limit"
});
}(jQuery));

View File

@@ -27,7 +27,7 @@
ipMask:"请填写正确的IP地址/掩码",
ipPart:"IP部分格式错误",
//ipv6MaskPart:"掩码为不大于128的2的指数幂",
ipv6MaskPart:"掩码必须为128",
ipv6MaskPart:"掩码介于2到128",
//ipMaskRange:"IP掩码介于0到32",
ipMaskRange:"IP掩码介于16到32",
srcIpNotEqDestIp:"源IP ",
@@ -74,6 +74,6 @@
log_1_hour:"1小时日志量",
input:"请输入 ",
protocolPort:"端口大于0时必须选择TCP协议或者UDP协议",
protocolPort1:"只有tcp,udp协议端口号可以不为0"
protocolPort1:"只有tcp,udp协议端口号可以不为0,全部协议无限制"
});
}(jQuery));

View File

@@ -1302,16 +1302,16 @@ var viewAreaInfo=function(path,areaEffectiveIds,compileId){
title=$.validator.messages.area;//+" "+$.validator.messages.isp;
html+="<table class='table table-striped table-bordered table-condensed' style='margin-left: 10px; width: 96%;margin-top: 15px;'>";
html+="<thead>";
html+="<th style='width:50%;padding-right:0px'>"+$.validator.messages.area+"</th>";/* +
"<th style='width:50%;padding-right:0px'>"+$.validator.messages.isp+"</th>";*/
html+="<th style='width:50%;padding-right:0px'>"+$.validator.messages.area+"</th>" +
"<th style='width:50%;padding-right:0px'>"+$.validator.messages.isp+"</th>";
html+="</thead>";
html+="<tbody>";
for(i=0;i<data.areaIsps.length;i++){
html+="<tr>";
html+="<td>"+data.areaIsps[i].areaName;
html+="</td>";
/*html+="<td>"+data.areaIsps[i].ispName;
html+="</td>";*/
html+="<td>"+data.areaIsps[i].ispName;
html+="</td>";
html+="</tr>";
}
html+="</tbody>";