1.修复监测告警配置失败的bug

2.修复点击拓扑图节点,关闭弹窗后无限发送请求的bug
3.修复3DRoom 右侧提示框除中文外其他语言状态下,没有节点的节点组不显示提示框的bug
4.国际化文件更新
This commit is contained in:
wangwenrui
2018-10-16 17:11:30 +08:00
parent 6426a446f7
commit 1abccaa785
15 changed files with 255 additions and 189 deletions

View File

@@ -687,10 +687,10 @@ public class CheckTypeSetAction extends BaseAction {
//执行添加字段
this.commonService.updateBatchBySql(sqlString.toString());
}
commonService.commit();
//与NMSServer通信
this.sendCheckTypeId(checkTypeInfo.getId()+"",commonService);
commonService.commit();
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getStackTrace());

View File

@@ -804,9 +804,10 @@ public class DetectionSetAction extends BaseAction {
// 将更新操作写到操作日志中
this.addDBOperationRpt(commonService, "detection_Set_Info",
"INSERT", detectionSetInfo.getId());
commonService.commit();
// 用来实现即时向客户端发送配置信息
sendSetInfo(null, detectionSetInfo, commonService);
commonService.commit();
} catch (Exception e) {
e.printStackTrace();
commonService.rollback();
@@ -1364,7 +1365,7 @@ public class DetectionSetAction extends BaseAction {
// 用来实现即时向客户端发送配置信息
sendSetInfo(null, detectionSetInfo, commonService);
commonService.commit();
//记录用户操作用于设置向导
if(fromWhere!=null && !"".equals(fromWhere)){
if(fromWhere.equals("formGuide")){
@@ -1374,7 +1375,7 @@ public class DetectionSetAction extends BaseAction {
outHtmlString("<script type=\"text/javascript\">alert('i18n_DetectionSetAction.downloadExample.success_n81i');this.location='detectionSet.do?action=query&pageNo="
+ pageNo + "&pageSize=" + pageSize + "'</script>");
}
commonService.commit();
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getStackTrace());
@@ -1856,7 +1857,7 @@ public class DetectionSetAction extends BaseAction {
// 将更新操作写到操作日志中
this.addDBOperationRpt(commonService, "detection_Set_Info",
"UPDATE", setInfo.getId());
commonService.commit();
// 保存并更新上传的脚本文件
saveScriptFile(myFile, detectionSetInfo);
@@ -1869,12 +1870,14 @@ public class DetectionSetAction extends BaseAction {
outHtmlString("<script type=\"text/javascript\">alert('i18n_DetectionSetAction.downloadExample.success_n81i');this.location='detectionSet.do?action=query&pIden="+pIden+"&ctn="+ctn+"&ip="+ip+"&pageNo="
+ pageNo + "&pageSize=" + pageSize + "'</script>");
commonService.commit();
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getStackTrace());
commonService.rollback();
outHtmlString("<script type=\"text/javascript\">alert('i18n_DetectionSetAction.downloadExample.faild_n81i');this.location='detectionSet.do?action=query&pIden="+pIden+"&ctn="+ctn+"&ip="+ip+"&pageNo="
+ pageNo + "&pageSize=" + pageSize + "'</script>");
}
}
@@ -2112,7 +2115,7 @@ public class DetectionSetAction extends BaseAction {
//将更新操作写到操作日志中
this.addDBOperationRpt(commonService, "detection_set_info", "UPDATE", ds.getId());
commonService.commit();
// 用来实现即时向客户端发送配置信息
sendSetInfo(dsOld, ds, commonService);
}
@@ -2122,6 +2125,7 @@ public class DetectionSetAction extends BaseAction {
outHtmlString("<script type=\"text/javascript\">alert('i18n_DetectionSetAction.downloadExample.success_n81i');this.location='detectionSet.do?action=query&pageNo="
+ pageNo + "&pageSize=" + pageSize + "'</script>");
commonService.commit();
} catch (Exception e) {
commonService.rollback();
logger.error(e.getStackTrace());
@@ -2175,7 +2179,7 @@ public class DetectionSetAction extends BaseAction {
//将更新操作写到操作日志中
this.addDBOperationRpt(commonService, "detection_set_info", "UPDATE", ds.getId());
commonService.commit();
// 用来实现即时向客户端发送脚本文件
sendPluginFile(dsOld, ds, myFile, commonService);
@@ -2187,6 +2191,7 @@ public class DetectionSetAction extends BaseAction {
outHtmlString("<script type=\"text/javascript\">alert('i18n_DetectionSetAction.downloadExample.success_n81i');this.location='detectionSet.do?action=query&pageNo="
+ pageNo + "&pageSize=" + pageSize + "'</script>");
commonService.commit();
} catch (Exception e) {
commonService.rollback();
logger.error(e.getStackTrace());

View File

@@ -330,9 +330,9 @@ public class MetaDataSetAction extends BaseAction {
}else{
outHtmlString("<script type=\"text/javascript\">alert('i18n_MetaDataSetAction.queryCheckTypeSource.success_n81i');this.location='metaDataSet.do?action=oppAdd&typeids="+checkTypeInfo.getId()+"'</script>");
}
commonService.commit();
//与NMSServer通信
this.sendCheckTypeId(typeInfo.getId()+"",commonService);
commonService.commit();
} catch (Exception e) {
commonService.rollback();
e.printStackTrace();

View File

@@ -248,6 +248,7 @@ public class PoliceSetAction extends BaseAction {
this.commonService.save(dataPoliceRelation);
// 将更新操作写到操作日志中
this.addDBOperationRpt(commonService,"data_police_relation", "INSERT", dataPoliceRelation.getId());
sendSetInfo(null,dsi,commonService);
commonService.commit();
outHtmlString("<script type=\"text/javascript\">alert('i18n_PoliceSetAction.queryPoliceSetInfo.success_n81i');this.location='policeSet.do?action=query&pIden="+pIden+"&ctn="+ctn+"&ip="+ip+"&pageNo="+pageNo+"&pageSize="+pageSize+"&setId="+setId+"'</script>");
} catch (Exception e) {
@@ -256,7 +257,7 @@ public class PoliceSetAction extends BaseAction {
logger.error(e.getStackTrace());
outHtmlString("<script type=\"text/javascript\">alert('i18n_PoliceSetAction.queryPoliceSetInfo.faild_n81i');this.location='policeSet.do?action=query&pIden="+pIden+"&ctn="+ctn+"&ip="+ip+"&pageNo="+pageNo+"&pageSize="+pageSize+"&setId="+setId+"'</script>");
}
sendSetInfo(null,dsi,commonService);
}
public String openUpdatePoliceSet() {
@@ -313,7 +314,7 @@ public class PoliceSetAction extends BaseAction {
dpRelation.setMarker(dataPoliceRelation.getMarker());
dpRelation.setMarkerFiledId(dataPoliceRelation.getMarkerFiledId());
this.commonService.update(dpRelation);
commonService.commit();
// 将更新操作写到操作日志中
this.addDBOperationRpt(commonService,"data_police_relation", "UPDATE", dpRelation.getId());
sendSetInfo(null,ds,commonService);
@@ -324,6 +325,7 @@ public class PoliceSetAction extends BaseAction {
String str = "<script type=\"text/javascript\">alert('i18n_PoliceSetAction.queryPoliceSetInfo.success_n81i');this.location='policeSet.do?action=query&pIden="+pIden+"&ctn="+ctn+"&ip="+ip+"&pageNo="+pageNo+"&pageSize="+pageSize+setIdStr+"'</script>";
outHtmlString(str);
commonService.commit();
} catch (Exception e) {
commonService.rollback();
e.printStackTrace();

View File

@@ -2381,7 +2381,7 @@ public class NmsTaskManagerAction extends BaseAction {
// 将更新操作写到操作日志中
this.addDBOperationRpt(commonService, "mission_state_table", "UPDATE", pid[i]);
commonService.commit();
sendMissionInfoId(pid[i], 0l, commonService);
// sendMissionInfoId(missionstatetable.getMissionId(),1l);
}
@@ -2393,7 +2393,7 @@ public class NmsTaskManagerAction extends BaseAction {
+ "this.location='nmsTaskManager.do?action=query&pageNo=" + pageNo + "&pageSize=" + pageSize
+ "'</script>");
}
commonService.commit();
} catch (Exception e) {
commonService.rollback();
outHtmlString("<script type=\"text/javascript\">alert('i18n_NmsTaskManagerAction.executeAction.faild_n81i');"
@@ -4250,8 +4250,8 @@ public class NmsTaskManagerAction extends BaseAction {
default:
break;
}
commonService.commit();
sendMissionInfoId(stateTable.getMissionId(), 0l, commonService);
commonService.commit();
} catch (Exception e) {
commonService.rollback();
e.printStackTrace();

View File

@@ -399,12 +399,12 @@ public class NodeGroupManageAction extends BaseAction {
//将添加操作写到操作日志中
this.addDBOperationRpt(commonService, "nodegroup_table", "INSERT", nodegroupTable.getGroupId());
commonService.commit();
// 用来实现即时向客户端发送脚本文件
this.sendPluginFile(nodegroupTable.getGroupId(), null,commonService);
this.sendNodeAndGroupId(nodegroupTable.getGroupId(), null,commonService);//通知NMSServer更新节点组的监控信息
commonService.commit();
} catch (Exception e) {
commonService.rollback();
e.printStackTrace();
@@ -886,7 +886,7 @@ public class NodeGroupManageAction extends BaseAction {
//将添加操作写到操作日志中
this.addDBOperationRpt(commonService, "nodegroup_table", "INSERT", nodeGroup.getGroupId());
commonService.commit();
// 用来实现即时向客户端发送脚本文件
this.sendPluginFile(nodeGroup.getGroupId(), null,commonService);
@@ -900,7 +900,7 @@ public class NodeGroupManageAction extends BaseAction {
}else{
this.outHtmlString("<script>alert('i18n_NodeGroupManageAction.downloadExample.success_n81i');this.location='nodeGroupManage!execute.do?action=queryNodeGroupInfo&showStopNGroup="+showStopNGroup+"'</script>");
}
commonService.commit();
}catch (Exception e){
commonService.rollback();
logger.error(e.getStackTrace());
@@ -975,7 +975,7 @@ public class NodeGroupManageAction extends BaseAction {
//将更新操作写到操作日志中
this.addDBOperationRpt(commonService, "nodegroup_table", "UPDATE", nodeGroup.getGroupId());
commonService.commit();
this.outHtmlString("<script>alert('i18n_NodeGroupManageAction.downloadExample.success_n81i');this.location='nodeGroupManage!execute.do?action=queryNodeGroupInfo&showStopNGroup="+showStopNGroup+"'</script>");
}
if(flag){
@@ -985,7 +985,7 @@ public class NodeGroupManageAction extends BaseAction {
this.sendNodeAndGroupId(group.getGroupId(), null,commonService); //通知NMSServer更新节点组的监控信息
this.getRequest().setAttribute("MSG","2");
}
commonService.commit();
}catch (Exception e){
commonService.rollback();
logger.error(e.getStackTrace());
@@ -1241,7 +1241,7 @@ public class NodeGroupManageAction extends BaseAction {
String sqlCondition = "where NODE_ID in (" + allIds + ")";
//将更新操作写到操作日志中
this.addDBOperationRpt(commonService, sqlCondition, "NODE_TABLE");
commonService.commit();
//通知NMSServer更新节点组的监控信息
for(String str : leafNodeGroupArray){
// 用来实现即时向客户端发送脚本文件
@@ -1250,7 +1250,7 @@ public class NodeGroupManageAction extends BaseAction {
this.sendNodeAndGroupId(Long.valueOf(str), null,commonService);
}
}
commonService.commit();
//this.outHtmlString("<script>alert('操作成功!');this.location='"+path+"/nodeGroupManage/nodeGroupManage.do?action=queryNodeGroupInfo'</script>");
} catch (Exception e) {
commonService.rollback();

View File

@@ -615,7 +615,7 @@ public class NodeManageAction extends BaseAction {
// 将添加操作写到操作日志中
this.addDBOperationRpt(commonService, "node_table",
"INSERT", nodeTable.getNodeId());
commonService.commit();
if (new Long(1).equals(group.getIsValid())) { // 节点组有效
// 用来实现即时向客户端发送脚本文件
@@ -643,7 +643,7 @@ public class NodeManageAction extends BaseAction {
.outHtmlString("<script>alert('i18n_NodeManageAction.addNodeInfo.nodeHadIp_n81i');history.back();</script>");
return;
}
commonService.commit();
} catch (Exception e) {
commonService.rollback();
e.printStackTrace();
@@ -1138,7 +1138,7 @@ public class NodeManageAction extends BaseAction {
// 将更新操作写到操作日志中
this.addDBOperationRpt(commonService, "node_table",
"UPDATE", nodeTable.getNodeId());
commonService.commit();
if (flag) {
// 用来实现即时向客户端发送脚本文件
this.sendPluginFile(nt.getGroupId(), nt
@@ -1159,6 +1159,7 @@ public class NodeManageAction extends BaseAction {
.outHtmlString("<script>alert('i18n_NodeManageAction.addNodeInfo.nodeHadIp_n81i');history.back();</script>");
return;
}
commonService.commit();
} catch (Exception e) {
commonService.rollback();
e.printStackTrace();
@@ -1186,7 +1187,7 @@ public class NodeManageAction extends BaseAction {
// 将更新操作写到操作日志中
this.addDBOperationRpt(commonService, "node_table", "UPDATE",
nd.getNodeId());
commonService.commit();
NodegroupTable group = (NodegroupTable) this.commonService.get(
NodegroupTable.class, nd.getGroupId());
if (new Long(1).equals(group.getIsValid())) { // 节点组有效
@@ -1205,7 +1206,7 @@ public class NodeManageAction extends BaseAction {
// this.outHtmlString("<script
// type=\"text/javascript\">alert('操作成功');this.location='nodeManage.do?action=query&nodeGroupId="+group.getGroupId()+"&isValid="+group.getIsValid()+"'</script>");
}
commonService.commit();
} catch (Exception e) {
commonService.rollback();
e.printStackTrace();
@@ -1225,7 +1226,7 @@ public class NodeManageAction extends BaseAction {
// 将更新操作写到操作日志中
this.addDBOperationRpt(commonService, "node_table", "UPDATE",
nodeId);
commonService.commit();
NodeTable nd = (NodeTable) this.commonService.get(NodeTable.class,
nodeId);
NodegroupTable group = (NodegroupTable) this.commonService.get(
@@ -1244,7 +1245,7 @@ public class NodeManageAction extends BaseAction {
this
.outHtmlString("<script type=\"text/javascript\">alert('i18n_NodeManageAction.addNodeInfo.success_n81i');this.location='nodeManage.do?action=query&nodeGroupId="
+ mkid + "&isValid=" + isValid + "&showStopNGroup=" + showStopNGroup + "&nodeIpVo="+nodeIpVo+"&nodeNameVo="+nodeNameVo+ "'</script>");
commonService.commit();
} catch (Exception e) {
commonService.rollback();
e.printStackTrace();

View File

@@ -134,23 +134,23 @@ public class TopoShowAction extends BaseAction
if(this.getAdminMark()){
sql = "SELECT * from ("
+ "select count(distinct nt.node_id) from detection_info_new diw left join node_table nt on diw.seq_id = nt.seq_id "
+ "where diw.DETECTIONED_STATE<>1 AND diw.police_emergent=0 and diw.DETECTION_SET_INFO_ID in "
+ "where diw.DETECTIONED_STATE<>1 AND diw.police_emergent=0 and diw.VALID=1 and diw.DETECTION_SET_INFO_ID in "
+ "(select dst.ID from DETECTION_SET_INFO dst where dst.DETECTION_SET_STATE=1) and nt.NODE_STATE = 0 "
+ "and nt.node_group_id in ("+gids+")"
+ ") alramNode,"
+ "(SELECT count(DISTINCT t.node_ip) from node_table t WHERE "
+ " t.node_group_id= " + nodegroupTable.getGroupId()
+ ") allNode";
+ " and node_state=0 ) allNode";
}else{
sql = "SELECT * from ("
+ "select count(distinct nt.node_id) from detection_info_new diw left join node_table nt on diw.seq_id = nt.seq_id "
+ "where diw.DETECTIONED_STATE<>1 AND diw.police_emergent=0 and diw.DETECTION_SET_INFO_ID in "
+ "where diw.DETECTIONED_STATE<>1 AND diw.police_emergent=0 and diw.VALID=1 and diw.DETECTION_SET_INFO_ID in "
+ "(select dst.ID from DETECTION_SET_INFO dst where dst.DETECTION_SET_STATE=1) and nt.NODE_STATE = 0 "
+ "and nt.node_group_id in ("+gids+")"
+ ") alramNode,"
+ "(SELECT count(DISTINCT t.node_ip) from node_table t WHERE t.system_id="
+ getSystemID() + " AND t.node_group_id= " + nodegroupTable.getGroupId()
+ ")allNode";
+ " and node_state=0 )allNode";
}
List countList = commonService.executeSQL(sql);
@@ -412,10 +412,12 @@ public class TopoShowAction extends BaseAction
if(this.getAdminMark()){
sql = "select count(diw.seq_Id) from detection_info_new diw where diw.DETECTIONED_STATE<>1 AND diw.police_emergent=0 and diw.seq_id = "
+ seqId
+" and diw.VALID=1 "
+ " and diw.DETECTION_SET_INFO_ID in (select dst.ID from DETECTION_SET_INFO dst where dst.DETECTION_SET_STATE=1 ) ";
}else{
sql = "select count(diw.seq_Id) from detection_info_new diw where diw.DETECTIONED_STATE<>1 AND diw.police_emergent=0 and diw.seq_id = "
+ seqId
+" and diw.VALID=1 "
+ " and diw.DETECTION_SET_INFO_ID in (select dst.ID from DETECTION_SET_INFO dst where dst.DETECTION_SET_STATE=1 "
+ " and ("
+ "dst.VIEW_LEVEL=4 "//无限制

View File

@@ -648,13 +648,13 @@ public class ServerManagerAction extends BaseAction {
//将更新操作写到操作日志中
this.addDBOperationRpt(commonService, "Server_Table", "UPDATE", st.getId());
ServerTable serverTable = (ServerTable) commonService.get(ServerTable.class, ids[i]);
commonService.commit();
//将DC变更发送到DC
this.sendDataControllerReset(ids[i], serverTable.getServerIp(), commonService);
}
}
}
commonService.commit();
} catch (Exception e) {
commonService.rollback();
e.printStackTrace();
@@ -682,13 +682,13 @@ public class ServerManagerAction extends BaseAction {
//将更新操作写到操作日志中
this.addDBOperationRpt(commonService, "Server_Table", "UPDATE", st.getId());
ServerTable serverTable = (ServerTable) commonService.get(ServerTable.class, ids[i]);
commonService.commit();
//将DC变更发送到DC
this.sendDataControllerReset(ids[i], serverTable.getServerIp(), commonService);
}
}
}
commonService.commit();
} catch (Exception e) {
commonService.rollback();
e.printStackTrace();
@@ -797,9 +797,10 @@ public class ServerManagerAction extends BaseAction {
}
}
}
commonService.commit();
//将DC变更发送到DC
this.sendDataControllerReset(serverTable.getId(), serverTable.getServerIp(), commonService);
commonService.commit();
} catch (Exception e) {
commonService.rollback();
e.printStackTrace();

View File

@@ -328,7 +328,7 @@ public class DataDictionaryAction extends BaseAction {
String sql="update xt_mk_jbxx set zxbz=? where id=?";
this.commonService.updateBySql(sql, deptflag,Constants.DEPT_MK_ID);
}
commonService.commit();
//改变是否显示主动告警的启用状态时需要和各个nc通信SHOW_AUTO_ALARM_FLAG
if(nbt.getTypeIdentity().toLowerCase().equals(Constants.SHOW_AUTO_ALARM_FLAG.toLowerCase())
&& typeTable.getTypeState()!=oldState) {
@@ -339,7 +339,7 @@ public class DataDictionaryAction extends BaseAction {
}
outHtmlString("<script type=\"text/javascript\">alert('i18n_DataDictionaryAction.queryDictionary.success_n81i');this.location='dataDictionary.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
commonService.commit();
} catch (Exception e) {
commonService.rollback();
logger.error("Update failed",e);