Compare commits
14 Commits
devlop_url
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7e95bb75c | ||
|
|
4f9a78e5d9 | ||
|
|
446c8884ad | ||
|
|
e147f29d55 | ||
|
|
96656f24cf | ||
|
|
bb6668d00f | ||
|
|
0f65e9aaa0 | ||
|
|
b4a1a363d8 | ||
|
|
44be854707 | ||
|
|
7a3d68a7b3 | ||
|
|
be04a04336 | ||
|
|
3639363a9b | ||
|
|
181f3d8fa0 | ||
|
|
a8f1a3c94a |
@@ -34,8 +34,14 @@ public class AsnGroupInfo extends BaseCfg<AsnGroupInfo> implements Serializable{
|
|||||||
private Integer regionId;
|
private Integer regionId;
|
||||||
private Integer orgGroupId;
|
private Integer orgGroupId;
|
||||||
|
|
||||||
|
private Integer onlyGroupId;// ip地址独用组id
|
||||||
|
|
||||||
|
public Integer getOnlyGroupId() {
|
||||||
|
return onlyGroupId;
|
||||||
|
}
|
||||||
|
public void setOnlyGroupId(Integer onlyGroupId) {
|
||||||
|
this.onlyGroupId = onlyGroupId;
|
||||||
|
}
|
||||||
public Integer getOrgGroupId() {
|
public Integer getOrgGroupId() {
|
||||||
return orgGroupId;
|
return orgGroupId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ public class ConfigDictUtils {
|
|||||||
* @param compileId
|
* @param compileId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static List<Integer> getASNIPNum(Integer groupId ) {
|
public static List<Integer> getASNIPNum(Long groupId ) {
|
||||||
List<Integer> ipNum=new ArrayList<>();
|
List<Integer> ipNum=new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
if(!StringUtil.isEmpty(groupId)){
|
if(!StringUtil.isEmpty(groupId)){
|
||||||
|
|||||||
@@ -1720,7 +1720,14 @@ public class BaseController {
|
|||||||
//处理config_group_info和asn_group_info
|
//处理config_group_info和asn_group_info
|
||||||
asnIpCfgService.processGroup(serviceDict,asnNoMaps,asnOrgList,isSend,isImportAll.get(0).getItemCode());
|
asnIpCfgService.processGroup(serviceDict,asnNoMaps,asnOrgList,isSend,isImportAll.get(0).getItemCode());
|
||||||
if(!asnIpMaps.isEmpty()){
|
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;
|
int index=0;
|
||||||
|
|
||||||
List<AsnIpCfg> asnIpCfgs=Lists.newArrayList();
|
List<AsnIpCfg> asnIpCfgs=Lists.newArrayList();
|
||||||
String asnIds="";
|
String asnIds="";
|
||||||
List<Integer> regionIds=Lists.newArrayList();
|
List<Integer> regionIds=Lists.newArrayList();
|
||||||
@@ -1765,7 +1772,7 @@ public class BaseController {
|
|||||||
asnIpCfg.setAsnIpGroup(asnNoMaps.get(2).get(Long.parseLong(asnIpCfg.getUserRegion1())).getGroupId());
|
asnIpCfg.setAsnIpGroup(asnNoMaps.get(2).get(Long.parseLong(asnIpCfg.getUserRegion1())).getGroupId());
|
||||||
asnIpCfg.setCompileId(asnNoMaps.get(2).get(Long.parseLong(asnIpCfg.getUserRegion1())).getCompileId());
|
asnIpCfg.setCompileId(asnNoMaps.get(2).get(Long.parseLong(asnIpCfg.getUserRegion1())).getCompileId());
|
||||||
if(isSend.equals("1")) {
|
if(isSend.equals("1")) {
|
||||||
/*//已下发
|
//已下发
|
||||||
if(asnNoMaps.get(3).keySet().contains(Long.valueOf(asnIpCfg.getUserRegion1()))){
|
if(asnNoMaps.get(3).keySet().contains(Long.valueOf(asnIpCfg.getUserRegion1()))){
|
||||||
//groupId已经在了
|
//groupId已经在了
|
||||||
if(oldAsnIpMap.keySet().contains(Long.valueOf(asnIpCfg.getAsnIpGroup()))){
|
if(oldAsnIpMap.keySet().contains(Long.valueOf(asnIpCfg.getAsnIpGroup()))){
|
||||||
@@ -1789,20 +1796,6 @@ public class BaseController {
|
|||||||
newAsnIpIndex++;
|
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{
|
}else{
|
||||||
asnIpCfgs.add(asnIpCfg);
|
asnIpCfgs.add(asnIpCfg);
|
||||||
@@ -1816,44 +1809,68 @@ public class BaseController {
|
|||||||
isNullIndex++;
|
isNullIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//处理ASN IP时分组处理,当处理完某一组的asnip量达到maat下发最大值时,保存已处理的asn ip,isSend=1(并下发)
|
||||||
if(!StringUtil.isEmpty(asnIpCfgs) && asnIpCfgs.size()>Constants.MAAT_JSON_SEND_SIZE ){
|
if(isSend.equals("1")) {
|
||||||
if(!StringUtil.isEmpty(asnIds)){
|
|
||||||
asnIds=asnIds.substring(0,asnIds.length()-1);
|
|
||||||
}
|
|
||||||
asnIpCfgService.saveAsnIp(asnIpCfgs,asnIds);
|
|
||||||
asnIds="";
|
|
||||||
asnIpCfgs.clear();
|
|
||||||
}
|
|
||||||
/*if(isSend.equals("1")) {
|
|
||||||
//未下发过的asnGroup
|
//未下发过的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);
|
asnIpCfgService.auditAsnIp(newAsnIpMap,asnNoMaps,"maat",newAsnIpIndex);
|
||||||
newAsnIpMap.clear();
|
newAsnIpMap.clear();
|
||||||
newAsnIpIndex=0;
|
newAsnIpIndex=0;
|
||||||
}
|
}
|
||||||
//已下发过的asnGroup
|
//已下发过的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);
|
asnIpCfgService.auditAsnIp(oldAsnIpMap,asnNoMaps,"common",oldAsnIpIndex);
|
||||||
oldAsnIpMap.clear();
|
oldAsnIpMap.clear();
|
||||||
oldAsnIpIndex=0;
|
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)){
|
//处理ASN IP时最后一批未达到maat提交总量时,也需要保存。
|
||||||
asnIds=asnIds.substring(0,asnIds.length()-1);
|
if(!StringUtil.isEmpty(asnIpCfgs) && !StringUtil.isEmpty(asnIds)){
|
||||||
}
|
asnIds=asnIds.substring(0,asnIds.length()-1);
|
||||||
asnIpCfgService.saveAsnIp(asnIpCfgs,asnIds);
|
asnIpCfgService.saveAsnIp(asnIpCfgs,asnIds,isImportAll.get(0).getItemCode());
|
||||||
asnIpCfgs.clear();
|
|
||||||
asnIds="";
|
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信息
|
//是否全量下发所有的asn info信息
|
||||||
|
|||||||
@@ -37,5 +37,5 @@ public interface AsnGroupInfoDao extends CrudDao<AsnGroupInfo> {
|
|||||||
void insertWithId(AsnGroupInfo asnGroupInfo);
|
void insertWithId(AsnGroupInfo asnGroupInfo);
|
||||||
void insertWithoutId(AsnGroupInfo asnGroupInfo);
|
void insertWithoutId(AsnGroupInfo asnGroupInfo);
|
||||||
void updateIpNum(@Param("v4Num")long v4Num,@Param("v6Num")long v6Num,@Param("groupId")Integer groupId);
|
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);
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="AsnGroupInfoColumns">
|
<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.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>
|
</sql>
|
||||||
|
|
||||||
<!-- 查出所有 有效数据-->
|
<!-- 查出所有 有效数据-->
|
||||||
@@ -107,7 +107,8 @@
|
|||||||
asn_id,
|
asn_id,
|
||||||
is_used,
|
is_used,
|
||||||
region_id,
|
region_id,
|
||||||
org_group_id
|
org_group_id,
|
||||||
|
only_group_id
|
||||||
)values (
|
)values (
|
||||||
#{groupId,jdbcType=INTEGER},
|
#{groupId,jdbcType=INTEGER},
|
||||||
#{compileId,jdbcType=INTEGER},
|
#{compileId,jdbcType=INTEGER},
|
||||||
@@ -122,7 +123,8 @@
|
|||||||
#{asnId,jdbcType=INTEGER},
|
#{asnId,jdbcType=INTEGER},
|
||||||
#{isUsed,jdbcType=INTEGER},
|
#{isUsed,jdbcType=INTEGER},
|
||||||
#{regionId,jdbcType=INTEGER},
|
#{regionId,jdbcType=INTEGER},
|
||||||
#{orgGroupId,jdbcType=INTEGER}
|
#{orgGroupId,jdbcType=INTEGER},
|
||||||
|
#{onlyGroupId,jdbcType=INTEGER}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertWithoutId" parameterType="com.nis.domain.basics.AsnGroupInfo" >
|
<insert id="insertWithoutId" parameterType="com.nis.domain.basics.AsnGroupInfo" >
|
||||||
@@ -174,7 +176,8 @@
|
|||||||
asn_id,
|
asn_id,
|
||||||
is_used,
|
is_used,
|
||||||
region_id,
|
region_id,
|
||||||
org_group_id
|
org_group_id,
|
||||||
|
only_group_id
|
||||||
)values (
|
)values (
|
||||||
#{id,jdbcType=INTEGER},
|
#{id,jdbcType=INTEGER},
|
||||||
#{groupId,jdbcType=INTEGER},
|
#{groupId,jdbcType=INTEGER},
|
||||||
@@ -190,7 +193,8 @@
|
|||||||
#{asnId,jdbcType=INTEGER},
|
#{asnId,jdbcType=INTEGER},
|
||||||
#{isUsed,jdbcType=INTEGER},
|
#{isUsed,jdbcType=INTEGER},
|
||||||
#{regionId,jdbcType=INTEGER},
|
#{regionId,jdbcType=INTEGER},
|
||||||
#{orgGroupId,jdbcType=INTEGER}
|
#{orgGroupId,jdbcType=INTEGER},
|
||||||
|
#{onlyGroupId,jdbcType=INTEGER}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<update id="update" parameterType="com.nis.domain.basics.AsnGroupInfo" >
|
<update id="update" parameterType="com.nis.domain.basics.AsnGroupInfo" >
|
||||||
|
|||||||
@@ -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 updateAsnIpByAsnGroups(@Param("entity")AsnIpCfg entity,@Param("asnGroups")List<AsnGroupInfo> asnGroups,@Param("asnIds")String asnIds);
|
||||||
public void deleteAll();
|
public void deleteAll();
|
||||||
public List<Object[]> findAllAsnIpCfgList();
|
public List<Object[]> findAllAsnIpCfgList();
|
||||||
|
public List<AsnIpCfg> getASNIPList(AsnIpCfg entity);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,9 @@
|
|||||||
<if test="asnIpGroup != null and asnIpGroup != ''">
|
<if test="asnIpGroup != null and asnIpGroup != ''">
|
||||||
AND r.asn_Ip_Group =#{asnIpGroup,jdbcType=INTEGER}
|
AND r.asn_Ip_Group =#{asnIpGroup,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="userRegion1 != null and userRegion1 != ''">
|
||||||
|
AND r.user_region1 =#{userRegion1,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
<if test="cfgRegionCode != null">
|
<if test="cfgRegionCode != null">
|
||||||
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
@@ -677,4 +680,13 @@
|
|||||||
from asn_ip_cfg r
|
from asn_ip_cfg r
|
||||||
where r.is_valid !=-1
|
where r.is_valid !=-1
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
@@ -3022,7 +3022,7 @@ public abstract class BaseService {
|
|||||||
//<!-- 是否自动更新ASN NO -->
|
//<!-- 是否自动更新ASN NO -->
|
||||||
asnKeywordCfg.setUserRegion4(StringUtil.isEmpty(asnKeywordCfg.getUserRegion4()) ? "1":"0");
|
asnKeywordCfg.setUserRegion4(StringUtil.isEmpty(asnKeywordCfg.getUserRegion4()) ? "1":"0");
|
||||||
if("1".equals(asnKeywordCfg.getUserRegion4())){ //是否标记为下发ALL
|
if("1".equals(asnKeywordCfg.getUserRegion4())){ //是否标记为下发ALL
|
||||||
signAuditAllGroupList.add(Integer.parseInt(asnKeywordCfg.getUserRegion4()));
|
signAuditAllGroupList.add(Integer.parseInt(asnKeywordCfg.getUserRegion3()));
|
||||||
}
|
}
|
||||||
groupWithRegion.put(asnKeywordCfg.getUserRegion2(), asnKeywordCfg.getUserRegion3());
|
groupWithRegion.put(asnKeywordCfg.getUserRegion2(), asnKeywordCfg.getUserRegion3());
|
||||||
//需要标记为is_used=1的组织
|
//需要标记为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){
|
/*if(asnList!=null && asnList.size()>0){
|
||||||
|
|
||||||
for (AsnKeywordCfg asnKeywordCfg : asnList) {
|
for (AsnKeywordCfg asnKeywordCfg : asnList) {
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ public class AsnGroupInfoService extends BaseService{
|
|||||||
entity.setCountry(country);
|
entity.setCountry(country);
|
||||||
|
|
||||||
int groupId=0;
|
int groupId=0;
|
||||||
|
int onlyGroupId=0;//用于ip地址中下发配置组号
|
||||||
//新增
|
//新增
|
||||||
if(entity.getGroupId()==null){
|
if(entity.getGroupId()==null){
|
||||||
|
|
||||||
@@ -110,10 +111,18 @@ public class AsnGroupInfoService extends BaseService{
|
|||||||
}else {
|
}else {
|
||||||
throw new MaatConvertException("Get asn group id failed");
|
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();
|
Date createTime=new Date();
|
||||||
entity.setCreatorId(UserUtils.getUser().getId());
|
entity.setCreatorId(UserUtils.getUser().getId());
|
||||||
entity.setCreateTime(createTime);
|
entity.setCreateTime(createTime);
|
||||||
entity.setGroupId(groupId);
|
entity.setGroupId(groupId);
|
||||||
|
entity.setOnlyGroupId(onlyGroupId);
|
||||||
entity.setOrgGroupId(configGroupInfo.getGroupId());
|
entity.setOrgGroupId(configGroupInfo.getGroupId());
|
||||||
entity.setIsValid(0);
|
entity.setIsValid(0);
|
||||||
//分组已被策略设定为下发全部域,则需要自动下发新增的asno
|
//分组已被策略设定为下发全部域,则需要自动下发新增的asno
|
||||||
@@ -193,13 +202,15 @@ public class AsnGroupInfoService extends BaseService{
|
|||||||
List srcList=new ArrayList<>();
|
List srcList=new ArrayList<>();
|
||||||
AsnKeywordCfg cfg=new AsnKeywordCfg();
|
AsnKeywordCfg cfg=new AsnKeywordCfg();
|
||||||
cfg.initDefaultValue();
|
cfg.initDefaultValue();
|
||||||
cfg.setGroupId(group.getGroupId());
|
// cfg.setGroupId(group.getGroupId());
|
||||||
|
cfg.setGroupId(entity.getOnlyGroupId());// 用于ip地址 asn
|
||||||
cfg.setCfgKeywords(entity.getAsnId().toString());
|
cfg.setCfgKeywords(entity.getAsnId().toString());
|
||||||
cfg.setRegionId(entity.getRegionId());
|
cfg.setRegionId(entity.getRegionId());
|
||||||
cfg.setCfgType(Constants.NTC_ASN_NUMBER);
|
cfg.setCfgType(Constants.NTC_ASN_NUMBER);
|
||||||
cfg.setAuditTime(new Date());
|
cfg.setAuditTime(new Date());
|
||||||
srcList.add(cfg);
|
srcList.add(cfg);
|
||||||
srcMap.put(group.getGroupId(), srcList);
|
// srcMap.put(group.getGroupId(), srcList);
|
||||||
|
srcMap.put(entity.getOnlyGroupId(), srcList);// 用于ip地址 asn
|
||||||
GroupReuseAddBean commonGroupBean=new GroupReuseAddBean();
|
GroupReuseAddBean commonGroupBean=new GroupReuseAddBean();
|
||||||
List<GroupReuseCfg> commonGroupList=new ArrayList<>();
|
List<GroupReuseCfg> commonGroupList=new ArrayList<>();
|
||||||
commonGroupList=convertCommonRegion(srcMap,commonGroupList,1,2,4);
|
commonGroupList=convertCommonRegion(srcMap,commonGroupList,1,2,4);
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ package com.nis.web.service.basics;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
@@ -19,12 +17,10 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import com.beust.jcommander.internal.Lists;
|
import com.beust.jcommander.internal.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.nis.domain.FunctionRegionDict;
|
|
||||||
import com.nis.domain.FunctionServiceDict;
|
import com.nis.domain.FunctionServiceDict;
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.basics.AsnGroupInfo;
|
import com.nis.domain.basics.AsnGroupInfo;
|
||||||
import com.nis.domain.basics.AsnIpCfg;
|
import com.nis.domain.basics.AsnIpCfg;
|
||||||
import com.nis.domain.configuration.AsnKeywordCfg;
|
|
||||||
import com.nis.domain.configuration.BaseIpCfg;
|
import com.nis.domain.configuration.BaseIpCfg;
|
||||||
import com.nis.domain.configuration.CfgIndexInfo;
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
import com.nis.domain.maat.GroupReuseAddBean;
|
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.ToMaatBean;
|
||||||
import com.nis.domain.maat.ToMaatResult;
|
import com.nis.domain.maat.ToMaatResult;
|
||||||
import com.nis.domain.specific.ConfigGroupInfo;
|
import com.nis.domain.specific.ConfigGroupInfo;
|
||||||
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.DictUtils;
|
import com.nis.util.IPUtil;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.dao.CrudDao;
|
import com.nis.web.dao.CrudDao;
|
||||||
import com.nis.web.dao.basics.AsnGroupInfoDao;
|
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)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void update(AsnIpCfg entity){
|
public void update(AsnIpCfg entity){
|
||||||
|
//checkAsnIp(entity);
|
||||||
List<AsnIpCfg> auditAsnIpList=new ArrayList<>();
|
List<AsnIpCfg> auditAsnIpList=new ArrayList<>();
|
||||||
List<AsnGroupInfo> auditAsnGroupList=new ArrayList<>();
|
List<AsnGroupInfo> auditAsnGroupList=new ArrayList<>();
|
||||||
Date editTime=new Date();
|
Date editTime=new Date();
|
||||||
@@ -172,15 +170,25 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
auditAllAsnRegionCfg(entity,auditAsnGroupList,null);
|
auditAllAsnRegionCfg(entity,auditAsnGroupList,null);
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param asnIpCfgs
|
||||||
|
* @param asnIds
|
||||||
|
* @param isImportAll 增量或者全量
|
||||||
|
*/
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@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());
|
logger.warn("Start to only save asn ip size:"+asnIpCfgs.size());
|
||||||
long start=System.currentTimeMillis();
|
long start=System.currentTimeMillis();
|
||||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||||
SqlSession batchSqlSession = null;
|
SqlSession batchSqlSession = null;
|
||||||
try{
|
try{
|
||||||
if(!StringUtil.isEmpty(asnIpCfgs)){
|
if(!StringUtil.isEmpty(asnIpCfgs)){
|
||||||
asnIpCfgDao.deleteByAsnId(asnIds);
|
//全量时需要删除asn 下的所有ip
|
||||||
|
if("1".equals(isImportAll)){
|
||||||
|
asnIpCfgDao.deleteByAsnId(asnIds);
|
||||||
|
}
|
||||||
|
|
||||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||||
for (AsnIpCfg cfg : asnIpCfgs) {
|
for (AsnIpCfg cfg : asnIpCfgs) {
|
||||||
((AsnIpCfgDao) batchSqlSession.getMapper(AsnIpCfgDao.class)).insert(cfg);
|
((AsnIpCfgDao) batchSqlSession.getMapper(AsnIpCfgDao.class)).insert(cfg);
|
||||||
@@ -296,12 +304,12 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||||
//调用服务接口下发配置数据
|
//调用服务接口下发配置数据
|
||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
//logger.info("asn ip maat结构配置下发配置参数:"+json);
|
logger.info("asn ip maat结构配置下发配置参数:"+json);
|
||||||
logger.info("asn ip maat结构配置下发配置参数:");
|
//logger.info("asn ip maat结构配置下发配置参数:");
|
||||||
//调用服务接口下发配置
|
//调用服务接口下发配置
|
||||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||||
//logger.info("asn ip maat结构配置下发响应信息:"+result.getMsg());
|
logger.info("asn ip maat结构配置下发响应信息:"+result.getMsg());
|
||||||
logger.info("asn ip maat结构配置下发响应信息:");
|
//logger.info("asn ip maat结构配置下发响应信息:");
|
||||||
}else{
|
}else{
|
||||||
if(!StringUtil.isEmpty(auditList)){
|
if(!StringUtil.isEmpty(auditList)){
|
||||||
asnIPRegionSendToMaat(auditList, 1, Constants.OPACTION_POST);
|
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> compileIds=ConfigServiceUtil.getId(1, newAsnGroup.size());
|
||||||
List<Integer> groupIds=ConfigServiceUtil.getId(2, newAsnGroup.size());
|
List<Integer> groupIds=ConfigServiceUtil.getId(2, newAsnGroup.size());
|
||||||
List<Integer> regionIds=ConfigServiceUtil.getId(3, newAsnGroup.size());
|
List<Integer> regionIds=ConfigServiceUtil.getId(3, newAsnGroup.size());
|
||||||
|
int onlyGroupId=0;//用于ip地址中下发配置组号
|
||||||
for(Entry<Long, AsnGroupInfo> e:newAsnGroup.entrySet()) {
|
for(Entry<Long, AsnGroupInfo> e:newAsnGroup.entrySet()) {
|
||||||
AsnGroupInfo asnGroupInfo=e.getValue();
|
AsnGroupInfo asnGroupInfo=e.getValue();
|
||||||
asnGroupInfo.setAsnId(e.getKey());
|
asnGroupInfo.setAsnId(e.getKey());
|
||||||
@@ -405,6 +414,14 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
asnGroupInfo.setCompileId(compileIds.get(index));
|
asnGroupInfo.setCompileId(compileIds.get(index));
|
||||||
asnGroupInfo.setRegionId(regionIds.get(index));
|
asnGroupInfo.setRegionId(regionIds.get(index));
|
||||||
asnGroupInfo.setOrgGroupId(asnOrgList.get(1).get(asnGroupInfo.getOrganization()).getGroupId());
|
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(0).put(e.getKey(), asnGroupInfo);//设置完各种id后更新map数据
|
||||||
asnNoMaps.get(2).put(e.getKey(), asnGroupInfo);//设置完各种id后更新map数据
|
asnNoMaps.get(2).put(e.getKey(), asnGroupInfo);//设置完各种id后更新map数据
|
||||||
((AsnGroupInfoDao) batchSqlSession.getMapper(AsnGroupInfoDao.class)).insertWithId(asnGroupInfo);
|
((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);
|
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)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void delete(String ids) {
|
public void delete(String ids) {
|
||||||
/*for(String id:ids.split(",")) {
|
/*for(String id:ids.split(",")) {
|
||||||
|
|||||||
@@ -372,6 +372,7 @@ public class AppCfgService extends BaseService {
|
|||||||
configGroupInfo.setGroupId(specificServiceCfg.getGroupId());
|
configGroupInfo.setGroupId(specificServiceCfg.getGroupId());
|
||||||
configGroupInfo.setGroupName(specificServiceCfg.getSpecServiceName());
|
configGroupInfo.setGroupName(specificServiceCfg.getSpecServiceName());
|
||||||
configGroupInfo.setIsIssued(0);
|
configGroupInfo.setIsIssued(0);
|
||||||
|
configGroupInfo.setInsertTime(new Date());
|
||||||
configGroupInfo.setGroupType(1);
|
configGroupInfo.setGroupType(1);
|
||||||
configGroupInfo.setCompileId(compileId);
|
configGroupInfo.setCompileId(compileId);
|
||||||
configGroupInfoDao.insertConfigGroupInfo(configGroupInfo);
|
configGroupInfoDao.insertConfigGroupInfo(configGroupInfo);
|
||||||
|
|||||||
@@ -560,7 +560,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//asn配置下发
|
//asn配置下发
|
||||||
auditAsnCfg(groupRelationList,strRegionList,entity,entity.getAsnKeywords());
|
auditAsnCfgForIpAddr(groupRelationList,strRegionList,entity,entity.getAsnKeywords());
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||||
|
|||||||
@@ -1447,7 +1447,7 @@ max_input=Fill in at most four
|
|||||||
no_need_input=Attributes no need to be filled in
|
no_need_input=Attributes no need to be filled in
|
||||||
close_link=Close
|
close_link=Close
|
||||||
asn_group=ASN Group
|
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
|
can_not_delete_asn_group_with_audited_ip=Can not delete ASN group with approved IP
|
||||||
organization=Organization
|
organization=Organization
|
||||||
mismatch=Mismatch
|
mismatch=Mismatch
|
||||||
|
|||||||
@@ -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
|
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
|
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
|
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
|
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
|
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
|
mismatch=\u041D\u0435\u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435
|
||||||
|
|||||||
@@ -1447,7 +1447,7 @@ max_input=\u6700\u591a\u586b\u5199\u56db\u4e2a
|
|||||||
no_need_input=\u65e0\u9700\u586b\u5199\u5c5e\u6027
|
no_need_input=\u65e0\u9700\u586b\u5199\u5c5e\u6027
|
||||||
close_link=\u5173\u95ed
|
close_link=\u5173\u95ed
|
||||||
asn_group=ASN\u7ec4
|
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
|
can_not_delete_asn_group_with_audited_ip=\u4e0d\u80fd\u5220\u9664\u5305\u542b\u5ba1\u6838\u901a\u8fc7ip\u7684ASN\u7ec4
|
||||||
organization=\u7ec4\u7ec7
|
organization=\u7ec4\u7ec7
|
||||||
mismatch=\u4e0d\u5339\u914d
|
mismatch=\u4e0d\u5339\u914d
|
||||||
|
|||||||
@@ -613,6 +613,9 @@ blockAndDropStat=v1/blockAndDropStat
|
|||||||
#\u914d\u7f6e\u542f\u505c\u63a5\u53e3
|
#\u914d\u7f6e\u542f\u505c\u63a5\u53e3
|
||||||
configStartStop=v2/configStartStop
|
configStartStop=v2/configStartStop
|
||||||
trafficAppTrend=v1/trafficAppTrend
|
trafficAppTrend=v1/trafficAppTrend
|
||||||
|
#Http\u6cdb\u6536
|
||||||
|
ntcHttpRecordLog=v1/ntcHttpRecordLogs
|
||||||
|
asn_region_key=AppTrend
|
||||||
appConnRecordTop100=v1/appConnRecordTop100
|
appConnRecordTop100=v1/appConnRecordTop100
|
||||||
#SSL\u6cdb\u6536
|
#SSL\u6cdb\u6536
|
||||||
ntcSslRecordLog=v1/ntcSslRecordLogs
|
ntcSslRecordLog=v1/ntcSslRecordLogs
|
||||||
@@ -620,4 +623,7 @@ ntc_asn_number=NTC_ASN_NUMBER
|
|||||||
addRegionToCommonGroup=v1/addRegionToCommonGroup
|
addRegionToCommonGroup=v1/addRegionToCommonGroup
|
||||||
updateRegionToCommonGroup=v1/updateCommonGroupRegion
|
updateRegionToCommonGroup=v1/updateCommonGroupRegion
|
||||||
deleteRegionToCommonGroup=v1/delCommonGroupRegion
|
deleteRegionToCommonGroup=v1/delCommonGroupRegion
|
||||||
|
asn_key=AS
|
||||||
|
#Http\u6cdb\u6536
|
||||||
|
ntcHttpRecordLog=v1/ntcHttpRecordLogs
|
||||||
|
asn_region_key=ASN_ID
|
||||||
|
|||||||
1
src/main/resources/sql/20190215/alter_asn_group_info.sql
Normal file
1
src/main/resources/sql/20190215/alter_asn_group_info.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE asn_group_info ADD only_group_id int(11) DEFAULT NULL COMMENT '用于ip地址下发业务';
|
||||||
@@ -419,7 +419,7 @@
|
|||||||
<description>根据asnGroupId获取asn 的v4数量和v6数量</description>
|
<description>根据asnGroupId获取asn 的v4数量和v6数量</description>
|
||||||
<name>getASNIPNum</name>
|
<name>getASNIPNum</name>
|
||||||
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
<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>
|
<example>${fns:getASNIPNum(str)}</example>
|
||||||
</function>
|
</function>
|
||||||
</taglib>
|
</taglib>
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ $(function(){
|
|||||||
<div class="form-group asnNo">
|
<div class="form-group asnNo">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="asn_no"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="asn_no"/></label>
|
||||||
<div class="col-md-6">
|
<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>
|
||||||
<div for="asnId"></div>
|
<div for="asnId"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -45,15 +45,20 @@
|
|||||||
ids.push($(this).attr("id"));
|
ids.push($(this).attr("id"));
|
||||||
asnIds.push($(this).attr("asnId"));
|
asnIds.push($(this).attr("asnId"));
|
||||||
groupIds.push($(this).attr("asnGroup"));
|
groupIds.push($(this).attr("asnGroup"));
|
||||||
/* if($(this).attr("isIssued")==1){
|
if($(this).attr("isUsed")==1){
|
||||||
canDel=false;
|
canDel=false;
|
||||||
} */
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(str.substr(str.length-1)== ','){
|
var tip='<spring:message code="can_not_delete_issued_ans_group"/>';
|
||||||
ids = str.substr(0,str.length-1);
|
if(!canDel){
|
||||||
}
|
$.jBox.tip(tip);
|
||||||
var tip='<spring:message code="can_not_delete_asn_group_with_audited_ip"/>';
|
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){
|
if(asnIds.length>0){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
@@ -278,7 +283,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||||
<tr>
|
<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>
|
<td>
|
||||||
<a href="javascript:;" data-original-title="${cfg.organization}"
|
<a href="javascript:;" data-original-title="${cfg.organization}"
|
||||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||||
|
|||||||
@@ -152,6 +152,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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">
|
<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 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>
|
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||||
|
|||||||
@@ -26,8 +26,10 @@
|
|||||||
<input type="hidden" name="${cfgName}.userRegion2" value="">
|
<input type="hidden" name="${cfgName}.userRegion2" value="">
|
||||||
<!-- asn no组织的groupId 【界面每次校验的时候填写】-->
|
<!-- asn no组织的groupId 【界面每次校验的时候填写】-->
|
||||||
<input type="hidden" name="${cfgName}.userRegion3" value="">
|
<input type="hidden" name="${cfgName}.userRegion3" value="">
|
||||||
|
<!--ip地址 asn no组号的groupId -->
|
||||||
|
<input type="hidden" name="${cfgName}.userRegion5" value="">
|
||||||
<!-- 是否自动更新ASN NO -->
|
<!-- 是否自动更新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="selectAll"><spring:message code="select_All_Text"/></div>
|
||||||
<div class="hidden" id="deselectAll"><spring:message code="deselect_All_Text"/></div>
|
<div class="hidden" id="deselectAll"><spring:message code="deselect_All_Text"/></div>
|
||||||
<input type="hidden" name="${cfgName}.organizationGroupId" value="${cfg.userRegion1}">
|
<input type="hidden" name="${cfgName}.organizationGroupId" value="${cfg.userRegion1}">
|
||||||
|
|||||||
@@ -148,7 +148,8 @@ function showActionTransChart(xData,series){
|
|||||||
xAxis: {
|
xAxis: {
|
||||||
type:'datetime',
|
type:'datetime',
|
||||||
dateTimeLabelFormats: {
|
dateTimeLabelFormats: {
|
||||||
second: '%H:%M:%S',
|
millisecond: '%H:%M:%S',
|
||||||
|
second: '%H:%M:%S',
|
||||||
minute: '%H:%M',
|
minute: '%H:%M',
|
||||||
hour: '%H:%M',
|
hour: '%H:%M',
|
||||||
day: '%m-%d',
|
day: '%m-%d',
|
||||||
@@ -405,6 +406,61 @@ function showActionTransChart(xData,series){
|
|||||||
return prev + curr;
|
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>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -182,7 +182,7 @@ function showPortActiveChart(xData,series){
|
|||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
title: {
|
title: {
|
||||||
text: 'bytes'
|
text: 'Link Numbers'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ function searchForm() {
|
|||||||
search_txt = search_txt.substring(search_txt.lastIndexOf('_'));
|
search_txt = search_txt.substring(search_txt.lastIndexOf('_'));
|
||||||
$("#menu"+search_txt+" >a").trigger('click');
|
$("#menu"+search_txt+" >a").trigger('click');
|
||||||
}else {
|
}else {
|
||||||
alert('未找到该菜单!');
|
alert('The menu was not found!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,9 +219,9 @@ function refreshCache(cacheName){
|
|||||||
async:false,
|
async:false,
|
||||||
success:function(data,textStatus){
|
success:function(data,textStatus){
|
||||||
if(data=="success"){
|
if(data=="success"){
|
||||||
alert("缓存清理成功");
|
alert("Cache Cleaning Successful!");
|
||||||
}else{
|
}else{
|
||||||
alert("缓存清理失败");
|
alert("Cache Cleanup Failure!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -517,7 +517,7 @@ background:#3d3d3d;
|
|||||||
<!-- BEGIN FOOTER -->
|
<!-- BEGIN FOOTER -->
|
||||||
<div class="page-footer" style="position: fixed;right: 0;left: 0;z-index: 1030;">
|
<div class="page-footer" style="position: fixed;right: 0;left: 0;z-index: 1030;">
|
||||||
<div class="page-footer-inner">
|
<div class="page-footer-inner">
|
||||||
CEIEC All Rights Reserved,CEIEC ©
|
<!--CEIEC All Rights Reserved,CEIEC ©-->
|
||||||
</div>
|
</div>
|
||||||
<div class="scroll-to-top">
|
<div class="scroll-to-top">
|
||||||
<i class="icon-arrow-up"></i>
|
<i class="icon-arrow-up"></i>
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ function searchForm() {
|
|||||||
search_txt = search_txt.substring(search_txt.lastIndexOf('_'));
|
search_txt = search_txt.substring(search_txt.lastIndexOf('_'));
|
||||||
$("#menu"+search_txt+" >a").trigger('click');
|
$("#menu"+search_txt+" >a").trigger('click');
|
||||||
}else {
|
}else {
|
||||||
alert('未找到该菜单!');
|
alert('The menu was not found!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,9 +219,9 @@ function refreshCache(cacheName){
|
|||||||
async:false,
|
async:false,
|
||||||
success:function(data,textStatus){
|
success:function(data,textStatus){
|
||||||
if(data=="success"){
|
if(data=="success"){
|
||||||
alert("缓存清理成功");
|
alert("Cache Cleaning Successful!");
|
||||||
}else{
|
}else{
|
||||||
alert("缓存清理失败");
|
alert("Cache Cleanup Failure!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -384,7 +384,7 @@ background:#3d3d3d;
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<!-- 系统语言 -->
|
<!-- 系统语言 -->
|
||||||
<li class="dropdown dropdown-user" id="language">
|
<li class="dropdown dropdown-user" id="language">
|
||||||
|
|
||||||
|
|
||||||
@@ -516,7 +516,7 @@ background:#3d3d3d;
|
|||||||
<!-- BEGIN FOOTER -->
|
<!-- BEGIN FOOTER -->
|
||||||
<div class="page-footer" style="position: fixed;right: 0;left: 0;z-index: 1030;">
|
<div class="page-footer" style="position: fixed;right: 0;left: 0;z-index: 1030;">
|
||||||
<div class="page-footer-inner">
|
<div class="page-footer-inner">
|
||||||
CEIEC All Rights Reserved,CEIEC ©
|
<!--CEIEC All Rights Reserved,CEIEC ©-->
|
||||||
</div>
|
</div>
|
||||||
<div class="scroll-to-top">
|
<div class="scroll-to-top">
|
||||||
<i class="icon-arrow-up"></i>
|
<i class="icon-arrow-up"></i>
|
||||||
@@ -559,7 +559,7 @@ background:#3d3d3d;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//window.onload = function() {
|
//window.onload = function() {
|
||||||
// fullScreen();//直接执行onclick中的函数就行
|
// fullScreen();//直接执行onclick中的函数就行
|
||||||
//}
|
//}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -187,7 +187,8 @@ function searchForm() {
|
|||||||
search_txt = search_txt.substring(search_txt.lastIndexOf('_'));
|
search_txt = search_txt.substring(search_txt.lastIndexOf('_'));
|
||||||
$("#menu"+search_txt+" >a").trigger('click');
|
$("#menu"+search_txt+" >a").trigger('click');
|
||||||
}else {
|
}else {
|
||||||
alert('未找到该菜单!');
|
alert('The menu was not found!');
|
||||||
|
//alert('未找到该菜单!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,9 +231,9 @@ function refreshCache(cacheName){
|
|||||||
async:false,
|
async:false,
|
||||||
success:function(data,textStatus){
|
success:function(data,textStatus){
|
||||||
if(data=="success"){
|
if(data=="success"){
|
||||||
alert("缓存清理成功");
|
alert("Cache Cleaning Successful!");
|
||||||
}else{
|
}else{
|
||||||
alert("缓存清理失败");
|
alert("Cache Cleanup Failure!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -547,7 +548,7 @@ background:#3d3d3d;
|
|||||||
<!-- BEGIN FOOTER -->
|
<!-- BEGIN FOOTER -->
|
||||||
<div class="page-footer" style="position: fixed;right: 0;left: 0;z-index: 1030;">
|
<div class="page-footer" style="position: fixed;right: 0;left: 0;z-index: 1030;">
|
||||||
<div class="page-footer-inner">
|
<div class="page-footer-inner">
|
||||||
CEIEC All Rights Reserved,CEIEC ©
|
<!--CEIEC All Rights Reserved,CEIEC ©-->
|
||||||
</div>
|
</div>
|
||||||
<div class="scroll-to-top">
|
<div class="scroll-to-top">
|
||||||
<i class="icon-arrow-up"></i>
|
<i class="icon-arrow-up"></i>
|
||||||
|
|||||||
@@ -166,7 +166,7 @@
|
|||||||
</div><!-- /.row -->
|
</div><!-- /.row -->
|
||||||
</div><!-- /.main-container -->
|
</div><!-- /.main-container -->
|
||||||
<div class="foot">
|
<div class="foot">
|
||||||
<span>CEIEC All Rights Reserved, CEIEC © </span>
|
<span><!--CEIEC All Rights Reserved,CEIEC ©--> </span>
|
||||||
</div>
|
</div>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/jquery.min.js" type="text/javascript"></script>
|
<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>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/js.cookie.min.js" type="text/javascript"></script>
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="page-footer-custom">
|
<div class="page-footer-custom">
|
||||||
CEIEC All Rights Reserved,CEIEC ©
|
<!--CEIEC All Rights Reserved,CEIEC ©-->
|
||||||
<%-- Copyright © 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')} --%>
|
<%-- Copyright © 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>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -183,7 +183,7 @@
|
|||||||
</div><!-- /.row -->
|
</div><!-- /.row -->
|
||||||
</div><!-- /.main-container -->
|
</div><!-- /.main-container -->
|
||||||
<div class="foot">
|
<div class="foot">
|
||||||
<span>CEIEC All Rights Reserved, CEIEC © </span>
|
<span><!--CEIEC All Rights Reserved,CEIEC ©--></span>
|
||||||
</div>
|
</div>
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/respond.min.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/respond.min.js"></script>
|
||||||
@@ -561,7 +561,7 @@
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var fullflag = false;
|
var fullflag = false;
|
||||||
// 全屏代码
|
// 鍏ㄥ睆浠g爜
|
||||||
function fullScreen() {
|
function fullScreen() {
|
||||||
if(fullflag){
|
if(fullflag){
|
||||||
exitFullScreen();
|
exitFullScreen();
|
||||||
|
|||||||
@@ -965,6 +965,7 @@ jQuery.validator.addMethod("asnNoUnique",function(value, element) {
|
|||||||
if(textStatus=="success"){
|
if(textStatus=="success"){
|
||||||
if(data == null || data.id==null || data.id == 'undefined'){
|
if(data == null || data.id==null || data.id == 'undefined'){
|
||||||
result=true;
|
result=true;
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
/*if($(element).attr("name")
|
/*if($(element).attr("name")
|
||||||
&& $(element).attr("name") != ''){
|
&& $(element).attr("name") != ''){
|
||||||
@@ -977,6 +978,7 @@ jQuery.validator.addMethod("asnNoUnique",function(value, element) {
|
|||||||
}*/
|
}*/
|
||||||
result=false;
|
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]+".userRegion1']").val(data.regionId);
|
||||||
$("input[name='"+name[0]+".userRegion2']").val(data.groupId);
|
$("input[name='"+name[0]+".userRegion2']").val(data.groupId);
|
||||||
$("input[name='"+name[0]+".userRegion3']").val(data.commonGroupIds);
|
$("input[name='"+name[0]+".userRegion3']").val(data.commonGroupIds);
|
||||||
|
$("input[name='"+name[0]+".userRegion5']").val(data.onlyGroupId);
|
||||||
var commonGroupIds=$("input[name='commonGroupIds']").val();
|
var commonGroupIds=$("input[name='commonGroupIds']").val();
|
||||||
if(commonGroupIds !=null
|
if(commonGroupIds !=null
|
||||||
&& commonGroupIds != ''
|
&& commonGroupIds != ''
|
||||||
|
|||||||
@@ -89,6 +89,7 @@
|
|||||||
arbitrary:"Arbitrarily",
|
arbitrary:"Arbitrarily",
|
||||||
log_trend:"Log Trend",
|
log_trend:"Log Trend",
|
||||||
info:"Prompt",
|
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));
|
}(jQuery));
|
||||||
|
|||||||
@@ -89,6 +89,7 @@
|
|||||||
arbitrary:"Любой",
|
arbitrary:"Любой",
|
||||||
log_trend:"Журнал Тенденция",
|
log_trend:"Журнал Тенденция",
|
||||||
info:"Инфо",
|
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));
|
}(jQuery));
|
||||||
|
|||||||
@@ -89,6 +89,7 @@
|
|||||||
arbitrary:"任意",
|
arbitrary:"任意",
|
||||||
log_trend:"日志趋势",
|
log_trend:"日志趋势",
|
||||||
info:"提示",
|
info:"提示",
|
||||||
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!"
|
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!",
|
||||||
|
log_no_data:"本小时无数据"
|
||||||
});
|
});
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ $(function(){
|
|||||||
$(this).attr("data-clipboard-text",$(this).attr("data-original-title"));
|
$(this).attr("data-clipboard-text",$(this).attr("data-original-title"));
|
||||||
var clipboard = new ClipboardJS('td >.tooltips');
|
var clipboard = new ClipboardJS('td >.tooltips');
|
||||||
clipboard.on('success', function(e) {
|
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);
|
console.log(e);
|
||||||
e.clearSelection();
|
e.clearSelection();
|
||||||
});
|
});
|
||||||
@@ -170,7 +170,7 @@ $(function(){
|
|||||||
$(this).attr("data-clipboard-text",$(this).attr("titleHidden"));
|
$(this).attr("data-clipboard-text",$(this).attr("titleHidden"));
|
||||||
var clipboard = new ClipboardJS('td[titleHidden]');
|
var clipboard = new ClipboardJS('td[titleHidden]');
|
||||||
clipboard.on('success', function(e) {
|
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);
|
// console.log(e);
|
||||||
e.clearSelection();
|
e.clearSelection();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user