Authored by zhangmingm

修改getPingStatus方法。

@@ -108,6 +108,8 @@ public class CollLinuxHost implements CollLinuxHostMBean { @@ -108,6 +108,8 @@ public class CollLinuxHost implements CollLinuxHostMBean {
108 */ 108 */
109 public Vector getPing(HashMap params) { 109 public Vector getPing(HashMap params) {
110 Vector<TblATO_KPIDETAIL> v=new Vector<TblATO_KPIDETAIL>(); 110 Vector<TblATO_KPIDETAIL> v=new Vector<TblATO_KPIDETAIL>();
  111 + String isPing = params.get("isPing")+""; // frank 2017-05-19 添加。Y进行ping操作,N不执行
  112 + if("Y".equals(isPing)){
111 String ip=params.get("IP_ADDR")+""; 113 String ip=params.get("IP_ADDR")+"";
112 if(!StringUtils.isEmpty(ip)){ 114 if(!StringUtils.isEmpty(ip)){
113 String connectStatCode="FM-00-10-001-999"; // linux 主机连接状态 115 String connectStatCode="FM-00-10-001-999"; // linux 主机连接状态
@@ -139,6 +141,7 @@ public class CollLinuxHost implements CollLinuxHostMBean { @@ -139,6 +141,7 @@ public class CollLinuxHost implements CollLinuxHostMBean {
139 } 141 }
140 v.add(kpidetail); 142 v.add(kpidetail);
141 } 143 }
  144 + }
142 return v; 145 return v;
143 146
144 } 147 }
@@ -153,8 +156,6 @@ public class CollLinuxHost implements CollLinuxHostMBean { @@ -153,8 +156,6 @@ public class CollLinuxHost implements CollLinuxHostMBean {
153 public Vector getSSH(HashMap params) { 156 public Vector getSSH(HashMap params) {
154 Vector<TblATO_KPIDETAIL> v=new Vector<TblATO_KPIDETAIL>(); 157 Vector<TblATO_KPIDETAIL> v=new Vector<TblATO_KPIDETAIL>();
155 String ip=params.get("IP_ADDR")+""; 158 String ip=params.get("IP_ADDR")+"";
156 - String result=server.getPingResultByIp(ip);  
157 - if(!StringUtils.isEmpty(result) && "UP".equals(result)){  
158 String loginStatCode="FM-00-10-001-998"; // linux 主机登录状态 159 String loginStatCode="FM-00-10-001-998"; // linux 主机登录状态
159 ParamterBean bean =new ParamterBean(); 160 ParamterBean bean =new ParamterBean();
160 String tempPort=params.get("PROTOCOL_PORT")+""; 161 String tempPort=params.get("PROTOCOL_PORT")+"";
@@ -188,7 +189,6 @@ public class CollLinuxHost implements CollLinuxHostMBean { @@ -188,7 +189,6 @@ public class CollLinuxHost implements CollLinuxHostMBean {
188 e.printStackTrace(); 189 e.printStackTrace();
189 } 190 }
190 v.add(kpidetail); 191 v.add(kpidetail);
191 - }  
192 return v; 192 return v;
193 } 193 }
194 194