14 Commits

Author SHA1 Message Date
段冬梅
e7e95bb75c IP增加交集校验方法,暂时不开放 2019-02-27 10:48:50 +08:00
段冬梅
4f9a78e5d9 asn 作为域,已被策略引用并下发时,此asn不允许被删除 2019-02-19 11:59:28 +08:00
dongxiaoyan
446c8884ad TrafficPort趋势图单位由bytes改为 :Link Numbers
(cherry picked from commit fda327e4c1)
2019-02-18 19:27:17 +08:00
段冬梅
e147f29d55 asn no的组织组默认不下发全量;
恢复nis丢失的配置参数
2019-02-18 18:14:18 +08:00
dongxiaoyan
96656f24cf 日志趋势图提示信息国际化
(cherry picked from commit ae4cca4dfe)
2019-02-18 18:07:11 +08:00
dongxiaoyan
bb6668d00f 修改提示信息“No data to display”为“No data display within a specified time
range”;
时间格式化错误:最后的“。000”

(cherry picked from commit f3d4f0deec)
2019-02-18 18:06:46 +08:00
段冬梅
0f65e9aaa0 asn下发时表单增加 asn最大为4294967295的校验;
asn根据asn组处理asn ip,此逻辑打开asn ip的下发功能;
asn no处理asn ip时,只有全量是才需要删除asn no下旧的asn ip
2019-02-18 14:21:46 +08:00
段冬梅
b4a1a363d8 Merge branch 'develop' of https://git.mesalab.cn/K18_NTCS_WEB/NTC.git into develop 2019-02-18 14:14:49 +08:00
段冬梅
44be854707 asn ip导入入库时,判断是否全量,如果全量才需要删除旧的asnip 2019-02-18 14:14:17 +08:00
dongxiaoyan
7a3d68a7b3 ASN分组逻辑调整,配置使用ANS号对应组织的分组改为使用ANS号新增的唯一分组
(cherry picked from commit 5b49bf1d80)
2019-02-18 10:54:44 +08:00
董晓燕
be04a04336 Merge branch 'cherry-pick-e2292598' into 'develop'
注释掉:“CEIEC All Rights Reserved,CEIEC ©”;

See merge request K18_NTCS_WEB/NTC!37
2019-02-17 11:37:12 +08:00
dongxiaoyan
3639363a9b 1、根据 刘老师和园园要求注释掉:“CEIEC All Rights Reserved,CEIEC ©”;
2、提示信息:“未找到该菜单!”修改为“The menu was not found!”,未国际化,以后考虑国际化;
3、提示信息:“缓存清理成功”修改为“Cache Cleaning Successful!”,未国际化,以后考虑国际化;
4、提示信息:“缓存清理失败”修改为“Cache Cleanup Failure!”,未国际化,以后考虑国际化;
5、部分页面乱码修改;

(cherry picked from commit e2292598e9)
2019-02-17 11:36:15 +08:00
董晓燕
181f3d8fa0 Merge branch 'cherry-pick-90775bac' into 'develop'
Copyied! 修正为 Copied!

See merge request K18_NTCS_WEB/NTC!36
2019-02-17 11:30:38 +08:00
dongxiaoyan
a8f1a3c94a Copyied! 修正为 Copied!
(cherry picked from commit 90775bac0d)
2019-02-17 11:29:53 +08:00
35 changed files with 492 additions and 105 deletions

View File

@@ -34,8 +34,14 @@ public class AsnGroupInfo extends BaseCfg<AsnGroupInfo> implements Serializable{
private Integer regionId;
private Integer orgGroupId;
private Integer onlyGroupId;// ip地址独用组id
public Integer getOnlyGroupId() {
return onlyGroupId;
}
public void setOnlyGroupId(Integer onlyGroupId) {
this.onlyGroupId = onlyGroupId;
}
public Integer getOrgGroupId() {
return orgGroupId;
}

View File

@@ -212,7 +212,7 @@ public class ConfigDictUtils {
* @param compileId
* @return
*/
public static List<Integer> getASNIPNum(Integer groupId ) {
public static List<Integer> getASNIPNum(Long groupId ) {
List<Integer> ipNum=new ArrayList<>();
try {
if(!StringUtil.isEmpty(groupId)){

View File

@@ -1720,7 +1720,14 @@ public class BaseController {
//处理config_group_info和asn_group_info
asnIpCfgService.processGroup(serviceDict,asnNoMaps,asnOrgList,isSend,isImportAll.get(0).getItemCode());
if(!asnIpMaps.isEmpty()){
//未下发过的组织下asn ip信息
Map<Long,List<AsnIpCfg>> newAsnIpMap=Maps.newConcurrentMap();
int newAsnIpIndex=0;
//下发过的组织下asn ip信息
Map<Long,List<AsnIpCfg>> oldAsnIpMap=Maps.newConcurrentMap();
int oldAsnIpIndex=0;
int index=0;
List<AsnIpCfg> asnIpCfgs=Lists.newArrayList();
String asnIds="";
List<Integer> regionIds=Lists.newArrayList();
@@ -1765,7 +1772,7 @@ public class BaseController {
asnIpCfg.setAsnIpGroup(asnNoMaps.get(2).get(Long.parseLong(asnIpCfg.getUserRegion1())).getGroupId());
asnIpCfg.setCompileId(asnNoMaps.get(2).get(Long.parseLong(asnIpCfg.getUserRegion1())).getCompileId());
if(isSend.equals("1")) {
/*//已下发
//已下发
if(asnNoMaps.get(3).keySet().contains(Long.valueOf(asnIpCfg.getUserRegion1()))){
//groupId已经在了
if(oldAsnIpMap.keySet().contains(Long.valueOf(asnIpCfg.getAsnIpGroup()))){
@@ -1789,20 +1796,6 @@ public class BaseController {
newAsnIpIndex++;
}
}
*//**********************新的asn ip达到最大量后发送一次***********************//*
//未下发过的asnGroup
if(newAsnIpIndex==Constants.MAAT_JSON_SEND_SIZE){
asnIpCfgService.auditAsnIp(newAsnIpMap,asnNoMaps,"maat",newAsnIpIndex);
newAsnIpMap.clear();
newAsnIpIndex=0;
}
*//**********************新的asn ip达到最大量后发送一次***********************//*
//已下发过的asnGroup
if(oldAsnIpIndex==Constants.MAAT_JSON_SEND_SIZE){
asnIpCfgService.auditAsnIp(oldAsnIpMap,asnNoMaps,"common",oldAsnIpIndex);
oldAsnIpMap.clear();
oldAsnIpIndex=0;
}*/
}else{
asnIpCfgs.add(asnIpCfg);
@@ -1816,44 +1809,68 @@ public class BaseController {
isNullIndex++;
}
}
//
if(!StringUtil.isEmpty(asnIpCfgs) && asnIpCfgs.size()>Constants.MAAT_JSON_SEND_SIZE ){
if(!StringUtil.isEmpty(asnIds)){
asnIds=asnIds.substring(0,asnIds.length()-1);
}
asnIpCfgService.saveAsnIp(asnIpCfgs,asnIds);
asnIds="";
asnIpCfgs.clear();
}
/*if(isSend.equals("1")) {
//处理ASN IP时分组处理当处理完某一组的asnip量达到maat下发最大值时保存已处理的asn ipisSend=1并下发
if(isSend.equals("1")) {
//未下发过的asnGroup
if(!newAsnIpMap.isEmpty()){
if(!newAsnIpMap.isEmpty() && newAsnIpIndex >= Constants.MAAT_JSON_SEND_SIZE){
if(!StringUtil.isEmpty(asnIpCfgs) && !StringUtil.isEmpty(asnIds)){
asnIds=asnIds.substring(0,asnIds.length()-1);
asnIpCfgService.saveAsnIp(asnIpCfgs,asnIds,isImportAll.get(0).getItemCode());
asnIds="";
asnIpCfgs.clear();
}
asnIpCfgService.auditAsnIp(newAsnIpMap,asnNoMaps,"maat",newAsnIpIndex);
newAsnIpMap.clear();
newAsnIpIndex=0;
}
//已下发过的asnGroup
if(!oldAsnIpMap.isEmpty()){
if(!oldAsnIpMap.isEmpty() && oldAsnIpIndex >= Constants.MAAT_JSON_SEND_SIZE){
if(!StringUtil.isEmpty(asnIpCfgs) && !StringUtil.isEmpty(asnIds)){
asnIds=asnIds.substring(0,asnIds.length()-1);
asnIpCfgService.saveAsnIp(asnIpCfgs,asnIds,isImportAll.get(0).getItemCode());
asnIds="";
asnIpCfgs.clear();
}
asnIpCfgService.auditAsnIp(oldAsnIpMap,asnNoMaps,"common",oldAsnIpIndex);
oldAsnIpMap.clear();
oldAsnIpIndex=0;
}
}else {
if(!StringUtil.isEmpty(asnIpCfgs) && asnIpCfgs.size()>Constants.MAAT_JSON_SEND_SIZE ){
if(!StringUtil.isEmpty(asnIds)){
asnIds=asnIds.substring(0,asnIds.length()-1);
asnIpCfgService.saveAsnIp(asnIpCfgs,asnIds,isImportAll.get(0).getItemCode());
asnIds="";
asnIpCfgs.clear();
}
}
}
//仅仅需要保存的数
if(!StringUtil.isEmpty(asnIpCfgs)){
asnIpCfgService.saveAsnIp(asnIpCfgs);
asnIpCfgs.clear();
}
_ipPortCfgs.clear();
logger.error("ASN NO:"+e.getKey()+" :value"+e.getValue().size());*/
}
if(!StringUtil.isEmpty(asnIpCfgs) ){
if(!StringUtil.isEmpty(asnIds)){
asnIds=asnIds.substring(0,asnIds.length()-1);
}
asnIpCfgService.saveAsnIp(asnIpCfgs,asnIds);
asnIpCfgs.clear();
//处理ASN IP时最后一批未达到maat提交总量时也需要保存。
if(!StringUtil.isEmpty(asnIpCfgs) && !StringUtil.isEmpty(asnIds)){
asnIds=asnIds.substring(0,asnIds.length()-1);
asnIpCfgService.saveAsnIp(asnIpCfgs,asnIds,isImportAll.get(0).getItemCode());
asnIds="";
asnIpCfgs.clear();
}
if(isSend.equals("1")) {
//未下发过的asnGroup
if(!newAsnIpMap.isEmpty() ){
asnIpCfgService.auditAsnIp(newAsnIpMap,asnNoMaps,"maat",newAsnIpIndex);
newAsnIpMap.clear();
newAsnIpIndex=0;
}
//已下发过的asnGroup
if(!oldAsnIpMap.isEmpty() ){
asnIpCfgService.auditAsnIp(oldAsnIpMap,asnNoMaps,"common",oldAsnIpIndex);
oldAsnIpMap.clear();
oldAsnIpIndex=0;
}
}
}
//是否全量下发所有的asn info信息

View File

@@ -37,5 +37,5 @@ public interface AsnGroupInfoDao extends CrudDao<AsnGroupInfo> {
void insertWithId(AsnGroupInfo asnGroupInfo);
void insertWithoutId(AsnGroupInfo asnGroupInfo);
void updateIpNum(@Param("v4Num")long v4Num,@Param("v6Num")long v6Num,@Param("groupId")Integer groupId);
List<Object[]> getASNIPNum(@Param("asnNo")Integer asnNo);
List<Object[]> getASNIPNum(@Param("asnNo")Long asnNo);
}

View File

@@ -21,7 +21,7 @@
</resultMap>
<sql id="AsnGroupInfoColumns">
r.id,r.group_id,r.compile_id,r.organization,r.country,r.detail,r.is_valid,r.create_time,r.edit_time,
r.creator_id,r.editor_id,r.asn_id,r.issued_ips,r.is_used,r.region_id,r.org_group_id
r.creator_id,r.editor_id,r.asn_id,r.issued_ips,r.is_used,r.region_id,r.org_group_id,r.only_group_id
</sql>
<!-- 查出所有 有效数据-->
@@ -107,7 +107,8 @@
asn_id,
is_used,
region_id,
org_group_id
org_group_id,
only_group_id
)values (
#{groupId,jdbcType=INTEGER},
#{compileId,jdbcType=INTEGER},
@@ -122,7 +123,8 @@
#{asnId,jdbcType=INTEGER},
#{isUsed,jdbcType=INTEGER},
#{regionId,jdbcType=INTEGER},
#{orgGroupId,jdbcType=INTEGER}
#{orgGroupId,jdbcType=INTEGER},
#{onlyGroupId,jdbcType=INTEGER}
)
</insert>
<insert id="insertWithoutId" parameterType="com.nis.domain.basics.AsnGroupInfo" >
@@ -174,7 +176,8 @@
asn_id,
is_used,
region_id,
org_group_id
org_group_id,
only_group_id
)values (
#{id,jdbcType=INTEGER},
#{groupId,jdbcType=INTEGER},
@@ -190,7 +193,8 @@
#{asnId,jdbcType=INTEGER},
#{isUsed,jdbcType=INTEGER},
#{regionId,jdbcType=INTEGER},
#{orgGroupId,jdbcType=INTEGER}
#{orgGroupId,jdbcType=INTEGER},
#{onlyGroupId,jdbcType=INTEGER}
)
</insert>
<update id="update" parameterType="com.nis.domain.basics.AsnGroupInfo" >

View File

@@ -37,4 +37,5 @@ public interface AsnIpCfgDao extends CrudDao<AsnIpCfg>{
public void updateAsnIpByAsnGroups(@Param("entity")AsnIpCfg entity,@Param("asnGroups")List<AsnGroupInfo> asnGroups,@Param("asnIds")String asnIds);
public void deleteAll();
public List<Object[]> findAllAsnIpCfgList();
public List<AsnIpCfg> getASNIPList(AsnIpCfg entity);
}

View File

@@ -82,6 +82,9 @@
<if test="asnIpGroup != null and asnIpGroup != ''">
AND r.asn_Ip_Group =#{asnIpGroup,jdbcType=INTEGER}
</if>
<if test="userRegion1 != null and userRegion1 != ''">
AND r.user_region1 =#{userRegion1,jdbcType=INTEGER}
</if>
<if test="cfgRegionCode != null">
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
</if>
@@ -677,4 +680,13 @@
from asn_ip_cfg r
where r.is_valid !=-1
</select>
<select id="getASNIPList" resultMap="asnIpCfgMap" >
select
cfg_id,dest_ip_address
from asn_ip_cfg r
where r.is_valid!=-1
and r.is_audit!=3
and r.ip_type=#{ipType}
and r.user_region1 = #{userRegion1}
</select>
</mapper>

View File

@@ -3022,7 +3022,7 @@ public abstract class BaseService {
//<!-- 是否自动更新ASN NO -->
asnKeywordCfg.setUserRegion4(StringUtil.isEmpty(asnKeywordCfg.getUserRegion4()) ? "1":"0");
if("1".equals(asnKeywordCfg.getUserRegion4())){ //是否标记为下发ALL
signAuditAllGroupList.add(Integer.parseInt(asnKeywordCfg.getUserRegion4()));
signAuditAllGroupList.add(Integer.parseInt(asnKeywordCfg.getUserRegion3()));
}
groupWithRegion.put(asnKeywordCfg.getUserRegion2(), asnKeywordCfg.getUserRegion3());
//需要标记为is_used=1的组织
@@ -3107,6 +3107,169 @@ public abstract class BaseService {
}
/*if(asnList!=null && asnList.size()>0){
for (AsnKeywordCfg asnKeywordCfg : asnList) {
asnNoStr+=asnKeywordCfg.getCfgKeywords()+",";
}
AsnKeywordCfg cfg = new AsnKeywordCfg();
cfg.setTableName(AsnKeywordCfg.getTablename());
cfg.setCompileId(entity.getCompileId());
cfg.setIsAudit(entity.getIsAudit());
cfg.setIsValid(entity.getIsValid());
cfg.setAuditorId(entity.getAuditorId());
cfg.setAuditTime(entity.getAuditTime());
cfg.setFunctionId(entity.getFunctionId());
ipCfgDao.auditCfg(cfg);
Map<String,List> map = cfgConvert(strRegionList,asnList,7,entity,groupRelationList);
groupRelationList=map.get("groupList");
strRegionList=map.get("dstList");
}
//修改配置选中的ASN NO 和 asn orga是否被策略引用过
if(!StringUtil.isEmpty(asnNoStr)){
asnNoStr=asnNoStr.substring(0, asnNoStr.length()-1);
if(!StringUtil.isEmpty(asnNoStr)){
//如果asnGroup由is_use=0修改为is_use=1;查询asn no下所有未下发的asn ip并进行下发走POST接口【暂时不考虑】
AsnIpCfgDao asnIpCfgDao=SpringContextHolder.getBean(AsnIpCfgDao.class);
AsnIpCfg asnIp=new AsnIpCfg();
asnIp.setIsAudit(0);
asnIp.setIsValid(0);
List<AsnIpCfg> asnIpList=asnIpCfgDao.findAllListByAsnGroup(asnIp, null, asnNoStr);
//下发asn IP和修改asn ip的状态必须在一个事物中
//重新修改下发时间,下发人员信息
AsnIpCfg auditAsnIpCfg=new AsnIpCfg();
auditAsnIpCfg.setIsAudit(1);
auditAsnIpCfg.setAuditTime(new Date());
auditAsnIpCfg.setAuditorId(UserUtils.getUser().getId());
auditAsnIpCfg.setIsValid(1);
auditAllAsnRegionCfg(auditAsnIpCfg, null, asnNoStr);
AsnGroupInfoDao asnGroupInfoDao=SpringContextHolder.getBean(AsnGroupInfoDao.class);
asnGroupInfoDao.updateIsUsed(asnNoStr, 1);
}
}*/
}
/**
* ASN关键字配置处理 ip地址用
* @param asnList
* @param entity
*/
public void auditAsnCfgForIpAddr(List<GroupCfg> groupRelationList,List<StringCfg> strRegionList,BaseCfg entity,List<AsnKeywordCfg> asnList){
//注意一条配置是一个分组keywords=asnNos|userRegion1=groupId|userRegion2=isAuditAll 0 1
if(!StringUtil.isEmpty(asnList)){
AsnGroupInfoDao asnGroupInfoDao=SpringContextHolder.getBean(AsnGroupInfoDao.class);
ConfigGroupInfoDao configGroupInfoDao=SpringContextHolder.getBean(ConfigGroupInfoDao.class);
StringCfgDao stringCfgDao=SpringContextHolder.getBean(StringCfgDao.class);
//域和分组的关系
Map<String,String> groupWithRegion=new HashMap<>();
//需要标记为下发全部域的groupId集合
List signAuditAllGroupList=new ArrayList<>();
//需要标记下发的groupId
List isUsedGroupIdList=new ArrayList<>();
//所有已被策略引用过的域
List<AsnGroupInfo> auditRegionList=new ArrayList<>();
//所有未被策略过的域
List<AsnGroupInfo> notAuditRegionList=new ArrayList<>();
//所有策略所选asn No
List<String> asnGroupIdList=new ArrayList<>();
//所有未下发过的asnNo
List<String> notAuditGroupIdList=new ArrayList<>();
//最新的asn域集合
List<AsnKeywordCfg> newAsnList=new ArrayList<>();
//2、记录标记为下发all的groupId|存储组和asnno的关系|记录需要标记为已下发的group
for (AsnKeywordCfg asnKeywordCfg : asnList) {
//<!-- 是否自动更新ASN NO -->
asnKeywordCfg.setUserRegion4(StringUtil.isEmpty(asnKeywordCfg.getUserRegion4()) ? "1":"0");
if("1".equals(asnKeywordCfg.getUserRegion4())){ //是否标记为下发ALL
signAuditAllGroupList.add(Integer.parseInt(asnKeywordCfg.getUserRegion3()));
}
groupWithRegion.put(asnKeywordCfg.getUserRegion2(), asnKeywordCfg.getUserRegion5()); //UserRegion5 ip地址使用组
//需要标记为is_used=1的组织
if(!isUsedGroupIdList.contains(Integer.parseInt(asnKeywordCfg.getUserRegion3()))){
isUsedGroupIdList.add(Integer.parseInt(asnKeywordCfg.getUserRegion3()));
}
//需要标记为is_used=1的asn no根据groupId
asnGroupIdList.add(asnKeywordCfg.getUserRegion2());
AsnKeywordCfg asnCfg=new AsnKeywordCfg();
BeanUtils.copyProperties(entity, asnCfg,new String[]{"cfgId","userReigon1","userReigon2","userReigon3","userReigon4","userReigon5"});
asnCfg.setTableName(AsnKeywordCfg.getTablename());
asnCfg.setCfgId(asnKeywordCfg.getCfgId());
asnCfg.setUserRegion1(asnKeywordCfg.getUserRegion1());
asnCfg.setUserRegion2(asnKeywordCfg.getUserRegion2());
asnCfg.setUserRegion3(asnKeywordCfg.getUserRegion3());
asnCfg.setUserRegion4(asnKeywordCfg.getUserRegion4());
asnCfg.setUserRegion5(asnKeywordCfg.getUserRegion5());
stringCfgDao.updateAsnKeyword(asnCfg);
}
//3、//根据asnGroupIdList查询所有下发过的ASN NO
if(!StringUtil.isEmpty(asnGroupIdList)){
auditRegionList=asnGroupInfoDao.findAsnGroupInfoByGroupIds(asnGroupIdList, 1);
}
//已下发过的asn groupId只需要下发组
if(!StringUtil.isEmpty(auditRegionList)){
for (AsnGroupInfo asnGroupInfo : auditRegionList) {
AsnKeywordCfg cfg = new AsnKeywordCfg();
cfg.setCompileId(entity.getCompileId());
cfg.setRegionId(asnGroupInfo.getRegionId());
cfg.setGroupId(Integer.parseInt(groupWithRegion.get(asnGroupInfo.getGroupId().toString()))); //组号
cfg.setUserRegion3("0"); //是否下发域
cfg.setIsAudit(entity.getIsAudit());
cfg.setIsValid(entity.getIsValid());
cfg.setAuditorId(entity.getAuditorId());
cfg.setAuditTime(entity.getAuditTime());
newAsnList.add(cfg);
}
}
//4、查询所有未下发过的 ASN NO
if(!StringUtil.isEmpty(asnGroupIdList)){
notAuditRegionList=asnGroupInfoDao.findAsnGroupInfoByGroupIds(asnGroupIdList, 0);
}
if(!StringUtil.isEmpty(notAuditRegionList)){
for (AsnGroupInfo asnGroupInfo : notAuditRegionList) {
AsnKeywordCfg cfg = new AsnKeywordCfg();
cfg.initDefaultValue();
cfg.setTableName(AsnKeywordCfg.getTablename());
cfg.setCompileId(entity.getCompileId());
cfg.setCfgType(asnList.get(0).getCfgType());
cfg.setCfgKeywords(asnGroupInfo.getAsnId().toString());//关键字
cfg.setGroupId(Integer.parseInt(groupWithRegion.get(asnGroupInfo.getGroupId().toString()))); //groupId
cfg.setRegionId(asnGroupInfo.getRegionId());//regionid
cfg.setUserRegion3("1"); //是否下发域
cfg.setIsAudit(entity.getIsAudit());
cfg.setIsValid(entity.getIsValid());
cfg.setAuditorId(entity.getAuditorId());
cfg.setAuditTime(entity.getAuditTime());
cfg.setFunctionId(entity.getFunctionId());
newAsnList.add(cfg);
notAuditGroupIdList.add(asnGroupInfo.getGroupId().toString());
}
}
//5、修改所有下发的asn为已下发
if(!StringUtil.isEmpty(notAuditGroupIdList)){
asnGroupInfoDao.updateIsUsedAndIsValid(notAuditGroupIdList,1,null);
}
//6、标记组已被策略标记为全部下发
if(!StringUtil.isEmpty(signAuditAllGroupList)){
configGroupInfoDao.updateIsAuditAll(4, 1,signAuditAllGroupList );
}
//7、标记组已被策略引用
if(!StringUtil.isEmpty(isUsedGroupIdList)){
configGroupInfoDao.updateIsUsed(4, 1, isUsedGroupIdList);
}
//8、maat配置转换
if(!StringUtil.isEmpty(newAsnList)){
Map<String,List> map = cfgConvert(strRegionList,newAsnList,7,entity,groupRelationList);
}
}
/*if(asnList!=null && asnList.size()>0){
for (AsnKeywordCfg asnKeywordCfg : asnList) {

View File

@@ -80,6 +80,7 @@ public class AsnGroupInfoService extends BaseService{
entity.setCountry(country);
int groupId=0;
int onlyGroupId=0;//用于ip地址中下发配置组号
//新增
if(entity.getGroupId()==null){
@@ -110,10 +111,18 @@ public class AsnGroupInfoService extends BaseService{
}else {
throw new MaatConvertException("Get asn group id failed");
}
//新增组号用于ip地址新增业务
List<Integer> onlyGroupIds= ConfigServiceUtil.getId(2,1);
if(onlyGroupIds.size()>0) {
onlyGroupId=onlyGroupIds.get(0).intValue();
}else {
throw new MaatConvertException("Get asn group id failed");
}
Date createTime=new Date();
entity.setCreatorId(UserUtils.getUser().getId());
entity.setCreateTime(createTime);
entity.setGroupId(groupId);
entity.setOnlyGroupId(onlyGroupId);
entity.setOrgGroupId(configGroupInfo.getGroupId());
entity.setIsValid(0);
//分组已被策略设定为下发全部域则需要自动下发新增的asno
@@ -193,13 +202,15 @@ public class AsnGroupInfoService extends BaseService{
List srcList=new ArrayList<>();
AsnKeywordCfg cfg=new AsnKeywordCfg();
cfg.initDefaultValue();
cfg.setGroupId(group.getGroupId());
// cfg.setGroupId(group.getGroupId());
cfg.setGroupId(entity.getOnlyGroupId());// 用于ip地址 asn
cfg.setCfgKeywords(entity.getAsnId().toString());
cfg.setRegionId(entity.getRegionId());
cfg.setCfgType(Constants.NTC_ASN_NUMBER);
cfg.setAuditTime(new Date());
srcList.add(cfg);
srcMap.put(group.getGroupId(), srcList);
// srcMap.put(group.getGroupId(), srcList);
srcMap.put(entity.getOnlyGroupId(), srcList);// 用于ip地址 asn
GroupReuseAddBean commonGroupBean=new GroupReuseAddBean();
List<GroupReuseCfg> commonGroupList=new ArrayList<>();
commonGroupList=convertCommonRegion(srcMap,commonGroupList,1,2,4);

View File

@@ -2,8 +2,6 @@ package com.nis.web.service.basics;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@@ -19,12 +17,10 @@ import org.springframework.transaction.annotation.Transactional;
import com.beust.jcommander.internal.Lists;
import com.google.common.collect.Maps;
import com.nis.domain.FunctionRegionDict;
import com.nis.domain.FunctionServiceDict;
import com.nis.domain.Page;
import com.nis.domain.basics.AsnGroupInfo;
import com.nis.domain.basics.AsnIpCfg;
import com.nis.domain.configuration.AsnKeywordCfg;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.maat.GroupReuseAddBean;
@@ -38,9 +34,10 @@ import com.nis.domain.maat.MaatCfg.StringCfg;
import com.nis.domain.maat.ToMaatBean;
import com.nis.domain.maat.ToMaatResult;
import com.nis.domain.specific.ConfigGroupInfo;
import com.nis.exceptions.MaatConvertException;
import com.nis.util.ConfigServiceUtil;
import com.nis.util.Constants;
import com.nis.util.DictUtils;
import com.nis.util.IPUtil;
import com.nis.util.StringUtil;
import com.nis.web.dao.CrudDao;
import com.nis.web.dao.basics.AsnGroupInfoDao;
@@ -108,6 +105,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
}
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void update(AsnIpCfg entity){
//checkAsnIp(entity);
List<AsnIpCfg> auditAsnIpList=new ArrayList<>();
List<AsnGroupInfo> auditAsnGroupList=new ArrayList<>();
Date editTime=new Date();
@@ -172,15 +170,25 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
auditAllAsnRegionCfg(entity,auditAsnGroupList,null);
}*/
}
/**
*
* @param asnIpCfgs
* @param asnIds
* @param isImportAll 增量或者全量
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void saveAsnIp(List<AsnIpCfg> asnIpCfgs,String asnIds){
public void saveAsnIp(List<AsnIpCfg> asnIpCfgs,String asnIds,String isImportAll){
logger.warn("Start to only save asn ip size:"+asnIpCfgs.size());
long start=System.currentTimeMillis();
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
SqlSession batchSqlSession = null;
try{
if(!StringUtil.isEmpty(asnIpCfgs)){
asnIpCfgDao.deleteByAsnId(asnIds);
//全量时需要删除asn 下的所有ip
if("1".equals(isImportAll)){
asnIpCfgDao.deleteByAsnId(asnIds);
}
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
for (AsnIpCfg cfg : asnIpCfgs) {
((AsnIpCfgDao) batchSqlSession.getMapper(AsnIpCfgDao.class)).insert(cfg);
@@ -296,12 +304,12 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
maatBean.setOpAction(Constants.INSERT_ACTION);
//调用服务接口下发配置数据
String json=gsonToJson(maatBean);
//logger.info("asn ip maat结构配置下发配置参数"+json);
logger.info("asn ip maat结构配置下发配置参数");
logger.info("asn ip maat结构配置下发配置参数"+json);
//logger.info("asn ip maat结构配置下发配置参数");
//调用服务接口下发配置
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
//logger.info("asn ip maat结构配置下发响应信息"+result.getMsg());
logger.info("asn ip maat结构配置下发响应信息");
logger.info("asn ip maat结构配置下发响应信息"+result.getMsg());
//logger.info("asn ip maat结构配置下发响应信息");
}else{
if(!StringUtil.isEmpty(auditList)){
asnIPRegionSendToMaat(auditList, 1, Constants.OPACTION_POST);
@@ -394,6 +402,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
List<Integer> compileIds=ConfigServiceUtil.getId(1, newAsnGroup.size());
List<Integer> groupIds=ConfigServiceUtil.getId(2, newAsnGroup.size());
List<Integer> regionIds=ConfigServiceUtil.getId(3, newAsnGroup.size());
int onlyGroupId=0;//用于ip地址中下发配置组号
for(Entry<Long, AsnGroupInfo> e:newAsnGroup.entrySet()) {
AsnGroupInfo asnGroupInfo=e.getValue();
asnGroupInfo.setAsnId(e.getKey());
@@ -405,6 +414,14 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
asnGroupInfo.setCompileId(compileIds.get(index));
asnGroupInfo.setRegionId(regionIds.get(index));
asnGroupInfo.setOrgGroupId(asnOrgList.get(1).get(asnGroupInfo.getOrganization()).getGroupId());
//新增组号用于ip地址新增业务
List<Integer> onlyGroupIds= ConfigServiceUtil.getId(2,1);
if(onlyGroupIds.size()>0) {
onlyGroupId=onlyGroupIds.get(0).intValue();
}else {
throw new MaatConvertException("Get asn group id failed");
}
asnGroupInfo.setOnlyGroupId(onlyGroupId);
asnNoMaps.get(0).put(e.getKey(), asnGroupInfo);//设置完各种id后更新map数据
asnNoMaps.get(2).put(e.getKey(), asnGroupInfo);//设置完各种id后更新map数据
((AsnGroupInfoDao) batchSqlSession.getMapper(AsnGroupInfoDao.class)).insertWithId(asnGroupInfo);
@@ -642,6 +659,76 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
asnIPRegionSendToMaat(auditAsnIpList,Constants.VALID_YES,Constants.OPACTION_POST);
}*/
}
/**
* 计算用户修改后的IP段
* @param entity
*/
public void checkAsnIp(AsnIpCfg entity) {
long start=System.currentTimeMillis();
logger.info("开始计算ASN IP");
List<String[]> resultIpList=new ArrayList<>();
boolean flag=true;
if(!StringUtil.isEmpty(entity.getId())) {
AsnIpCfg oldAsnIp=asnIpCfgDao.getOne(entity);
if(oldAsnIp.getDestIpAddress().equals(entity.getDestIpAddress())) {
flag=false;
}
}
//开始校验
if(flag) {
String nowIp=entity.getDestIpAddress().split("/")[0];
int nowIpMask=Integer.parseInt(entity.getDestIpAddress().split("/")[1]);
List<String> nowIpList=IPUtil.getIPRange(nowIp,nowIpMask);
//根据asn 和iptype 获取asn下的所有ip除当前IP外的
List<AsnIpCfg> asnIpList=asnIpCfgDao.getASNIPList(entity);
int equal=0;
int containsLeftAndRight=0;
int containsLeft=0;
int containsRight=0;
int whithoutLeftAndRight=0;
String equalStr="";
String containsLeftAndRightStr="";
String containsLeftStr="";
String containsRightStr="";
String whithoutLeftAndRightStr="";
for (AsnIpCfg asnIpCfg : asnIpList) {
String ip=asnIpCfg.getDestIpAddress().split("/")[0];
int ipMask=Integer.parseInt(asnIpCfg.getDestIpAddress().split("/")[1]);
List<String> ipList=IPUtil.getIPRange(ip, ipMask);
//左等 && 右等
if((nowIpList.get(0).equals(ipList.get(0))) && (nowIpList.get(nowIpList.size()-1).equals(ipList.get(ipList.size()-1)))) {
equal++;
equalStr+=asnIpCfg.getDestIpAddress()+",";
//左在里面,右在里面
}else if((ipList.contains(nowIpList.get(0))) && (ipList.contains(nowIpList.get(nowIpList.size()-1)))) {
containsLeftAndRight++;
containsLeftAndRightStr+=asnIpCfg.getDestIpAddress()+",";
//只有左在里面
}else if(ipList.contains(nowIpList.get(0))){
containsLeft++;
containsLeftStr+=asnIpCfg.getDestIpAddress()+",";
//只有右在里面
}else if(ipList.contains(nowIpList.get(nowIpList.size()-1))){
containsRight++;
containsRightStr+=asnIpCfg.getDestIpAddress()+",";
//旧的左右都在新的里面
}else if(nowIpList.contains(ipList.get(ipList.size()-1)) && nowIpList.contains(ipList.get(0))){
whithoutLeftAndRight++;
whithoutLeftAndRightStr+=asnIpCfg.getDestIpAddress()+",";
}
}
logger.info("完全匹配:("+equal+")"+equalStr);
logger.info("中间交集(被包含):("+containsLeftAndRight+")"+containsLeftAndRightStr);
logger.info("左侧交集:("+containsLeft+")"+containsLeftStr);
logger.info("右侧交集:("+containsLeft+")"+containsLeftStr);
logger.info("中间交集(包含):("+whithoutLeftAndRight+")"+whithoutLeftAndRightStr);
}
long end=System.currentTimeMillis();
logger.info("结束计算ASN IP"+(end-start));
}
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void delete(String ids) {
/*for(String id:ids.split(",")) {

View File

@@ -372,6 +372,7 @@ public class AppCfgService extends BaseService {
configGroupInfo.setGroupId(specificServiceCfg.getGroupId());
configGroupInfo.setGroupName(specificServiceCfg.getSpecServiceName());
configGroupInfo.setIsIssued(0);
configGroupInfo.setInsertTime(new Date());
configGroupInfo.setGroupType(1);
configGroupInfo.setCompileId(compileId);
configGroupInfoDao.insertConfigGroupInfo(configGroupInfo);

View File

@@ -560,7 +560,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
}
}
//asn配置下发
auditAsnCfg(groupRelationList,strRegionList,entity,entity.getAsnKeywords());
auditAsnCfgForIpAddr(groupRelationList,strRegionList,entity,entity.getAsnKeywords());
//保存区域IP信息
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
if(!StringUtil.isEmpty(areaIpCfgList)){

View File

@@ -1447,7 +1447,7 @@ max_input=Fill in at most four
no_need_input=Attributes no need to be filled in
close_link=Close
asn_group=ASN Group
can_not_edit_issued_ans_group=Can not edit valid ASN group
can_not_delete_issued_ans_group=Can not delete issued ASN
can_not_delete_asn_group_with_audited_ip=Can not delete ASN group with approved IP
organization=Organization
mismatch=Mismatch

View File

@@ -1451,7 +1451,7 @@ max_input=\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043c\u0430\u0
no_need_input=\u041D\u0435 \u043D\u0443\u0436\u043D\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u044F\u0442\u044C \u043F\u0440\u0438\u0437\u043D\u0430\u043A\u0438
close_link=\u0417\u0430\u043A\u0440\u044B\u0442\u043E\u0435 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435
asn_group=ASN \u0433\u0440\u0443\u043F\u043F\u0430
can_not_edit_issued_ans_group=\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u0443\u044E \u0433\u0440\u0443\u043F\u043F\u0443 ASN
can_not_delete_issued_ans_group=\u0412\u044B\u043F\u0443\u0449\u0435\u043D\u043D\u044B\u0439 ASN \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0443\u0434\u0430\u043B\u0435\u043D.
can_not_delete_asn_group_with_audited_ip=\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0433\u0440\u0443\u043F\u043F\u0443 ASN \u0441 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u043D\u044B\u043C IP-\u0430\u0434\u0440\u0435\u0441\u043E\u043C
organization=\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F
mismatch=\u041D\u0435\u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435

View File

@@ -1447,7 +1447,7 @@ max_input=\u6700\u591a\u586b\u5199\u56db\u4e2a
no_need_input=\u65e0\u9700\u586b\u5199\u5c5e\u6027
close_link=\u5173\u95ed
asn_group=ASN\u7ec4
can_not_edit_issued_ans_group=\u4e0d\u80fd\u4fee\u6539\u6709\u6548\u7684ASN\u7ec4
can_not_delete_issued_ans_group=\u5DF2\u4E0B\u53D1ASN\u4E0D\u5141\u8BB8\u88AB\u5220\u9664
can_not_delete_asn_group_with_audited_ip=\u4e0d\u80fd\u5220\u9664\u5305\u542b\u5ba1\u6838\u901a\u8fc7ip\u7684ASN\u7ec4
organization=\u7ec4\u7ec7
mismatch=\u4e0d\u5339\u914d

View File

@@ -613,6 +613,9 @@ blockAndDropStat=v1/blockAndDropStat
#\u914d\u7f6e\u542f\u505c\u63a5\u53e3
configStartStop=v2/configStartStop
trafficAppTrend=v1/trafficAppTrend
#Http\u6cdb\u6536
ntcHttpRecordLog=v1/ntcHttpRecordLogs
asn_region_key=AppTrend
appConnRecordTop100=v1/appConnRecordTop100
#SSL\u6cdb\u6536
ntcSslRecordLog=v1/ntcSslRecordLogs
@@ -620,4 +623,7 @@ ntc_asn_number=NTC_ASN_NUMBER
addRegionToCommonGroup=v1/addRegionToCommonGroup
updateRegionToCommonGroup=v1/updateCommonGroupRegion
deleteRegionToCommonGroup=v1/delCommonGroupRegion
asn_key=AS
#Http\u6cdb\u6536
ntcHttpRecordLog=v1/ntcHttpRecordLogs
asn_region_key=ASN_ID

View File

@@ -0,0 +1 @@
ALTER TABLE asn_group_info ADD only_group_id int(11) DEFAULT NULL COMMENT '用于ip地址下发业务';

View File

@@ -419,7 +419,7 @@
<description>根据asnGroupId获取asn 的v4数量和v6数量</description>
<name>getASNIPNum</name>
<function-class>com.nis.util.ConfigDictUtils</function-class>
<function-signature>java.util.List getASNIPNum(java.lang.Integer)</function-signature>
<function-signature>java.util.List getASNIPNum(java.lang.Long)</function-signature>
<example>${fns:getASNIPNum(str)}</example>
</function>
</taglib>

View File

@@ -81,7 +81,7 @@ $(function(){
<div class="form-group asnNo">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="asn_no"/></label>
<div class="col-md-6">
<input id="asnNo" class="form-control required asnNoUnique number" type="text" name="asnId" value="${_cfg.asnId}" autocomplete="off" maxlength="15" ctx="${ctx }">
<input id="asnNo" class="form-control required asnNoUnique number" type="text" name="asnId" value="${_cfg.asnId}" autocomplete="off" maxlength="10" max="4294967295" ctx="${ctx }">
</div>
<div for="asnId"></div>
</div>

View File

@@ -45,15 +45,20 @@
ids.push($(this).attr("id"));
asnIds.push($(this).attr("asnId"));
groupIds.push($(this).attr("asnGroup"));
/* if($(this).attr("isIssued")==1){
if($(this).attr("isUsed")==1){
canDel=false;
} */
}
}
});
if(str.substr(str.length-1)== ','){
ids = str.substr(0,str.length-1);
}
var tip='<spring:message code="can_not_delete_asn_group_with_audited_ip"/>';
var tip='<spring:message code="can_not_delete_issued_ans_group"/>';
if(!canDel){
$.jBox.tip(tip);
return false;
}
if(str.substr(str.length-1)== ','){
ids = str.substr(0,str.length-1);
}
tip='<spring:message code="can_not_delete_asn_group_with_audited_ip"/>';
if(asnIds.length>0){
$.ajax({
type:'post',
@@ -278,7 +283,7 @@
<tbody>
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
<tr>
<td><input type="checkbox" class="i-checks" id="${cfg.id}" asnId="${cfg.asnId}" isValid="${cfg.isValid}" asnGroup="${cfg.groupId}"></td>
<td><input type="checkbox" class="i-checks" id="${cfg.id}" asnId="${cfg.asnId}" isValid="${cfg.isValid}" isUsed="${cfg.isUsed}" asnGroup="${cfg.groupId}"></td>
<td>
<a href="javascript:;" data-original-title="${cfg.organization}"
class="tooltips" data-flag="false" data-html="true" data-placement="top">

View File

@@ -152,6 +152,14 @@
</div>
</div>
</div>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<span class="form-control" ><spring:message code="asn_no"/></span>
</div>
<input name="userRegion1" id="userRegion1" type="text" class="form-control input-medium" value="${cfg.userRegion1}" />
</div>
</div>
<div class="pull-left">
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>

View File

@@ -26,8 +26,10 @@
<input type="hidden" name="${cfgName}.userRegion2" value="">
<!-- asn no组织的groupId 【界面每次校验的时候填写】-->
<input type="hidden" name="${cfgName}.userRegion3" value="">
<!--ip地址 asn no组号的groupId -->
<input type="hidden" name="${cfgName}.userRegion5" value="">
<!-- 是否自动更新ASN NO -->
<input type="hidden" name="${cfgName}.userRegion4" value="${cfg.userRegion4}">
<input type="hidden" name="${cfgName}.userRegion4" value="0">
<%-- <div class="hidden" id="selectAll"><spring:message code="select_All_Text"/></div>
<div class="hidden" id="deselectAll"><spring:message code="deselect_All_Text"/></div>
<input type="hidden" name="${cfgName}.organizationGroupId" value="${cfg.userRegion1}">

View File

@@ -148,7 +148,8 @@ function showActionTransChart(xData,series){
xAxis: {
type:'datetime',
dateTimeLabelFormats: {
second: '%H:%M:%S',
millisecond: '%H:%M:%S',
second: '%H:%M:%S',
minute: '%H:%M',
hour: '%H:%M',
day: '%m-%d',
@@ -405,6 +406,61 @@ function showActionTransChart(xData,series){
return prev + curr;
});
}
//配置趋势图需特殊提示所以从公共js文件中拿出无数据提示方法到本文件中
var log_data=$.validator.messages.log_no_data;
(function(d) {
"object" === typeof module && module.exports ? module.exports = d: d(Highcharts)
})(function(d) { (function(c) {
var d = c.seriesTypes,
e = c.Chart.prototype,
f = c.getOptions(),
g = c.extend,
h = c.each;
g(f.lang, {
noData: log_data
});
f.noData = {
position: {
x: 0,
y: 0,
align: "center",
verticalAlign: "middle"
}
};
f.noData.style = {
fontWeight: "bold",
fontSize: "12px",
color: "#666666"
};
h("bubble gauge heatmap pie sankey treemap waterfall".split(" "),
function(b) {
d[b] && (d[b].prototype.hasData = function() {
return !! this.points.length
})
});
c.Series.prototype.hasData = function() {
return this.visible && void 0 !== this.dataMax && void 0 !== this.dataMin
};
e.showNoData = function(b) {
var a = this.options;
b = b || a && a.lang.noData;
a = a && a.noData; ! this.noDataLabel && this.renderer && (this.noDataLabel = this.renderer.label(b, 0, 0, null, null, null, a.useHTML, null, "no-data"), this.noDataLabel.attr(a.attr).css(a.style), this.noDataLabel.add(), this.noDataLabel.align(g(this.noDataLabel.getBBox(), a.position), !1, "plotBox"))
};
e.hideNoData = function() {
this.noDataLabel && (this.noDataLabel = this.noDataLabel.destroy())
};
e.hasData = function() {
for (var b = this.series || [], a = b.length; a--;) if (b[a].hasData() && !b[a].options.isInternal) return ! 0;
return this.loadingShown
};
c.addEvent(c.Chart, "render",
function() {
this.hasData() ? this.hideNoData() : this.showNoData()
})
})(d)
});
</script>
</body>
</html>

View File

@@ -182,7 +182,7 @@ function showPortActiveChart(xData,series){
},
yAxis: {
title: {
text: 'bytes'
text: 'Link Numbers'
}
},
tooltip: {

View File

@@ -176,7 +176,7 @@ function searchForm() {
search_txt = search_txt.substring(search_txt.lastIndexOf('_'));
$("#menu"+search_txt+" >a").trigger('click');
}else {
alert('未找到该菜单!');
alert('The menu was not found!');
}
}
@@ -219,9 +219,9 @@ function refreshCache(cacheName){
async:false,
success:function(data,textStatus){
if(data=="success"){
alert("缓存清理成功");
alert("Cache Cleaning Successful!");
}else{
alert("缓存清理失败");
alert("Cache Cleanup Failure!");
}
}
})
@@ -517,7 +517,7 @@ background:#3d3d3d;
<!-- BEGIN FOOTER -->
<div class="page-footer" style="position: fixed;right: 0;left: 0;z-index: 1030;">
<div class="page-footer-inner">
CEIEC All Rights ReservedCEIEC &copy;
<!--CEIEC All Rights ReservedCEIEC &copy;-->
</div>
<div class="scroll-to-top">
<i class="icon-arrow-up"></i>

View File

@@ -176,7 +176,7 @@ function searchForm() {
search_txt = search_txt.substring(search_txt.lastIndexOf('_'));
$("#menu"+search_txt+" >a").trigger('click');
}else {
alert('未找到该菜单!');
alert('The menu was not found!');
}
}
@@ -219,9 +219,9 @@ function refreshCache(cacheName){
async:false,
success:function(data,textStatus){
if(data=="success"){
alert("缓存清理成功");
alert("Cache Cleaning Successful!");
}else{
alert("缓存清理失败");
alert("Cache Cleanup Failure!");
}
}
})
@@ -384,7 +384,7 @@ background:#3d3d3d;
</span>
</a>
</li>
<!-- 系统语言 -->
<!-- 系统语言 -->
<li class="dropdown dropdown-user" id="language">
@@ -516,7 +516,7 @@ background:#3d3d3d;
<!-- BEGIN FOOTER -->
<div class="page-footer" style="position: fixed;right: 0;left: 0;z-index: 1030;">
<div class="page-footer-inner">
CEIEC All Rights ReservedCEIEC &copy;
<!--CEIEC All Rights ReservedCEIEC &copy;-->
</div>
<div class="scroll-to-top">
<i class="icon-arrow-up"></i>
@@ -559,7 +559,7 @@ background:#3d3d3d;
}
}
//window.onload = function() {
// fullScreen();//直接执行onclick中的函数就行
// fullScreen();//直接执行onclick中的函数就行
//}
</script>
</body>

View File

@@ -187,7 +187,8 @@ function searchForm() {
search_txt = search_txt.substring(search_txt.lastIndexOf('_'));
$("#menu"+search_txt+" >a").trigger('click');
}else {
alert('未找到该菜单!');
alert('The menu was not found!');
//alert('未找到该菜单!');
}
}
@@ -230,9 +231,9 @@ function refreshCache(cacheName){
async:false,
success:function(data,textStatus){
if(data=="success"){
alert("缓存清理成功");
alert("Cache Cleaning Successful!");
}else{
alert("缓存清理失败");
alert("Cache Cleanup Failure!");
}
}
})
@@ -547,7 +548,7 @@ background:#3d3d3d;
<!-- BEGIN FOOTER -->
<div class="page-footer" style="position: fixed;right: 0;left: 0;z-index: 1030;">
<div class="page-footer-inner">
CEIEC All Rights ReservedCEIEC &copy;
<!--CEIEC All Rights ReservedCEIEC &copy;-->
</div>
<div class="scroll-to-top">
<i class="icon-arrow-up"></i>

View File

@@ -166,7 +166,7 @@
</div><!-- /.row -->
</div><!-- /.main-container -->
<div class="foot">
<span>CEIEC All Rights Reserved, CEIEC © </span>
<span><!--CEIEC All Rights ReservedCEIEC &copy;--> </span>
</div>
<script src="${pageContext.request.contextPath}/static/global/plugins/jquery.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/js.cookie.min.js" type="text/javascript"></script>

View File

@@ -91,7 +91,7 @@
<div class="page-footer-custom">
CEIEC All Rights ReservedCEIEC &copy;
<!--CEIEC All Rights ReservedCEIEC &copy;-->
<%-- Copyright &copy; 2015-${fns:getStringProperty('copyrightYear','2015')} <a href="${pageContext.request.contextPath}">${fns:getStringProperty('productName','NIS')}</a> - Powered By <a href="${pageContext.request.contextPath}" target="_blank">NIS</a> ${fns:getStringProperty('version','1.0.0')} --%>
</div>

View File

@@ -183,7 +183,7 @@
</div><!-- /.row -->
</div><!-- /.main-container -->
<div class="foot">
<span>CEIEC All Rights Reserved, CEIEC © </span>
<span><!--CEIEC All Rights ReservedCEIEC &copy;--></span>
</div>
<!--[if lt IE 9]>
<script src="${pageContext.request.contextPath}/static/global/plugins/respond.min.js"></script>
@@ -561,7 +561,7 @@
<script type="text/javascript">
var fullflag = false;
// 全屏代码
// 鍏ㄥ睆浠g爜
function fullScreen() {
if(fullflag){
exitFullScreen();

View File

@@ -965,6 +965,7 @@ jQuery.validator.addMethod("asnNoUnique",function(value, element) {
if(textStatus=="success"){
if(data == null || data.id==null || data.id == 'undefined'){
result=true;
}else{
/*if($(element).attr("name")
&& $(element).attr("name") != ''){
@@ -977,6 +978,7 @@ jQuery.validator.addMethod("asnNoUnique",function(value, element) {
}*/
result=false;
}
console.log(result)
}
}
@@ -1007,6 +1009,7 @@ jQuery.validator.addMethod("asnMustExists",function(value, element) {
$("input[name='"+name[0]+".userRegion1']").val(data.regionId);
$("input[name='"+name[0]+".userRegion2']").val(data.groupId);
$("input[name='"+name[0]+".userRegion3']").val(data.commonGroupIds);
$("input[name='"+name[0]+".userRegion5']").val(data.onlyGroupId);
var commonGroupIds=$("input[name='commonGroupIds']").val();
if(commonGroupIds !=null
&& commonGroupIds != ''

View File

@@ -89,6 +89,7 @@
arbitrary:"Arbitrarily",
log_trend:"Log Trend",
info:"Prompt",
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!"
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
log_no_data:"This hour no data"
});
}(jQuery));

View File

@@ -89,6 +89,7 @@
arbitrary:"Любой",
log_trend:"Журнал Тенденция",
info:"Инфо",
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!"
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
log_no_data:"Нет данных за этот час"
});
}(jQuery));

View File

@@ -89,6 +89,7 @@
arbitrary:"任意",
log_trend:"日志趋势",
info:"提示",
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!"
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!",
log_no_data:"本小时无数据"
});
}(jQuery));

View File

@@ -156,7 +156,7 @@ $(function(){
$(this).attr("data-clipboard-text",$(this).attr("data-original-title"));
var clipboard = new ClipboardJS('td >.tooltips');
clipboard.on('success', function(e) {
top.$.jBox.tip("Copyied!",'copy',{opacity:0.5,persistent:false});
top.$.jBox.tip("Copied!",'copy',{opacity:0.5,persistent:false});
console.log(e);
e.clearSelection();
});
@@ -170,7 +170,7 @@ $(function(){
$(this).attr("data-clipboard-text",$(this).attr("titleHidden"));
var clipboard = new ClipboardJS('td[titleHidden]');
clipboard.on('success', function(e) {
top.$.jBox.tip("Copyied!",'copy',{opacity:0.5,persistent:false});
top.$.jBox.tip("Copied!",'copy',{opacity:0.5,persistent:false});
// console.log(e);
e.clearSelection();
});