initial commit

This commit is contained in:
chenjinsong
2018-09-27 16:21:05 +08:00
commit dc91c4c987
2011 changed files with 408920 additions and 0 deletions

View File

@@ -0,0 +1,466 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/taglib.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>i18n_addNodeInfo.message.title_n81i</title>
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
type="text/css" />
<link href="<c:url value='/css/suggest.css'/>" rel="stylesheet"
type="text/css" />
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery.js' />"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/onmouse.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery.tools.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/j.suggest.js'/>"></script>
<script type="text/javascript">
var vstart;
function add(){
//去空格
$("#nodeIp").val($.trim($("#nodeIp").val()));
$("#nNa").val($.trim($("#nNa").val()));
if($id("nodeIp","ip","i18n_addNodeInfo.text.nodeIp_n81i") && $("#nodeIp").checkByteLength(64,"i18n_addNodeInfo.text.nodeIp_n81i")
&& $id("nodeMac","","i18n_addNodeInfo.text.nodeMac_n81i") && $("#nodeMac").checkByteLength(100,"i18n_addNodeInfo.text.nodeMac_n81i")
&& $id("nNa","","i18n_addNodeInfo.text.nNa_n81i") && $("#nNa").checkByteLength(64,"i18n_addNodeInfo.text.nNa_n81i")
&& $id("nodeBoxIspn","","i18n_addNodeInfo.text.nodeBoxIspn_n81i") && $id("nodeUType","sz","i18n_addNodeInfo.text.nodeUType_n81i")
&& $id("nodeBeginUType","xz","i18n_addNodeInfo.text.nodeBeginUType_n81i")){
if($("#nodeType").val() == "1"){
if($("#networElementType").val() == ""){
alert("i18n_addNodeInfo.message.nodeBeginUType_n81i");
return false;
}
}else if($("#nodeType").val()==0&&(!$("#specialServerTypeTR").is(":hidden"))){
if($("#specialServerType").val() == ""){
alert("i18n_addNodeInfo.message.nodeSpecialServerType_n81i");
return false;
}
$("#version2").val("");
$("#version3").val("");
$("#networElementType").val("");
}else{
$("#version2").val("");
$("#version3").val("");
$("#specialServerType").val("");
$("#networElementType").val("");
}
document.Nodeform.action="<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=doAdd";
document.Nodeform.submit();
}
}
function goBack(){
document.Nodeform.action="<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=query";
document.Nodeform.submit();
}
function nodeTypeChange(){
var nodeType = $("#nodeType").val();
if(nodeType=='1'){
$("#networElementTypeTR").show();
$(".snmpVersionType").show();
}else{
$("#networElementTypeTR").hide();
$(".snmpVersionType").hide();
}
var nodeTypeIndex=$("#nodeType option").index($('#nodeType option:selected'));
if(nodeTypeIndex==2){
$("#specialServerTypeTR").show();
}else{
$("#specialServerTypeTR").hide();
}
}
//-- 节点IP 失去焦点事件绑定 自动匹配该节点是否已存在某机柜
function nodeIpChange(){
$.post("<c:url value='/nodeGroupManage/nodeManage!getNodeBox.do'/>",
{nodeIp:$("#nodeIp").val()},
function(data){
if(data!=null && data!=""){
$("#nodeBoxIspn").val(data.nodeBoxIspn);
$("#nodeUType").val(data.nodeUType);
if(data.nodeUType!=null){
vstart =data.nodeBeginUType;//保留节点在机柜已有起始U位
//$("#nodeUType").trigger("blur");//触发节点厚度U位的绑定事件即获取机柜的空闲位置可选起始U位选项
$("#nodeUType").trigger("onchange");//触发节点厚度U位的绑定事件即获取机柜的空闲位置可选起始U位选项
}
}else{
vstart = null;
$("#nodeBoxIspn").val("");//Ispn的值改变会触发它自己绑定的事件即把nodeUType和nodeBeginUType清空
}
}, "json");
}
function checkNodeIp(){
$.post("<c:url value='/nodeGroupManage/nodeManage!checkNodeIp.do'/>",
{nodeIp:$("#nodeIp").val(),nodeGroupId:$("#nodeGroupId").val()},
function(data){
if(data!=null && data!=""){
//同一节点组存在相同的IP
if(data.isExist !=null){
alert("i18n_addNodeInfo.message.nodeGroup_n81i");
$("#nodeIp").val("");
clearInfo();
}else{
//其它节点组存在相同IP
if(data.nodeIp !=null){
//设置Mac
$("#nodeMac").val(data.nodeMac);
//设置节点名称
$("#nNa").val(data.nodeName);
//设置节点类型
if(data.nodeType==1){
$("#nodeType").val(data.nodeType);
$("#networElementTypeTR").show();
//设置SNMP版本
$(".snmpVersionType").show();
if(data.snmpVersion == "1"){
$("#version2").attr("checked","checked");
}else if(data.snmpVersion == "3"){
$("#version3").attr("checked","checked");
}
}else{
$("#networElementTypeTR").hide();
}
if(data.nodeType==0&&data.specialServerType!=0){
$("#nodeType option:last").attr("selected","selected");
$("#specialServerTypeTR").show();
$("#specialServerType").val(data.specialServerType);
}else{
$("#nodeType option:first").val(data.nodeType);
$("#specialServerTypeTR").hide();
}
//设置网元类型
$("#networElementType").val(data.networElementType);
//设置用户名
$("#nodeUserName").val(data.nodeUserName);
//设置密码
$("#nodePassword").val(data.nodePassword);
//设置机柜编号
$("#nodeBoxIspn").val(data.nodeBoxIspn);
//设置机柜起始U位
vstart = data.nodeBeginUType
//设置节点厚度
$("#nodeUType").val(data.nodeUType);
/* $("#nodeUType").trigger("onchange"); */
nodeUTypeChange()
//设置节点IP信息
$("#nodeIpInfo").val(data.nodeIpInfo);
//设置节点描述
$("#nodeDesc").val(data.nodeDesc);
$("#nodeIp").next().html("i18n_addNodeInfo.message.nodeIp_n81i");
}
}
}else{
clearInfo();
}
},
"json"
);
}
function clearInfo(){
$("#nodeMac").val("");
$("#nNa").val("");
/* $("#nodeType").val(0); */
$("#nodeType option:first").attr("selected","selected");
$("#networElementTypeTR").hide();
$("#networElementType").val("");
$("#nodeUserName").val("");
$("#nodePassword").val("");
$("#nodeBoxIspn").val("");
$("#version2").attr("checked","checked");
$("#nodeUType").val("");
$("#nodeBeginUType").empty();
$("#nodeBeginUType").append("<option value=''>i18n_addNodeInfo.message.selectDefault_n81i</option>");
$("#nodeIpInfo").val("");
$("#nodeDesc").val("");
$("#nodeIp").next().html("");
}
//-- 节点厚度U位 事件绑定 由节点厚度U位决定起始U位的可选项
function nodeUTypeChange(){
if(isNaN($("#nodeUType").val())){
alert("i18n_addNodeInfo.message.nodeUType_n81i");
$("#nodeUType").val("");
$("#nodeBeginUType").empty();
$("#nodeBeginUType").append("<option value=''>i18n_addNodeInfo.message.selectDefault_n81i</option>");
$("#nodeUType").focus();
return;
}
$("#nodeBeginUType").empty();
$("#nodeBeginUType").append("<option value=''>i18n_addNodeInfo.message.selectDefault_n81i</option>");
var boxIspn = $("#nodeBoxIspn").val();
var nodeIp = $("#nodeIp").val();
var curVal = $("#nodeUType").val();
if(curVal!=""){
$.post("<c:url value='/nodeGroupManage/nodeManage!getBoxFreePosition.do'/>",
{"nodeBoxIspn":boxIspn,"nodeIp":nodeIp,"nodeUType":curVal},
function(data){
// 追加option元素
if(data!=null && data!=""){
var optionStr="";
$.each(data, function(i,val){
if(i==0){
optionStr = "<option selected='selected' value='"+val+"'>" + val + "</option>"
}else{
optionStr = "<option value='"+val+"'>" + val + "</option>"
}
$("#nodeBeginUType").append(optionStr);
});
}
// 自动匹配位置
if(vstart!=null && vstart!=""){
$("#nodeBeginUType >option[value='"+vstart+"']").attr("selected",true);
vstart = null;//该值改变后只能使用一次,所以一经调用就将其清空
}
}, "json");
}
}
// -----界面机柜及位置相关处理
$(function(){
//-- 机柜 事件绑定 清空节点起始U位和节点厚度U位
$("#nodeBoxIspn").bind("input",function(){
$("#nodeBeginUType").empty();
$("#nodeBeginUType").append("<option value=''>i18n_addNodeInfo.message.selectDefault_n81i</option>");
$("#nodeUType").val("");
});
//联想查询修改成列表形式
jQuery.post("<c:url value='/nodePosition/boxSet!getAllBoxsIspn.do' />",{},function(data,textStatus){
var everyItems=data.split(";");
var allName=new Array();
for(var j=0;j<everyItems.length;j++){
if(j!=(everyItems.length-1)){
var getN=everyItems[j];
allName[j]=new Array('',getN,'');
}
}
jQuery("#nodeBoxIspn").suggest(allName,{hot_list:allName,attachObject:"#suggest1"});
});
});
</script>
</head>
<body>
<div class="middle_list">
<div class="box_2">
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="goBack()" value="i18n_addNodeInfo.button.back_n81i"/>
</div>
<div style="height: 25px"></div>
<form action="" name="Nodeform" method="post" style="border:0px;">
<input type="hidden" name="position" value="${position }" />
<input type="hidden" name="nodeGroupId" value="${nodeGroupId }" id="nodeGroupId"/>
<input type="hidden" name="fromWhere" value="${fromWhere }"/>
<input type="hidden" name="type" value="${type }"/>
<input type="hidden" name="showStopNGroup" value="${showStopNGroup }" />
<input type="hidden" name="isValid" value="${isValid }" />
<table border="0" cellpadding="0" cellspacing="0" class="table1">
<tr>
<td colspan="4" class="color_7">
<strong>i18n_addNodeInfo.text.title_n81i</strong>
</td>
</tr>
<tr>
<td class="color_1" width="20%" align="right">
i18n_addNodeInfo.text.nodeIp_n81i
</td>
<td class="color_3" width="30%" align="left">
<input type="text" name="nodeTable.nodeIp" id="nodeIp"
style="width: 155px;" onchange="checkNodeIp()" />
<font color="red">*</font>
</td>
<td class="color_1" width="20%" align="right">
i18n_addNodeInfo.text.nodeMac_n81i
</td>
<td class="color_6" align="left">
<input type="text" name="nodeTable.nodeMac" id="nodeMac"
style="width: 155px;" />
<font color="red">*</font>
</td>
</tr>
<tr>
<td class="color_1" width="20%" align="right">
i18n_addNodeInfo.text.nNa_n81i
</td>
<td class="color_6" align="left" >
<input type="text" name="nodeTable.nodeName" id="nNa"
style="width: 155px;" />
<font color="red">*</font>
</td>
<td class="color_1" width="20%" align="right">
i18n_addNodeInfo.text.nodeType_n81i
</td>
<td class="color_6" align="left">
<select name="nodeTable.nodeType" id="nodeType" onchange="nodeTypeChange()"
style="width: 161px;" >
<option value="0">
i18n_addNodeInfo.message.nodeType0_n81i
</option>
<option value="1">
i18n_addNodeInfo.message.nodeType1_n81i
</option>
<option value="0">
i18n_addNodeInfo.message.nodeType2_n81i
</option>
</select>
</td>
</tr>
<tr id="networElementTypeTR" style="display: none;">
<td class="color_1" align="right">
i18n_addNodeInfo.text.networElementType_n81i
</td>
<td class="color_6" align="left" colspan="3">
<select name="nodeTable.networElementType" id="networElementType"
style="width: 161px;" >
<option value="">i18n_addNodeInfo.message.selectDefault_n81i</option>
<c:forEach items="${optionList}" var="optionTable" >
<option value="${optionTable.typeCode}" <c:if test="${optionTable.typeCode == nodeTable.networElementType}">selected="selected"</c:if>>
${optionTable.typeValue}
</option>
</c:forEach>
</select>
<font color="red">*</font>
</td>
</tr>
<tr id="specialServerTypeTR" style="display: none;">
<td class="color_1" align="right">
i18n_addNodeInfo.text.specialServerType_n81i
</td>
<td class="color_6" align="left" colspan="3">
<select name="nodeTable.specialServerType" id="specialServerType"
style="width: 161px;" >
<option value="">i18n_addNodeInfo.message.selectDefault_n81i</option>
<c:forEach items="${optionList2}" var="optionTable" >
<option value="${optionTable.typeCode}" <c:if test="${optionTable.typeCode == nodeTable.specialServerType}">selected="selected"</c:if>>
${optionTable.typeValue}
</option>
</c:forEach>
</select>
<font color="red">*</font>
</td>
</tr>
<tr>
<td class="color_1" width="20%" align="right">
i18n_addNodeInfo.text.nodeUserName_n81i
</td>
<td class="color_6" width="30%" align="left">
<input type="text" name="nodeTable.nodeUserName" id="nodeUserName"
style="width: 155px;" />
</td>
<td class="color_1" width="20%" align="right">
i18n_addNodeInfo.text.nodePassword_n81i
</td>
<td class="color_6" align="left">
<c:choose>
<c:when test="${jsbh}">
<input type="text" name="nodeTable.nodePassword" id="nodePassword"
style="width: 155px;" />
</c:when>
<c:otherwise>
<input type="password" name="nodeTable.nodePassword" id="nodePassword"
style="width: 155px;" />
</c:otherwise>
</c:choose>
</td>
</tr>
<tr>
<td class="color_1" align="right">
i18n_addNodeInfo.text.nodeBoxIspn_n81i
</td>
<td class="color_6" align="left">
<input name="nodeTable.nodeBoxIspn" id="nodeBoxIspn" style="width: 156px;" title="i18n_addNodeInfo.message.nodeBoxIspn_n81i"/>
<font color="red">*</font>
<div id='suggest1' class="ac_results"></div>
</td>
<td class="color_1 snmpVersionType" align="right" style="display: none;">
i18n_addNodeInfo.text.snmpVersion_n81i
</td>
<td class="color_6 snmpVersionType" align="left" style="display: none;">
<input type="radio" name="nodeTable.snmpVersion" value="1" id="version2" checked="checked"/>VERSION2C&nbsp;
<input type="radio" name="nodeTable.snmpVersion" value="3" id="version3"/>VERSION3
</td>
</tr>
<tr>
<td class="color_1" align="right">
i18n_addNodeInfo.text.nodeUType_n81i
</td>
<td class="color_6" align="left">
<input type="text" name="nodeTable.nodeUType" id="nodeUType"
style="width: 155px;" oninput="nodeUTypeChange()"/>
<font color="red">*</font>
</td>
<td class="color_1" align="right">
i18n_addNodeInfo.text.nodeBeginUType_n81i
</td>
<td class="color_3" align="left">
<select name="nodeTable.nodeBeginUType" id="nodeBeginUType"
style="width: 161px;" >
<option value="">
i18n_addNodeInfo.message.selectDefault_n81i
</option>
</select>
<font color="red">*</font>
</td>
</tr>
<tr>
<td class="color_1" align="right">
i18n_addNodeInfo.text.nodeIpInfo_n81i
</td>
<td class="color_6" align="left">
<textarea rows="4" cols="40" name="nodeTable.nodeIpInfo"
id="nodeIpInfo" style="width: 155px; height: 50px;"
></textarea>
</td>
<td class="color_1" align="right">
i18n_addNodeInfo.text.nodeDesc_n81i
</td>
<td class="color_3" align="left" >
<textarea rows="4" cols="40" name="nodeTable.nodeDesc"
id="nodeDesc" style="width: 155px; height: 50px;"
></textarea>
</td>
</tr>
<tr>
<td class="color_7" colspan="4" align="right">
&nbsp;
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="add()" value="i18n_addNodeInfo.button.submit_n81i"/>
&nbsp;
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="javascript:document.forms['Nodeform'].reset()"
value="i18n_addNodeInfo.button.reset_n81i"/>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,284 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/taglib.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>i18n_dni.message.title_n81i</title>
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
type="text/css" />
<link href="<c:url value='/css/suggest.css'/>" rel="stylesheet"
type="text/css" />
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery.js' />"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/onmouse.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery.tools.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/j.suggest.js'/>"></script>
<script type="text/javascript">
function goBack(){
document.Nodeform.action="<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=query";
document.Nodeform.submit();
}
</script>
</head>
<body>
<div class="middle_list">
<div class="box_2">
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="goBack()" value="i18n_dni.button.back_n81i"/>
</div>
<div style="height: 25px"></div>
<form action="" name="Nodeform" method="post" style="border:0px;">
<input type="hidden" name="position" value="${position }" />
<input type="hidden" name="pageNo" value="${pageNo }" />
<input type="hidden" name="pageSize" value="${pageSize }" />
<input type="hidden" name="nodeGroupId" value="${nodeGroupId }" />
<input type="hidden" name="fromWhere" value="${fromWhere }"/>
<input type="hidden" name="type" value="${type }"/>
<input type="hidden" name="showStopNGroup" value="${showStopNGroup }" />
<input type="hidden" name="isValid" value="${isValid }" />
<input type="hidden" name="nodeIpVo" value="${nodeIpVo }" />
<input type="hidden" name="nodeNameVo" value="${nodeNameVo }" />
<table border="0" cellpadding="0" cellspacing="0" class="table1">
<tr>
<td colspan="4" class="color_top">
<strong>i18n_dni.text.title_n81i</strong>
</td>
</tr>
<c:if test="${dsinfo eq null }">
<tr>
<td colspan="4" class="color_1">
<font color="red" >
<c:if test="${nodeTable.nodeType==0 }">i18n_dni.message.nodeType0_n81i</c:if>
<c:if test="${nodeTable.nodeType==1 }">i18n_dni.message.nodeType1_n81i</c:if>
</font>
</td>
</tr>
</c:if>
<c:if test="${dsinfo ne null }">
<tr>
<td class="color_1" width="20%" align="right">
i18n_dni.text.hostName_n81i
</td>
<td class="color_3" width="30%" align="left">
${dsinfo.hostName }
</td>
<td class="color_1" width="20%" align="right">
i18n_dni.text.operateSystem_n81i
</td>
<td class="color_6" align="left">
${dsinfo.operateSystem }
</td>
</tr>
<tr>
<td class="color_1" width="20%" align="right">
i18n_dni.text.cpuCnt_n81i
</td>
<td class="color_6" align="left">
${dsinfo.cpuCnt }
</td>
<td class="color_1" align="right">
i18n_dni.text.cpuMhz_n81i
</td>
<td class="color_6" align="left">
${dsinfo.cpuMhz }
</td>
</tr>
<tr>
<td class="color_1" align="right">
i18n_dni.text.memorySize_n81i
</td>
<td class="color_6" align="left">
${dsinfo.memorySize }
</td>
<td class="color_1" align="right" >
i18n_dni.text.diskSize_n81i
</td>
<td class="color_3" align="left" >
${dsinfo.diskSize }
</td>
</tr>
<tr>
<td class="color_1" align="right">
i18n_dni.text.swapSize_n81i
</td>
<td class="color_6" align="left">
${dsinfo.swapSize }
</td>
<td class="color_1" align="right" >
i18n_dni.text.netCnt_n81i
</td>
<td class="color_3" align="left" >
${dsinfo.netCnt }
</td>
</tr>
<tr>
<td class="color_1" align="right">
i18n_dni.text.dataCheckTime_n81i
</td>
<td class="color_6" align="left">
${dsinfo.dataCheckTimeStr }
</td>
<td class="color_1" align="right" >
i18n_dni.text.dataArriveTime_n81i
</td>
<td class="color_3" align="left" >
${dsinfo.dataArriveTimeStr }
</td>
</tr>
<tr>
<td colspan="4" class="color_top">
<strong>i18n_dni.text.diskInfo_n81i</strong>
</td>
</tr>
<c:if test="${fn:length(dsiDiskList) eq 0}">
<tr>
<td colspan="4" class="color_1">
<font color="red" >
i18n_dni.message.noDataGetFromDisk_n81i
</font>
</td>
</c:if>
<c:if test="${fn:length(dsiDiskList) > 0}">
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" class="table1">
<tr>
<td class="color_top" width="10%">
i18n_dni.text.index_n81i
</td>
<td class="color_top" width="45%">
i18n_dni.text.diskRang_n81i
</td>
<td class="color_top" width="45%">
i18n_dni.text.rangSize_n81i
</td>
</tr>
<c:forEach items="${dsiDiskList}" var="disk" varStatus="diskIndex" >
<c:set var="color" value="color_1" />
<c:set var="color_end" value="color_7" />
<c:if test="${diskIndex.index%2!=0 }">
<c:set var="color" value="color_3" />
<c:set var="color_end" value="color_6" />
</c:if>
<tr>
<td class="${color }" >
${diskIndex.index+1 }
</td>
<td class="${color }" >
${disk.diskRang }
</td>
<td class="${color }" >
${disk.diskSize }
</td>
</tr>
</c:forEach>
</table>
</td>
</tr>
</c:if>
<tr>
<td colspan="4" class="color_top">
<strong>i18n_dni.text.netInfo_n81i</strong>
</td>
</tr>
<c:if test="${fn:length(dsiDiskList) eq 0}">
<tr>
<td colspan="4" class="color_1">
<font color="red" >
i18n_dni.message.noDataGetFromNet_n81i
</font>
</td>
</c:if>
<c:if test="${fn:length(dsiDiskList) > 0}">
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" class="table1">
<tr>
<td class="color_top" width="4%">
i18n_dni.text.index_n81i
</td>
<td class="color_top" width="8%">
i18n_dni.text.netName_n81i
</td>
<td class="color_top" width="8%">
i18n_dni.text.netState_n81i
</td>
<td class="color_top" width="8%">
i18n_dni.text.netSpeed_n81i
</td>
<td class="color_top" width="8%">
IP
</td>
<td class="color_top" width="8%">
i18n_dni.text.netSubmask_n81i
</td>
<td class="color_top" width="8%">
i18n_dni.text.netGateway_n81i
</td>
<td class="color_8" width="10%">
i18n_dni.text.netMac_n81i
</td>
</tr>
<c:forEach items="${dsiNetList}" var="net" varStatus="netIndex" >
<c:set var="color" value="color_1" />
<c:set var="color_end" value="color_7" />
<c:if test="${netIndex.index%2!=0 }">
<c:set var="color" value="color_3" />
<c:set var="color_end" value="color_6" />
</c:if>
<tr>
<td class="${color }">
${netIndex.index+1}
</td>
<td class="${color }">
${net.netName}
</td>
<td class="${color }">
${net.netState}
</td>
<td class="${color }">
${net.netSpeed}
</td>
<td class="${color }">
${net.netIp}
</td>
<td class="${color }">
${net.netSubmask}
</td>
<td class="${color }">
${net.netGateway}
</td>
<td class="${color }">
${net.netMac}
</td>
</tr>
<c:set var="index" value="${index + 1}" />
</c:forEach>
</table>
</td>
</tr>
</c:if>
</c:if>
</table>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,574 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/taglib.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>i18n_nodeInfo.message.title_n81i</title>
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
type="text/css" />
<link href="<c:url value='/css/suggest.css'/>" rel="stylesheet"
type="text/css" />
<link href="<c:url value='/js/jBox/Skins/Gray/jbox.css'/>" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/onmouse.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery.tools.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery.suggest.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value="/js/jBox/jquery.jBox-2.3.min.js"/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value="/js/fileInput.js"/>"></script>
<style type="text/css">
.mydiv {
background-color:#fff;
border: 1px solid #000;
text-align: center;
line-height: 40px;
font-size: 12px;
font-weight: bold;
z-index:99;
width: 220px;
height: 80px;
left:50%;/*FF IE7*/
top: 50%;/*FF IE7*/
margin-left:-150px!important;/*FF IE7 该值为本身宽的一半 */
margin-top:-60px!important;/*FF IE7 该值为本身高的一半*/
margin-top:0px;
position:fixed!important;/*FF IE7*/
position:absolute;/*IE6*/
_top: expression(eval(document.compatMode &&
document.compatMode=='CSS1Compat') ?
documentElement.scrollTop + (document.documentElement.clientHeight-this.offsetHeight)/2 :/*IE6*/
document.body.scrollTop + (document.body.clientHeight - this.clientHeight)/2);/*IE5 IE5.5*/
}
.bg {
background-color: #ccc;
width: 100%;
height: 100%;
left:0;
top:0;/*FF IE7*/
filter:alpha(opacity=50);/*IE*/
opacity:0.5;/*FF*/
z-index:1;
position:fixed!important;/*FF IE7*/
position:absolute;/*IE6*/
_top: expression(eval(document.compatMode &&
document.compatMode=='CSS1Compat') ?
documentElement.scrollTop + (document.documentElement.clientHeight-this.offsetHeight)/2 :/*IE6*/
document.body.scrollTop + (document.body.clientHeight - this.clientHeight)/2);/*IE5 IE5.5*/
}
/*The END*/
</style>
<script type="text/javascript">
var msg = '${MSG}';
if(msg=='1'){
alert("i18n_nodeInfo.message.success_n81i");
}else if(msg=='2'){
alert("i18n_nodeInfo.message.faild_n81i");
}
//添加记录
function addRecord(){
document.form3.action ="<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=openAdd&pageNo="+'${pageNo }'+"&pageSize="+'${pageSize }';
document.form3.submit();
}
//修改记录
function updateRecord(id){
document.form3.action ="<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=openUpdate&nodeId="+id+"&pageNo="+'${pageNo }'+"&pageSize="+'${pageSize }';
document.form3.submit();
}
//停用
function stopRecord(id){
document.form3.action ="<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=stop&nodeId="+id;
document.form3.submit();
}
//启用
function startRecord(id){
document.form3.action ="<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=start&nodeId="+id;
document.form3.submit();
}
//查询记录
function qry(){
document.form3.action = "<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=query";
document.form3.submit();
}
//查看详情
function showRecord(nid){
if(nid!=null && nid!="" ){
document.form3.action = "<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=detail&nodeId="+nid+"&pageNo="+'${pageNo }'+"&pageSize="+'${pageSize }';
document.form3.submit();
}
}
//导入节点
function importXls() {
var myfileVal = document.getElementById("myFile").value;
if(myfileVal=="") {
alert("i18n_nodeInfo.message.selectFile_n81i");
}else if((myfileVal.lastIndexOf(".xlsx")+5)!=myfileVal.length && (myfileVal.lastIndexOf(".xls")+4)!=myfileVal.length){
alert("i18n_nodeInfo.message.selectFileType_n81i");
}else if(confirm('i18n_nodeInfo.message.isImport_n81i')){
document.form33.action = "<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=importXls";
document.form33.submit();
document.form33.action = "<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=query";
}
}
function downloadExample() {
document.form33.action = "<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=downloadExample";
document.form33.submit();
document.form33.action = "<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=query";
}
//程辉 2013-5-8 新增 导出当前页
function emportCurrentXls() {
document.form33.action = "<c:url value='/'/>/nodeGroupManage/nodeManage!executeAction.do?action=emportCurrentXls&pageNo="+'${pageNo }'+"&pageSize="+'${pageSize }'+"&nodeIpVo="+$("#nodeIpVo").val()+"&nodeNameVo="+$("#nodeNameVo").val();
document.form33.submit();
closeDiv();
document.form33.action = "<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=query";
}
//程辉 2013-5-8 新增 导出全部
function emportAllXls() {
document.form33.action = "<c:url value='/'/>/nodeGroupManage/nodeManage!executeAction.do?action=emportAllXls&nodeIpVo="+$("#nodeIpVo").val()+"&nodeNameVo="+$("#nodeNameVo").val();
document.form33.submit();
closeDiv();
document.form33.action = "<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=query";
}
function showDiv(){
document.getElementById('popDiv').style.display='block';
document.getElementById('bg').style.display='block';
}
function closeDiv(){
document.getElementById('popDiv').style.display='none';
document.getElementById('bg').style.display='none';
}
//返回
function goBack(){
//window.parent.goBack();
document.location.href = "<%=path%>/nodeGroupManage/nodeGroupManage!execute.do?action=queryNodeGroupInfo&showStopNGroup=${showStopNGroup}";
}
//parent.document.all("listFrame").style.height = document.body.scrollHeight + 16;
var set_Id;
var ajaxProperties = "";
var ajaxTableName = "";
var ajaxType = "";
var id = "";
var returnDiv = "";
var ajaxValue = "";
function lianxiangkeydown() {
clearTimeout(set_Id);
}
function lianxiangkeyup(ajaxProperties1,ajaxTableName1,ajaxType1,id1,returnDiv1,ajaxValue1) {
if(parent.document.getElementById("lianxiangStatus").value=="2")
{
if(jQuery.trim(ajaxValue1)=="") return false;
ajaxProperties = ajaxProperties1;
ajaxTableName = ajaxTableName1;
ajaxType = ajaxType1;
id = id1;
returnDiv = returnDiv1;
if(!checkStrNoDian(ajaxValue1)){
ajaxValue = ajaxValue1;
}else{
clearTimeout(set_Id);
alert('i18n_nodeInfo.message.inputInfo_n81i');
$("#"+id).val('');
return;
}
clearTimeout(set_Id);
set_Id = setTimeout(ajaxForLianxiang,500);
}
}
function ajaxForLianxiang()
{
jQuery.post("<%=path%>/sysManage/sysPopedomManage!queryInfoForAjax.do",
{"ajaxProperties":ajaxProperties,"ajaxTableName":ajaxTableName,"ajaxType":ajaxType,"ajaxValue":ajaxValue},function(data)
{
var lianxiangList = data.split(",");
jQuery("#"+id).suggest(lianxiangList,{hot_list:lianxiangList,attachObject:"#"+returnDiv});
if(lianxiangList == ''){
$("#"+id).css("color","#CBC0B6");
}else{
$("#"+id).css("color","#000000");
}
});
}
$(function() {
var isValid = '${isValid}';
if('0'==isValid) {//无效
jQuery("#validButton").hide();
jQuery("#validDo a").attr('href','');
}
});
function ieBrowser(){
if($.browser.msie){
if($.browser.version.split('.')[0]<=7){
return false;
}else{
return true;//ie8+
}
}
}
function goGuide(datas) {
if(datas!=null && datas!=""){
if(datas.resu=='over') {
window.location ="<%=path%>/sysManage/guideManage!execute.do?action=index";
}
}
}
$(function(){
var dh = document.body.clientHeight;
var dhh = dh-60+"px;";
var tableHeight = $("#info").height();
if(tableHeight > dh-60){
$("#maindiv").attr("style","clear:both;margin-left:6px;overflow-y:auto;overflow-x:auto;width:99%;font-size:12px;height: "+dhh);
if(ieBrowser()){
$("#info").attr("style","width:100%;");
}else{
$("#info").attr("style","width:98.5%;");
}
}else{
$("#maindiv").attr("style","clear:both;margin-left:6px;overflow-y:auto;overflow-x:auto;width:98%;font-size:12px;height: "+dhh);
$("#info").attr("style","width:100%;");
}
$("#maindiv").attr("style","clear:left");
if($("#isComplete").val()=='0'){
//var content = {
// content: '业务系统操作已完成,是否进行下一步操作?',
// buttons: { '下一步': 1, '返回'0,'取消': -1 },
// buttonsFocus: 0,
// submit: function (v, h, f) {
// if(v == 1) {//执行下一步--用户组
// window.location ="<%=path%>/sysManage/userGroupPerssion.do?action=query";
// }
// if(v == 0){//返回到设置向导页
// window.location ="<%=path%>/sysManage/guideManage!execute.do?action=index";
// }
// if(v == -1){//返回到设置向导页
// return;
// }
// }
//};
//$.jBox(content);
var submit = function (v, h, f) {
if (v == 'yes') {
$("input[type=hidden][name=fromWhere]").val('formGuide');
return;
}
if (v == 'no') {
$.post("<c:url value='/sysManage/guideManage!setComplete.do'/>",
{
packNum:6,
packName:'jd'
},
function(datas){
goGuide(datas);
},"json");
}
};
$.jBox.warning("i18n_nodeInfo.message.warning_n81i", "i18n_nodeInfo.message.hint_n81i", submit,{icon: false});
}
$("#info").floatHeaderDiv();
});
function downloadfile(fileName){
document.form33.action="<c:url value='/'/>/download/downLoadFile!download.do?file="+fileName;
document.form33.submit();
}
</script>
</head>
<body id="nodeBody">
<div class="middle_list" id="box" style="overflow: hidden;">
<!--中间部分右边开始-->
<form name=form33 id="form33" action="<c:url value='nodeManage!queryNodeInfo.do'/>" method="post" style="margin: 0; padding: 0" enctype="multipart/form-data">
<input type="hidden" name="nodeGroupId" value="${nodeGroupId }" />
<input type="hidden" name = "isComplete" id="isComplete" value="${isComplete}"/>
<input type="hidden" name="fromWhere" value="${fromWhere }"/>
<input type="hidden" name="showStopNGroup" value="${showStopNGroup }" />
<input type="hidden" name="isValid" value="${isValid }" />
<div id="divTop">
<div class="box_2" >
<div id="validButton" style="display:inline;">
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="javascript:downloadExample();" value="i18n_nodeInfo.button.downloadExample_n81i"/>
&nbsp;
<input type="button" value="i18n_nodeInfo.text.importXls_n81i" title="i18n_nodeInfo.text.importXls_n81i" class="btn3_mouseout" onclick="javascript:uploadFile(this)"/>
<input type="file" name="myFile" id="myFile" value="" class="filebtn" onchange="javascript:setValue(this.value)"/>
&nbsp;
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="javascript:importXls();" value="i18n_nodeInfo.button.importXls_n81i"/>
&nbsp;
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="javascript:showDiv();" value="i18n_nodeInfo.button.showDiv_n81i"/>
&nbsp;
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="javascript:addRecord();" value="i18n_nodeInfo.button.add_n81i"/>
&nbsp;
</div>
<c:if test="${type != 'config'}">
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="javascript:goBack();" value="i18n_nodeInfo.button.back_n81i"/>
</c:if>
&nbsp;
</div>
</div>
</form>
<form name=form3 id="form3" action="<c:url value='nodeManage!queryNodeInfo.do'/>" method="post">
<input type="hidden" name="nodeGroupId" value="${nodeGroupId }" />
<input type="hidden" name = "isComplete" id="isComplete" value="${isComplete}"/>
<input type="hidden" name="fromWhere" value="${fromWhere }"/>
<input type="hidden" name="showStopNGroup" value="${showStopNGroup }" />
<input type="hidden" name="isValid" value="${isValid }" />
<input type="hidden" name="type" value="${type }"/>
<div class="box_1">
<label class="divTopText"><font class="selectText">i18n_nodeInfo.text.nodeIp_n81i</font>
<input type="text" id="nodeIpVo"
onkeyup="lianxiangkeyup('nodeIp','NodeTable','String','nodeIpVo','suggest3',this.value);"
name="nodeIpVo" title="i18n_nodeInfo.message.nodeIp_n81i" value="${nodeIpVo}" size="20" />
<div id='suggest3' class="ac_results"></div></label>
<label class="divTopText"><font class="selectText">i18n_nodeInfo.text.nodeName_n81i</font>
<input type="text" id="nodeNameVo"
onkeyup="lianxiangkeyup('nodeName','NodeTable','String','nodeNameVo','suggest1',this.value);"
name="nodeNameVo" title="i18n_nodeInfo.message.nodeName_n81i" value="${nodeNameVo}" size="20" />
<div id='suggest1' class="ac_results"></div></label><%--
节点描述
<input type="text" id="nodeDescVo"
onkeyup="lianxiangkeyup('nodeDesc','NodeTable','String','nodeDescVo','suggest2',this.value);"
name="nodeDescVo" title="请输入节点描述" value="${nodeDescVo}" size="20" />
<div id='suggest2' class="ac_results"></div>
--%><img src="<c:url value='/images/button_chaxun.png'/>"
class="img_middle" onclick="javascript:qry();" />
</div>
<div id="maindiv" style="clear:both;">
<table border="0" cellpadding="0" cellspacing="0" class="table" align="center" id="info">
<tr>
<td class="color_top" width="4%">
i18n_nodeInfo.text.index_n81i
</td>
<td class="color_top" width="8%">
i18n_nodeInfo.text.nodeIp_n81i
</td>
<td class="color_top" width="8%">
i18n_nodeInfo.text.nodeName_n81i
</td>
<td class="color_top" width="6%">
i18n_nodeInfo.text.nodeType_n81i
</td>
<td class="color_top" width="6%">
i18n_nodeInfo.text.nodeHight_n81i
</td>
<td class="color_top" width="8%">
i18n_nodeInfo.text.systemId_n81i
</td>
<td class="color_top" width="8%">
i18n_nodeInfo.text.nodeGroup_n81i
</td>
<td class="color_top" width="8%">
i18n_nodeInfo.text.createTime_n81i
</td>
<td class="color_8" width="10%">
i18n_nodeInfo.text.operation_n81i
</td>
</tr>
<!-- 1、远程连接引入页面 -->
<jsp:include page="/common/remoteConn.jsp" />
<c:set var="index" value="${1}" />
<c:choose>
<c:when test="${fn:length(nodeList) > 0}">
<c:forEach items="${nodeList}" var="node" varStatus="vs">
<c:set var="color" value="color_1" />
<c:set var="color_end" value="color_7" />
<c:if test="${vs.count%2!=0 }">
<c:set var="color" value="color_3" />
<c:set var="color_end" value="color_6" />
</c:if>
<tr>
<td class="${color }">
${index+(pageNo-1)*pageSize}
</td>
<td class="${color }">
<!-- 2、 调用JS此处远程连接调用JS在/common/remoteConn.jsp中 -->
<a href="javascript:void(0);"
onclick="remoteConn('${node.nodeSystemType }','${node.nodeIp}','${node.nodeType }', this)">
${node.nodeIp}
</a>
</td>
<td class="${color }">
${node.nodeName}
</td>
<td class="${color }">
<c:if test="${node.nodeType==1}">
<c:if test="${node.networElementType==1}">
i18n_nodeInfo.message.specialDevice_n81i
</c:if>
<c:if test="${node.networElementType==2}">
i18n_nodeInfo.message.diskArray_n81i
</c:if>
<c:if test="${node.networElementType==3}">
i18n_nodeInfo.message.blockRouter_n81i
</c:if>
<c:if test="${node.networElementType==4}">
i18n_nodeInfo.message.netElements_n81i
</c:if>
</c:if>
<c:choose>
<c:when test="${node.nodeType==0&&node.specialServerType!=null}">
i18n_nodeInfo.text.specialServer_n81i
</c:when>
<c:when test="${node.nodeType==0}">
i18n_nodeInfo.text.server_n81i
</c:when>
</c:choose>
</td>
<td class="${color }">
${node.nodeUType}U
</td>
<td class="${color }">
${node.systemIdName}
</td>
<td class="${color }">
${node.groupIdName}
</td>
<td class="${color }">
<fmt:formatDate value="${node.nodeCreatetime}" pattern="yyyy-MM-dd HH:mm:ss" />
</td>
<c:if test="${isValid==0}"><!-- isValid=0 表示无效 -->
<td class="${color_end }" >
<img src="<c:url value='/images/logo_1.png'/>" class="img_middle" />&nbsp;
<a><font color="gray">i18n_nodeInfo.text.updateInfo_n81i</font></a>
<img src="<c:url value='/images/logo_1.png'/>" class="img_middle" />&nbsp;
<c:if test="${node.nodeState=='0' }"><!-- nodeState=0表示正常 nodeState=1表示有故障 -->
<a ><font color="gray">i18n_nodeInfo.message.downline_n81i</font></a>
</c:if>
<c:if test="${node.nodeState=='1' }">
<a ><font color="gray">i18n_nodeInfo.message.online_n81i</font></a>
</c:if>
<img src="<c:url value='/images/logo_1.png'/>" class="img_middle" />&nbsp;
<a ><font color="gray">i18n_nodeInfo.text.systemInfo_n81i</font></a>
</td>
</c:if>
<c:if test="${isValid!=0}">
<td class="${color_end }" >
<img src="<c:url value='/images/logo_1.png'/>" class="img_middle" />&nbsp;
<a href="javascript:updateRecord('${node.nodeId}')">i18n_nodeInfo.text.updateInfo_n81i</a>
<img src="<c:url value='/images/logo_1.png'/>" class="img_middle" />&nbsp;
<c:if test="${node.nodeState=='0' }">
<a href="javascript:stopRecord('${node.nodeId}')"><font color="red">i18n_nodeInfo.message.downline_n81i</font></a>
</c:if>
<c:if test="${node.nodeState=='1' }">
<a href="javascript:startRecord('${node.nodeId}')">i18n_nodeInfo.message.online_n81i</a>
</c:if>
<c:if test="${node.nodeType=='0' }">
<img src="<c:url value='/images/logo_1.png'/>" class="img_middle" />&nbsp;
<a href="javascript:showRecord('${node.nodeId}')">i18n_nodeInfo.text.systemInfo_n81i</a>
</c:if>
</td>
</c:if>
</tr>
<c:set var="index" value="${index + 1}" />
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td colspan="9" height="35" class="color_6" align="center">
i18n_nodeInfo.text.noRecord_n81i
</td>
</tr>
</c:otherwise>
</c:choose>
</table>
</div>
<c:if test="${!empty nodeList}">
<div id="divBoot">
<jsp:include page="/common/page.jsp" />
</div>
</c:if>
<!--中间部分右边结束-->
</form>
</div>
<div id="popDiv" class="mydiv" style="display:none;">
<input type="hidden" />
<input type="button" class=btn3_mouseout style="width:100px;"
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="javascript:emportCurrentXls();" value="i18n_nodeInfo.button.emportCurrentXls_n81i"/>
&nbsp;
<input type="button" class=btn3_mouseout style="width:80px"
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="javascript:emportAllXls();" value="i18n_nodeInfo.button.emportAllXls_n81i"/>
&nbsp;<br/>
<a href="javascript:closeDiv()">i18n_nodeInfo.text.closeWindow_n81i</a></div>
<div id="bg" class="bg" style="display:none;"></div>
</body>
</html>

View File

@@ -0,0 +1,281 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/taglib.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>i18n_nili.message.title_n81i</title>
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
type="text/css" />
<link href="<c:url value='/css/suggest.css'/>" rel="stylesheet"
type="text/css" />
<link href="<c:url value='/js/jBox/Skins/Gray/jbox.css'/>" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/onmouse.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery.tools.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery.suggest.js'/>"></script>
<script type="text/javascript">
//查询记录
function qry(){
document.form3.action = "<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=queryChild";
document.form3.submit();
}
var set_Id;
var ajaxProperties = "";
var ajaxTableName = "";
var ajaxType = "";
var id = "";
var returnDiv = "";
var ajaxValue = "";
function lianxiangkeydown() {
clearTimeout(set_Id);
}
function lianxiangkeyup(ajaxProperties1,ajaxTableName1,ajaxType1,id1,returnDiv1,ajaxValue1) {
if(parent.parent.document.getElementById("lianxiangStatus").value=="2")
{
if(jQuery.trim(ajaxValue1)=="") return false;
ajaxProperties = ajaxProperties1;
ajaxTableName = ajaxTableName1;
ajaxType = ajaxType1;
id = id1;
returnDiv = returnDiv1;
if(!checkStrNoDian(ajaxValue1)){
ajaxValue = ajaxValue1;
}else{
clearTimeout(set_Id);
alert('i18n_nili.message.inputInfo_n81i');
$("#"+id).val('');
return;
}
clearTimeout(set_Id);
set_Id = setTimeout(ajaxForLianxiang,500);
}
}
function ajaxForLianxiang()
{
if(ajaxProperties == 'nodeIp'){
url = "<%=path%>/nodeGroupManage/nodeManage!queryInfoForAjax.do";
}else{
url = "<%=path%>/sysManage/sysPopedomManage!queryInfoForAjax.do";
}
jQuery.post(url,
{"ajaxProperties":ajaxProperties,"ajaxTableName":ajaxTableName,"ajaxType":ajaxType,"ajaxValue":ajaxValue},function(data)
{
var lianxiangList = data.split(",");
jQuery("#"+id).suggest(lianxiangList,{hot_list:lianxiangList,attachObject:"#"+returnDiv});
if(lianxiangList == ''){
$("#"+id).css("color","#CBC0B6");
}else{
$("#"+id).css("color","#000000");
}
});
}
function ieBrowser(){
if($.browser.msie){
if($.browser.version.split('.')[0]<=7){
return false;
}else{
return true;//ie8+
}
}
}
$(function(){
/*
var dh = document.body.clientHeight;
var dhh = dh-60+"px;";
var tableHeight = $("#info").height();
if(tableHeight > dh-60){
$("#maindiv").attr("style","margin-left:6px;overflow-y:auto;overflow-x:auto;width:99%;font-size:12px;height: "+dhh);
if(ieBrowser()){
$("#info").attr("style","width:100%;");
}else{
$("#info").attr("style","width:98.5%;");
}
}else{
$("#maindiv").attr("style","margin-left:6px;overflow-y:auto;overflow-x:auto;width:98%;font-size:12px;height: "+dhh);
$("#info").attr("style","width:100%;");
}
*/
$("#info").floatHeaderDiv();
//--同步本页面高度到父页面
var $iframe = $("#Ich",window.parent.document)
if($iframe != null){
//alert($iframe.css('height'));
$iframe.css('height',document.body.scrollHeight);
//
window.parent.resetHeight();
}else{
//alert('未找到父项');
}
});
function downloadfile(fileName){
document.form3.action="<c:url value='/'/>/download/downLoadFile!download.do?file="+fileName;
document.form3.submit();
}
</script>
</head>
<body id="nodeBody">
<div class="middle_list" id="box" style="overflow: hidden;">
<!--中间部分右边开始-->
<form name=form3 id="form3" action="<c:url value='nodeManage!queryNodeInfoChild.do'/>" method="post">
<input type="hidden" name="nodeGroupId" value="${nodeGroupId }" />
<input type="hidden" name = "isComplete" id="isComplete" value="${isComplete}"/>
<input type="hidden" name="fromWhere" value="${fromWhere }"/>
<div class="box_1">
<label class="divTopText"><font class="selectText">i18n_nili.text.nodeState_n81i</font>
<select name="nodeStateVo">
<option value="">i18n_nili.message.selectDefault_n81i</option>
<option value="0" <c:if test="${nodeStateVo==0}">selected=selected</c:if> >i18n_nili.message.online_n81i</option>
<option value="1" <c:if test="${nodeStateVo==1}">selected=selected</c:if> >i18n_nili.message.downline_n81i</option>
</select></label>
<label class="divTopText"><font class="selectText">i18n_nili.text.nodeIp_n81i</font>
<input type="text" id="nodeIpVo"
onkeyup="lianxiangkeyup('nodeIp','NodeTable','String','nodeIpVo','suggest3',this.value);"
name="nodeIpVo" title="i18n_nili.message.nodeIp_n81i" value="${nodeIpVo}" size="20" />
<div id='suggest3' class="ac_results"></div></label>
<label class="divTopText"><font class="selectText">i18n_nili.text.nodeName_n81i</font>
<input type="text" id="nodeNameVo"
onkeyup="lianxiangkeyup('nodeName','NodeTable','String','nodeNameVo','suggest1',this.value);"
name="nodeNameVo" title="i18n_nili.message.nodeName_n81i" value="${nodeNameVo}" size="20" />
<div id='suggest1' class="ac_results"></div></label>
<img src="<c:url value='/images/button_chaxun.png'/>"
class="img_middle2" onclick="javascript:qry();" />
</div>
<div id="maindiv" style="clear: left;">
<table border="0" cellpadding="0" cellspacing="0" class="table" align="center" id="info">
<tr>
<td class="color_top" width="6%">
i18n_nili.text.index_n81i
</td>
<td class="color_top" width="12%">
i18n_nili.text.nodeIp_n81i
</td>
<td class="color_top" width="12%">
i18n_nili.text.nodeName_n81i
</td>
<td class="color_top" width="10%">
i18n_nili.text.nodeType_n81i
</td>
<td class="color_top" width="10%">
i18n_nili.text.nodeHight_n81i
</td>
<td class="color_top" width="12%">
i18n_nili.text.systemId_n81i
</td>
<td class="color_top" width="12%">
i18n_nili.text.nodeGroup_n81i
</td>
<td class="color_top" width="10%">
i18n_nili.text.nodeState_n81i
</td>
<td class="color_top" width="15%">
i18n_nili.text.createTime_n81i
</td>
</tr>
<!-- 1、远程连接引入页面 -->
<jsp:include page="/common/remoteConn.jsp" />
<c:set var="index" value="${1}" />
<c:choose>
<c:when test="${fn:length(nodeList) > 0}">
<c:forEach items="${nodeList}" var="node" varStatus="vs">
<c:set var="color" value="color_1" />
<c:set var="color_end" value="color_7" />
<c:if test="${vs.count%2!=0 }">
<c:set var="color" value="color_3" />
<c:set var="color_end" value="color_6" />
</c:if>
<tr>
<td class="${color }">
${index+(pageNo-1)*pageSize}
</td>
<td class="${color }">
<!-- 2、 调用JS此处远程连接调用JS在/common/remoteConn.jsp中 -->
<a href="javascript:void(0);"
onclick="remoteConn('${node.nodeSystemType }','${node.nodeIp}','${node.nodeType }', this)" >
${node.nodeIp}
</a>
</td>
<td class="${color }">
${node.nodeName}
</td>
<td class="${color }">
<c:if test="${node.nodeType==1}">
<c:if test="${node.networElementType==1}">
i18n_nili.message.specialDevice_n81i
</c:if>
<c:if test="${node.networElementType==2}">
i18n_nili.message.diskArray_n81i
</c:if>
<c:if test="${node.networElementType==3}">
i18n_nili.message.blockRouter_n81i
</c:if>
<c:if test="${node.networElementType==4}">
i18n_nili.message.netElements_n81i
</c:if>
</c:if>
<c:choose>
<c:when test="${node.nodeType==0 && not empty node.specialServerType}">i18n_nili.text.specialServer_n81i</c:when>
<c:when test="${node.nodeType==0}">i18n_nili.text.server_n81i</c:when>
</c:choose>
</td>
<td class="${color }">
${node.nodeUType}U
</td>
<td class="${color }">
${node.systemIdName}
</td>
<td class="${color }">
${node.groupIdName}
</td>
<td class="${color }">
<c:if test="${node.nodeState=='1'}">i18n_nili.message.downline_n81i</c:if>
<c:if test="${node.nodeState=='0'}">i18n_nili.message.online_n81i</c:if>
</td>
<td class="${color }">
<fmt:formatDate value="${node.nodeCreatetime}" pattern="yyyy-MM-dd HH:mm:ss" />
</td>
</tr>
<c:set var="index" value="${index + 1}" />
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td colspan="9" height="35" class="color_6" align="center">
i18n_nili.text.noRecord_n81i
</td>
</tr>
</c:otherwise>
</c:choose>
</table>
</div>
<c:if test="${!empty nodeList}">
<div id="divBoot">
<jsp:include page="/common/page.jsp" />
</div>
</c:if>
<!--中间部分右边结束-->
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,95 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/common/taglib.jsp"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>i18n_showErr.message.title_n81i</title>
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
type="text/css" />
<script type="text/javascript">
function goBack(){
document.form1.action="<%=path%>/nodeGroupManage/nodeManage.do?action=query";
document.form1.submit();
}
</script>
</head>
<body>
<div class="middle_list">
<!--中间部分右边开始-->
<form action="" name="form1" id="form1" method="post">
<input type="hidden" name="position" value="${position }" />
<input type="hidden" name="nodeGroupId" value="${nodeGroupId }" />
<input type="hidden" name="showStopNGroup" value="${showStopNGroup }" />
<input type="hidden" name="isValid" value="${isValid }" />
<table align="center" border="0" cellpadding="0"
cellspacing="0" class="table1">
<tr>
<td height="30" class="color_7" colspan="6">
<strong>i18n_showErr.text.title_n81i</strong>
</td>
</tr>
<tr>
<td class="color_1">
i18n_showErr.text.nodeIp_n81i
</td>
<td class="color_1">
i18n_showErr.text.nodeName_n81i
</td>
<td class="color_1">
i18n_showErr.text.nodeDesc_n81i
</td>
<td class="color_1">
i18n_showErr.text.nodeType_n81i
</td>
<td class="color_1">
i18n_showErr.text.nodeState_n81i
</td>
<td class="color_7">
i18n_showErr.text.showError_n81i
</td>
</tr>
<c:forEach items="${errorList}" var="info">
<tr>
<td class="color_3">
${info.nodeIp }
</td>
<td class="color_3">
${info.nodeName }
</td>
<td class="color_3">
${info.nodeDesc }
</td>
<td class="color_3">
${info.nodeType }
</td>
<td class="color_3">
${info.nodeState }
</td>
<td class="color_6">
${info.showError }
</td>
</tr>
</c:forEach>
<tr>
<td class="color_7" colspan="6">
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'" onclick="goBack()" value="i18n_showErr.button.back_n81i"/>
&nbsp;
</td>
</tr>
</table>
</form>
<!--中间部分右边结束-->
</div>
</body>
</html>

View File

@@ -0,0 +1,551 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/taglib.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>i18n_updatenode.message.title_n81i</title>
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
type="text/css" />
<link href="<c:url value='/css/suggest.css'/>" rel="stylesheet"
type="text/css" />
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/onmouse.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery.tools.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/j.suggest.js'/>"></script>
<script type="text/javascript">
var vstart;
function add(){
//去空格
$("#nodeIp").val($.trim($("#nodeIp").val()));
$("#nodeN").val($.trim($("#nodeN").val()));
///验证不能空与长度限制
if($id("nodeIp","ip","i18n_updatenode.text.nodeIp_n81i") && $("#nodeIp").checkByteLength(64,"i18n_updatenode.text.nodeIp_n81i")
&& $id("nodeMac","","i18n_updatenode.text.nodeMac_n81i") && $("#nodeMac").checkByteLength(100,"i18n_updatenode.text.nodeMac_n81i")
&& $id("nodeN","","i18n_updatenode.text.nNa_n81i") && $("#nodeN").checkByteLength(64,"i18n_updatenode.text.nNa_n81i")
/*&& $id("nodeUserName","","用户名") && $("#nodeUserName").checkByteLength(20,"用户名")
&& $id("nodePassword","","密码") && $("#nodePassword").checkByteLength(20,"密码")*/
&& $id("nodeBoxIspn","","i18n_updatenode.text.nodeBoxIspn_n81i") && $id("nodeUType","sz","i18n_updatenode.text.nodeUType_n81i")
&& $id("nodeBeginUType","xz","i18n_updatenode.text.nodeBeginUType_n81i")){
if($("#nodeType").val() == "1"){
$("#specialServerType").val("");
if($("#networElementType").val() == ""){
alert("i18n_updatenode.message.nodeBeginUType_n81i");
return false;
}
}else if($("#nodeType").val()==0&&(!$("#specialServerTypeTR").is(":hidden"))){
if($("#specialServerType").val() == ""){
alert("i18n_addNodeInfo.message.nodeSpecialServerType_n81i");
return false;
}
$("#version2").val("");
$("#version3").val("");
$("#networElementType").val("");
}else{
$("#version2").val("");
$("#version3").val("");
$("#specialServerType").val("");
$("#networElementType").val("");
}
document.Nodeform.action="<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=doUpdate";
document.Nodeform.submit();
}
}
function goBack(){
document.Nodeform.action="<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=query";
document.Nodeform.submit();
}
function nodeTypeChange(){
var nodeType = $("#nodeType").val();
if(nodeType=='1'){
$("#networElementTypeTR").show();
$(".snmpVersionType").show();
}else{
$("#networElementTypeTR").hide();
$(".snmpVersionType").hide();
}
var nodeTypeIndex=$("#nodeType option").index($('#nodeType option:selected'));
if(nodeTypeIndex==2){
$("#specialServerTypeTR").show();
}else{
$("#specialServerTypeTR").hide();
}
}
$(function(){
var nodeType = '${nodeTable.nodeType}';
if(nodeType=="1"){
$("#networElementTypeTR").show();
$(".snmpVersionType").show();
}else{
$("#networElementTypeTR").hide();
$(".snmpVersionType").hide();
}
var nodeTypeIndex=$("#nodeType option").index($('#nodeType option:selected'));
if(nodeTypeIndex==2){
$("#specialServerTypeTR").show();
}else{
$("#specialServerTypeTR").hide();
}
})
function resetInit(){
// 初始化机柜及位置
init();
}
// -----界面机柜及位置相关处理
$(function(){
// 页面加载完成后,初始化机柜及位置
init();
//联想查询修改成列表形式
jQuery.post("<c:url value='/nodePosition/boxSet!getAllBoxsIspn.do' />",{},function(data,textStatus){
var everyItems=data.split(";");
var allName=new Array();
for(var j=0;j<everyItems.length;j++){
if(j!=(everyItems.length-1)){
var getN=everyItems[j];
allName[j]=new Array('',getN,'');
}
}
jQuery("#nodeBoxIspn").suggest(allName,{hot_list:allName,attachObject:"#suggest1"});
});
});
function init(){
$.post("<c:url value='/nodeGroupManage/nodeManage!getNodeBox.do'/>",
{nodeIp:$("#nodeIp").val()},
function(data){
if(data!=null && data!=""){
$("#nodeBoxIspn").val(data.nodeBoxIspn);
$("#nodeUType").val(data.nodeUType);
if(data.nodeUType!=null){
var vstart =data.nodeBeginUType;//保留节点在机柜已有起始U位
//触发节点厚度U位的绑定事件即获取机柜的空闲位置可选起始U位选项
$("#nodeBeginUType").empty();
$("#nodeBeginUType").append("<option value=''>i18n_updatenode.message.selectDefault_n81i</option>");
var boxIspn = $("#nodeBoxIspn").val();
var nodeIp = $("#nodeIp").val();
var nodeUType = $("#nodeUType").val();
if(nodeUType!=""){
$.post("<c:url value='/nodeGroupManage/nodeManage!getBoxFreePosition.do'/>",
{"nodeBoxIspn":boxIspn,"nodeIp":nodeIp,"nodeUType":nodeUType},
function(data){
// 追加option元素
if(data!=null && data!=""){
$.each(data, function(i,val){
$("#nodeBeginUType").append("<option value='"+val+"'>" + val + "</option>");
});
}
// 自动匹配位置
if(vstart!=null && vstart!=""){
$("#nodeBeginUType >option[value='"+vstart+"']").attr("selected",true);
}
}, "json");
}
}
}
}, "json");
}
//-- 机柜 事件绑定 清空节点起始U位和节点厚度U位
function boxIspnFun(){
$("#nodeBeginUType").empty();
$("#nodeBeginUType").append("<option value=''>i18n_updatenode.message.selectDefault_n81i</option>");
$("#nodeUType").val("");
}
//-- 节点厚度U位 事件绑定 由节点厚度U位决定起始位置的可选项
function nodeUTypeFun(){
if(isNaN($("#nodeUType").val())){
alert("i18n_updatenode.message.nodeUType_n81i");
$("#nodeUType").val("");
$("#nodeBeginUType").empty();
$("#nodeBeginUType").append("<option value=''>i18n_updatenode.message.selectDefault_n81i</option>");
$("#nodeUType").focus();
return;
}
$("#nodeBeginUType").empty();
$("#nodeBeginUType").append("<option value=''>i18n_updatenode.message.selectDefault_n81i</option>");
var boxIspn = $("#nodeBoxIspn").val();
var nodeIp = $("#nodeIp").val();
var curVal = $("#nodeUType").val();
if(curVal!=""){
$.post("<c:url value='/nodeGroupManage/nodeManage!getBoxFreePosition.do'/>",
{"nodeBoxIspn":boxIspn,"nodeIp":nodeIp,"nodeUType":curVal},
function(data){
// 追加option元素
if(data!=null && data!=""){
var optionStr="";
$.each(data, function(i,val){
if(i==0){
optionStr = "<option selected='selected' value='"+val+"'>" + val + "</option>"
}else{
optionStr = "<option value='"+val+"'>" + val + "</option>"
}
$("#nodeBeginUType").append(optionStr);
});
}
// 自动匹配位置
if(vstart!=null && vstart!=""){
$("#nodeBeginUType >option[value='"+vstart+"']").attr("selected",true);
vstart = null;//该值改变后只能使用一次,所以一经调用就将其清空
}
}, "json");
}
}
//-- 节点IP 失去焦点事件绑定 自动匹配该节点是否已存在某机柜
function nodeIpFun(){
$.post("<c:url value='/nodeGroupManage/nodeManage!getNodeBox.do'/>",
{nodeIp:$("#nodeIp").val()},
function(data){
if(data!=null && data!=""){
$("#nodeBoxIspn").val(data.nodeBoxIspn);
$("#nodeUType").val(data.nodeUType);
if(data.nodeUType!=null){
vstart =data.nodeBeginUType;//保留节点在机柜已有起始U位
$("#nodeUType").trigger("onchange");
}
$("#nodeIp").next().html("i18n_updatenode.message.nodeIsExists_n81i");
}else{
vstart = null;
$("#nodeBoxIspn").val("");//Ispn的值改变会触发它自己绑定的事件即把nodeUType和nodeBeginUType清空
}
}, "json");
}
function checkNodeIp(){
var nodeTypeIndex=$("#nodeType option").index($('#nodeType option:selected'));
$.post("<c:url value='/nodeGroupManage/nodeManage!checkNodeIp.do'/>",
{nodeIp:$("#nodeIp").val(),nodeGroupId:$("#nodeGroupId").val()},
function(data){
if(data!=null && data!=""){
//同一节点组存在相同的IP
if(data.isExist !=null){
alert("i18n_updatenode.message.nodeRepeat_n81i");
$("#nodeIp").val($("#oldNodeIp").val());
}else{
//其它节点组存在相同IP
if(data.nodeIp !=null){
//设置Mac
$("#nodeMac").val(data.nodeMac);
//设置节点名称
$("#nodeN").val(data.nodeName);
//设置节点类型
$("#nodeType").val(data.nodeType);
if(data.nodeType=="1"){
$("#networElementTypeTR").show();
//设置SNMP版本
$(".snmpVersionType").show();
if(data.snmpVersion == "1"){
$("#version2").attr("checked","checked");
}else if(data.snmpVersion == "3"){
$("#version3").attr("checked","checked");
}
}else{
$("#networElementTypeTR").hide();
}
if(data.nodeType==0&&data.specialServerType!=null){
$("#nodeType option:last").attr("selected","selected");
$("#specialServerTypeTR").show();
$("#specialServerType").val(data.specialServerType);
}else{
$("#nodeType").val(data.nodeType);
$("#specialServerTypeTR").hide();
}
//设置网元类型
$("#networElementType").val(data.networElementType);
//设置用户名
$("#nodeUserName").val(data.nodeUserName);
//设置密码
$("#nodePassword").val(data.nodePassword);
//设置机柜编号
$("#nodeBoxIspn").val(data.nodeBoxIspn);
//设置机柜起始U位
vstart = data.nodeBeginUType
//设置节点厚度
$("#nodeUType").val(data.nodeUType);
//$("#nodeUType").trigger("onchange");
nodeUTypeChange();
//设置节点IP信息
$("#nodeIpInfo").val(data.nodeIpInfo);
//设置节点描述
$("#nodeDesc").val(data.nodeDesc);
$("#nodeIp").next().html("i18n_updatenode.message.nodeIsExists_n81i");
}
}
}else{
clearInfo();
}
},
"json"
);
}
function clearInfo(){
$("#nodeMac").val("");
$("#nodeN").val("");
$("#nodeType").val(0);
$("#networElementTypeTR").hide();
$("#networElementType").val("");
$("#nodeUserName").val("");
$("#nodePassword").val("");
$("#nodeBoxIspn").val("");
$("#version2").attr("checked","checked");
$("#nodeUType").val("");
$("#nodeBeginUType").empty();
$("#nodeBeginUType").append("<option value=''>i18n_updatenode.message.selectDefault_n81i</option>");
$("#nodeIpInfo").val("");
$("#nodeDesc").val("");
$("#nodeIp").next().html("");
}
</script>
</head>
<body>
<div class="middle_list">
<div class="box_2">
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="goBack()" value="i18n_updatenode.buttone.back_n81i"/>
</div>
<div style="height: 25px"></div>
<form action="" name="Nodeform" method="post" style="border:0px;">
<input type="hidden" name="showStopNGroup" value="${showStopNGroup }" />
<input type="hidden" name="isValid" value="${isValid }" />
<input type="hidden" name="position" value="${position }" />
<input type="hidden" name="nodeGroupId" value="${nodeGroupId }" id="nodeGroupId" />
<input type="hidden" name="pageNo" value="${pageNo }" />
<input type="hidden" name="pageSize" value="${pageSize }" />
<input type="hidden" name="nodeTable.nodeId" value="${nodeTable.nodeId }" />
<input type="hidden" name="nodeNameVo" id="nodeNameVo" value="${nodeNameVo }" />
<input type="hidden" name="nodeIpVo" id="nodeIpVo" value="${nodeIpVo }" />
<input type="hidden" name="nodeDescVo" id="nodeDescVo" value="${nodeDescVo }" />
<input type="hidden" name="nodeTable.seqId" value="${nodeTable.seqId }" />
<input type="hidden" name="oldNodeIp" value="${nodeTable.nodeIp }" id="oldNodeIp" />
<input type="hidden" name="type" value="${type }"/>
<table border="0" cellpadding="0" cellspacing="0" class="table1">
<tr>
<td colspan="4" class="color_7">
<strong>i18n_updatenode.text.title_n81i</strong>
</td>
</tr>
<tr>
<td class="color_1" width="20%" align="right">
i18n_updatenode.text.nodeIp_n81i
</td>
<td class="color_3" width="30%" align="left">
<input type="text" name="nodeTable.nodeIp" id="nodeIp"
value="${nodeTable.nodeIp }" style="width: 155px;" onchange="checkNodeIp()"/>
<font color="red">*</font>
</td>
<td class="color_1" width="20%" align="right">
i18n_updatenode.text.nodeMac_n81i
</td>
<td class="color_6" align="left">
<input type="text" name="nodeTable.nodeMac" id="nodeMac"
value="${nodeTable.nodeMac }" style="width: 155px;" />
<font color="red">*</font>
</td>
</tr>
<tr>
<td class="color_1" width="20%" align="right">
i18n_updatenode.text.nNa_n81i
</td>
<td class="color_6" align="left" >
<input type="text" name="nodeTable.nodeName" id="nodeN"
value="${nodeTable.nodeName }" style="width: 155px;" />
<font color="red">*</font>
</td>
<td class="color_1" align="right">
i18n_updatenode.text.nodeType_n81i
</td>
<td class="color_6" align="left">
<select name="nodeTable.nodeType" id="nodeType" onchange="nodeTypeChange()"
style="width: 155px;" >
<option value="0" <c:if test="${nodeTable.nodeType==0 && empty nodeTable.specialServerType}">selected</c:if>>
i18n_updatenode.message.nodeType0_n81i
</option>
<option value="1" <c:if test="${nodeTable.nodeType==1 }">selected</c:if>>
i18n_updatenode.message.nodeType1_n81i
</option>
<option value="0" <c:if test="${nodeTable.nodeType==0 && not empty nodeTable.specialServerType}">selected</c:if>>
i18n_updatenode.message.nodeType2_n81i
</option>
</select>
</td>
</tr>
<tr id="networElementTypeTR" style="display: none;">
<td class="color_1" align="right">
i18n_updatenode.text.networElementType_n81i
</td>
<td class="color_6" align="left" colspan="3">
<select name="nodeTable.networElementType" id="networElementType"
style="width: 161px;" >
<option value="">i18n_updatenode.message.selectDefault_n81i</option>
<c:forEach items="${optionList}" var="optionTable" >
<option value="${optionTable.typeCode}" <c:if test="${optionTable.typeCode == nodeTable.networElementType}">selected="selected"</c:if>>
${optionTable.typeValue}
</option>
</c:forEach>
</select>
<font color="red">*</font>
</td>
</tr>
<tr id="specialServerTypeTR" style="display: none;">
<td class="color_1" align="right">
i18n_addNodeInfo.text.specialServerType_n81i
</td>
<td class="color_6" align="left" colspan="3">
<select name="nodeTable.specialServerType" id="specialServerType"
style="width: 161px;" >
<option value="">i18n_addNodeInfo.message.selectDefault_n81i</option>
<c:forEach items="${optionList2}" var="optionTable" >
<option value="${optionTable.typeCode}" <c:if test="${optionTable.typeCode == nodeTable.specialServerType}">selected="selected"</c:if>>
${optionTable.typeValue}
</option>
</c:forEach>
</select>
<font color="red">*</font>
</td>
</tr>
<tr>
<td class="color_1" width="20%" align="right">
i18n_updatenode.text.nodeUsername_n81i
</td>
<td class="color_6" width="30%" align="left">
<input type="text" name="nodeTable.nodeUserName" value="${nodeTable.nodeUserName }" id="nodeUserName"
style="width: 155px;" />
</td>
<td class="color_1" width="20%" align="right">
i18n_updatenode.text.nodePassword_n81i
</td>
<td class="color_6" align="left">
<c:choose>
<c:when test="${jsbh}">
<input type="text" name="nodeTable.nodePassword" value="${nodeTable.nodePassword }" id="nodePassword"
style="width: 155px;" />
</c:when>
<c:otherwise>
<input type="password" name="nodeTable.nodePassword" value="${nodeTable.nodePassword }" id="nodePassword"
style="width: 155px;" />
</c:otherwise>
</c:choose>
</td>
</tr>
<tr>
<td class="color_1" align="right">
i18n_updatenode.text.nodeBoxIspn_n81i
</td>
<td class="color_6" align="left">
<input name="nodeTable.nodeBoxIspn" type="text" id="nodeBoxIspn" style="width: 156px;" title="请输入机柜编号" value="" onchange="boxIspnFun()"/>
<font color="red">*</font>
<div id='suggest1' class="ac_results"></div>
</td>
<td class="color_1 snmpVersionType" align="right" style="display: none;">
i18n_addNodeInfo.text.snmpVersion_n81i
</td>
<td class="color_6 snmpVersionType" align="left" style="display: none;">
<input type="radio" name="nodeTable.snmpVersion" value="1" id="version2" checked="checked"/>VERSION2C&nbsp;
<input type="radio" name="nodeTable.snmpVersion" value="3" id="version3" <c:if test='${nodeTable.snmpVersion==3}'>checked="checked"</c:if>/>VERSION3
</td>
</tr>
<tr>
<td class="color_1" align="right">
i18n_updatenode.text.nodeUType_n81i
</td>
<td class="color_6" align="left">
<input type="text" name="nodeTable.nodeUType" id="nodeUType"
value="${nodeTable.nodeUType }" style="width: 155px;" oninput="nodeUTypeFun()"/>
<font color="red">*</font>
</td>
<td class="color_1" align="right">
i18n_updatenode.text.nodeBeginUType_n81i
</td>
<td class="color_6" align="left">
<select name="nodeTable.nodeBeginUType" id="nodeBeginUType"
style="width: 161px;" >
<option value="">
i18n_updatenode.message.selectDefault_n81i
</option>
</select>
<font color="red">*</font>
</td>
</tr>
<tr>
<td class="color_1" align="right">
i18n_updatenode.text.nodeIpInfo_n81i
</td>
<td class="color_6" align="left">
<textarea rows="4" cols="40" name="nodeTable.nodeIpInfo"
id="nodeIpInfo" style="width: 155px; height: 50px;"
>${nodeTable.nodeIpInfo }</textarea>
</td>
<td class="color_1" align="right" >
i18n_updatenode.text.nodeDesc_n81i
</td>
<td class="color_3" align="left" >
<textarea rows="4" cols="40" name="nodeTable.nodeDesc"
id="nodeDesc" style="width: 155px; height: 50px;"
>${nodeTable.nodeDesc }</textarea>
</td>
</tr>
<tr>
<td class="color_1" align="right">
i18n_updatenode.text.nodeState_n81i
</td>
<td class="color_6" align="left" colspan="3">
<input type="radio" name="nodeTable.nodeState" id="nodeState"
value="0" <c:if test="${nodeTable.nodeState==0 }">checked</c:if> />
i18n_updatenode.message.online_n81i
<input type="radio" name="nodeTable.nodeState" id="nodeState"
value="1" <c:if test="${nodeTable.nodeState==1 }">checked</c:if> />
i18n_updatenode.message.downline_n81i
</td>
</tr>
<tr>
<td class="color_7" colspan="4" align="right">
&nbsp;
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="add()" value="i18n_updatenode.button.submit_n81i"/>
&nbsp;
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="javascript:document.forms['Nodeform'].reset();resetInit();"
value="i18n_updatenode.button.reset_n81i"/>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,88 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/taglib.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!-- -->
<script>
document.location.href= "<%=path%>/nodeGroupManage/nodeManage!executeAction.do?action=query&fromWhere=${fromWhere}&nodeGroupId=${nodeGroup.groupId }&isValid=${isValid}&type=${type}&showStopNGroup=${showStopNGroup}";
</script>
<!--
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>节点组信息</title>
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
type="text/css" />
<script language="javascript" type="text/javascript"
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
<script language="javascript" type="text/javascript"
src="<c:url value='/js/onmouse.js'/>"></script>
<script type="text/javascript">
function goBack(){
document.Nodeform.action="<%=path%>/sysManage/nodeGroupManage.do?action=query";
document.Nodeform.submit();
}
$(function(){
$("#win").load(function(){
$(this).height($(this).contents().height());
});
$(window).resize(function(){
$("#win").height($("#win").contents().height());
});
})
function iLoad(){
$("#win").height($("#win").contents().height());
}
</script>
</head>
<body onload="iLoad();">
<div class="middle_list">
<form action="" name="Nodeform" method="post"
style="margin: 0; padding: 0">
<input type="hidden" name="position" value="${position }" />
<input type="hidden" name="pageNo" value="${pageNo }" />
<input type="hidden" name="pageSize" value="${pageSize }" />
<input type="hidden" name="nameVo" id="nameVo" value="${nameVo }" />
<input type="hidden" name="descVo" id="descVo" value="${descVo }" />
</form>
<div style="clear: both" />
<table border="0" cellpadding="0" cellspacing="0" class="table">
<tr>
<td class="color_8">
<strong>${nodeGroup.groupName }下的节点管理</strong>
</td>
</tr>
<tr>
<td class="color_6" align="center">
<iframe name="win" scrolling="no" width="100%"
frameborder="0" marginwidth="0" id="win"
src="${pageContext.request.contextPath }/sysManage/nodeManage!executeAction.do?action=query&nodeGroupId=${nodeGroup.groupId }">
</iframe>
</td>
</tr>
<tr>
<td class="color_7" colspan="4" align="right">
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'" onclick="goBack()"
value="返回" />
&nbsp;
</td>
</tr>
</table>
</div>
</body>
</html>
-->

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,109 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@include file="/common/taglib.jsp"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>i18n_sierr.message.title_n81i</title>
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
type="text/css" />
<script type="text/javascript">
function goBack(){
document.form1.action="<%=path%>/nodeGroupManage/nodeGroupManage!execute.do?action=queryNodeGroupInfo";
document.form1.submit();
}
</script>
</head>
<body>
<div class="middle_list">
<!--中间部分右边开始-->
<form action="" name="form1" id="form1" method="post">
<input type="hidden" name="showStopNGroup" value="${showStopNGroup }" />
<c:if test="${fn:length(headerList) > 0}">
<table align="center" border="0" cellpadding="0" cellspacing="0"
class="table1">
<tr>
<td height="30" class="color_7" colspan="${fn:length(headerList)}">
<strong>i18n_sierr.text.title_n81i</strong>
</td>
</tr>
<tr>
<c:forEach items="${headerList}" var="head">
<td class="color_1">
${head}
</td>
</c:forEach>
</tr>
<c:forEach items="${rowList}" var="errorList">
<tr>
<c:forEach items="${errorList}" var="error" varStatus="status">
<c:choose>
<c:when test="${status.last}">
<td class="color_6">
${error}
</td>
</c:when>
<c:otherwise>
<td class="color_3">
${error}
</td>
</c:otherwise>
</c:choose>
</c:forEach>
</tr>
</c:forEach>
</table>
</c:if>
<c:if test="${fn:length(rowList1) > 0}">
<table align="center" border="0" cellpadding="0" cellspacing="0"
class="table1">
<tr>
<td height="30" class="color_7" colspan="${fn:length(headerList1)}">
<strong>${errorTheme }</strong>
</td>
</tr>
<tr>
<c:forEach items="${headerList1}" var="head">
<td class="color_1">
${head}
</td>
</c:forEach>
</tr>
<c:forEach items="${rowList1}" var="errorList">
<tr>
<c:forEach items="${errorList}" var="error" varStatus="status">
<c:choose>
<c:when test="${status.last}">
<td class="color_6">
${error}
</td>
</c:when>
<c:otherwise>
<td class="color_3">
${error}
</td>
</c:otherwise>
</c:choose>
</c:forEach>
</tr>
</c:forEach>
</table>
</c:if>
<div class="color_7" style="text-align:center;">
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'" onclick="goBack()"
value="i18n_sierr.button.back_n81i" /></div>
</form>
<!--中间部分右边结束-->
</div>
</body>
</html>

View File

@@ -0,0 +1,738 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="nis.nms.core.*"%>
<%@include file="/common/taglib.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
response.setHeader("Pragma","No-Cache");
response.setHeader("Cache-Control","No-Cache");
response.setDateHeader("Expires", 0);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>i18n_tsnang.message.title_n81i</title>
<link href="<c:url value='/css/nms.css'/>" type="text/css" rel="stylesheet" />
<link href="<c:url value='/js//dtree/css/dtree.css'/>"
rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
<script language="javascript" type="text/javascript" src="<c:url value='/js/jquery.tools.js'/>"></script>
<script language="javascript" type="text/javascript" src="<c:url value='/js/onmouse.js'/>"></script>
<script language="javascript" type="text/javascript" src="<c:url value="/js/dtree/js/dtree_checkbox_multi_choose.js"/>"></script>
<script type="text/javascript">
//点击各节点组触发的事件:dTree
function onClickNodeGroup(id){
//点击节点组标题时:若复选框当前选中,则取消选中,若当前未选中,则选中。可以通过点击标题多选
var isChecked= jQuery("input[type='checkbox'][name='mkid'][value='"+id+"']").attr("checked");
jQuery("input[type='checkbox'][name='mkid'][value='"+id+"']").attr("checked",!isChecked);
onClickCheckBox();//同时更新ip列表的显示
$("#sub").attr('disabled','');
}
$(function(){
//获取父页面中选中的监测类别,以及父级页面是哪个(监测设置detecSet和任务nmstask)
var resu = $(window.parent.document).find("#I3").contents();
var f = resu.find("#fw").val();
//var f = resu.document.getElementById("fw").value;
var type ="";
var issp ="";
if(f =="detecSetAdd" || f =="detecSetUpp"){//从监测设置过来才需要下面两个值
type = resu.find("#checkTypeId").val();
issp = resu.find("#isSnmpType").val();
/* type = resu.document.getElementById("checkTypeId").value;
issp = resu.document.getElementById("isSnmpType").value; */
}
var checkedNodeIds = ",${nodeId},";//所选节点id
$("#nodesTable tr[id!='headTr']").remove();//只留下标题
<c:forEach var="node" items="${nodeList}" varStatus="index">//循环选中节点组对应的所有节点
var nodeGroupName = getNameById('${node.groupId}');//根据节点组id得到节点组name
var nodeCount = $("#nodesTable tr").length;//获得当前节点记录数
var nodeId = ",${node.nodeId},";
var check = "";
var cla="";
var dis="";
var tit="${node.nodeId}";
var nodeType= "${node.nodeType}";
var index = '${index.count}';
if(checkedNodeIds.indexOf(nodeId)!=-1) {
check = 'checked';
}
if(type == 7 || type == 6 || issp == 'y'){//可选交换机
cla="";
dis="";
}else{
if(nodeType!=null && nodeType==0){//服务器/pc
cla="";
dis="";
}else if(nodeType!=null && nodeType==1){//交换机
if(!(f=='topoManage')){
cla="alldisabled";
dis="disabled";
tit="i18n_tsnang.message.netElement_n81i";
}
}
}
var sysType ;
if(${node.nodeSystemType==1}){
sysType = "Linux";
}else if(${node.nodeSystemType==2}){
sysType = "Windows";
}else{
sysType = "";
}
if(nodeCount%2==0) {
$("#nodesTable").append("<tr title='"+tit+"'><td class='color_1'>"+
"<input id='nodeIds' name='nodeCheckBoxName' class='"+cla+"' disabled='"+dis+"' type='checkbox' value='${node.nodeId}' "+check+" />"+index+"</td>"+
"<td class='color_1'>"+nodeGroupName+"</td>"+
"<td class='color_1' id='nodeIps'>"+
"<input type='hidden' id='ip_${node.nodeId}' value='${node.nodeIp}'/>${node.nodeIp}</td>"+
"<td class='color_1'>"+<c:if test="${node.nodeType=='0'}">'i18n_tsnang.text.server_n81i'</c:if>
<c:if test="${node.nodeType=='1'}">'i18n_tsnang.text.netElement_n81i'</c:if>+
"</td><td class='color_1'>"+sysType+"</td></tr>");
}
if(nodeCount%2!=0) {
$("#nodesTable").append("<tr title='"+tit+"'><td class='color_3'>"+
"<input id='nodeIds' name='nodeCheckBoxName' class='"+cla+"' disabled='"+dis+"' type='checkbox' value='${node.nodeId}' "+check+" />"+index+"</td>"+
"<td class='color_3'>"+nodeGroupName+"</td>"+
"<td class='color_3' id='nodeIps'>"+
"<input type='hidden' id='ip_${node.nodeId}' value='${node.nodeIp}'/>${node.nodeIp}</td>"+
"<td class='color_3'>"+<c:if test="${node.nodeType=='0'}">'i18n_tsnang.text.server_n81i'</c:if>
<c:if test="${node.nodeType=='1'}">'i18n_tsnang.text.netElement_n81i'</c:if>+
"</td><td class='color_3'>"+sysType+"</td></tr>");
}
</c:forEach>
//若真的无记录,再添加‘没有记录’行
var nodeCount = $("#nodesTable tr").length;
if(nodeCount==1) {
$("#nodesTable").append("<tr><td colspan='5' height='35' class='color_6' align='center'>i18n_tsnang.text.noRecord_n81i</td></tr>");
}
$("#noInDCTable").hide();
//遍历未包含在分管IP中的节点
<c:if test="${fn:length(noInNodeList) > 0}">
$("#noInDCTable").show();
<c:forEach var="node1" items="${noInNodeList}">//循环选中节点组对应的所有节点
var nodeGroupName1 = getNameById('${node1.groupId}');//根据节点组id得到节点组name
var nodeCount1 = $("#noInDCTable tr").length;//获得当前节点记录数
var nodeType="";
<c:if test="${node1.nodeType=='0'}">nodeType ="i18n_tsnang.text.server_n81i";</c:if>
<c:if test="${node1.nodeType=='1'}">nodeType ="i18n_tsnang.text.netElement_n81i";</c:if>
var trHtml="";
var sysType ;
if(${node.nodeSystemType==1}){
sysType = "Linux";
}else if(${node.nodeSystemType==2}){
sysType = "Windows";
}else{
sysType = "";
}
if(nodeCount1%2==0) {
trHtml +="<tr><td class='color_1'>${node1.nodeIp}</td>"+
"<td class='color_1'>${node1.nodeName}</td>"+
"<td class='color_1'>"+nodeGroupName1+"</td>"+
"<td class='color_1'>"+nodeType+"</td><td class='color_1'>"+sysType+"</td></tr>";
}
if(nodeCount1%2!=0) {
trHtml +="<tr><td class='color_3'>${node1.nodeIp}</td>"+
"<td class='color_3'>${node1.nodeName}</td>"+
"<td class='color_3'>"+nodeGroupName1+"</td>"+
"<td class='color_3'>"+nodeType+"</td><td class='color_3'>"+sysType+"</td></tr>";
}
$("#noInDCTable").append(trHtml);
</c:forEach>
</c:if>
if($("input[id='nodeIds'][name='nodeCheckBoxName'][type='checkbox']:checked").size() > 0){
jQuery("input[type='radio'][id='ng1']").trigger('click');
}
//如果是从新拓扑配置页面过来根据节点还是节点组隐藏功能
if(f=='topoManage'){
var chooseType=resu.find("#chooseType").val();
if(chooseType!=1){
$("#changeType").hide();
}
}
});
function setDisabled(){
$("#nodesTable").find("input[type='checkbox'][name='nodeCheckBoxName']").each(function(){
$(this).attr('disabled','disabled');
$(this).attr('checked',false);
});
$("#checkAll").attr('disabled','disabled');
$("#checkAll").attr('checked',false);
$("#checkInvert").attr('disabled','disabled');
$("#checkInvert").attr('checked',false);
$("#sub").attr('disabled','');
}
function setNoDisabled(){
$("#nodesTable").find("input[type='checkbox'][name='nodeCheckBoxName']").each(function(){
if($(this).attr('class')!='alldisabled'){
$(this).attr('disabled','');
}
});
$("#checkAll").attr('disabled','');
$("#checkInvert").attr('disabled','');
var nn = $("#nodesTable").find("input[type='checkbox'][id!='checkAll'][name='nodeCheckBoxName'][class!='alldisabled']").size();
$("#sub").attr('disabled','');
}
//全选节点组,取消所有节点组
function selectAllAndTriggerClick(checkBox,checkAllName) {
selectAllCheckBoxByName(checkBox,checkAllName);
onClickCheckBox();
}
//全选节点组,取消所有节点组
function selectAllCheckBoxByName(checkBox,checkAllName) {
var checks = document.getElementsByTagName("input");
for(i=0;i<checks.length;i++) {
if(checks[i].type=='checkbox'&&checks[i].disabled!=true&&checks[i].name==checkAllName) {
checks[i].checked = checkBox.checked;
}
}
$("#checkInvert").attr('checked',false);
}
//节点组反选
function invertSelect(checkBox,checkAllName) {
$("input[name='"+checkAllName+"']").not(":disabled").each(function(){
$(this).attr("checked",!$(this).attr("checked"));
})
$("#checkAll").attr('checked',$("input[name='"+checkAllName+"'][checked='true']").length == $("input[name='"+checkAllName+"']").length);
}
//过滤选择的节点组只返回最底层的节点组的id可能是多个返回后关闭当前窗口
function selectNodeGroupAndNode(){
//var resu = window.parent;
var resu = $(window.parent.document).find("#I3").contents();
var f = resu.find("#missionName");
//var f = resu.document.getElementById("missionName");//判断父页面有任务名称字段
if(f!=null){
//当前时从任务页面过来 需要添加验证
if($("#ng1").attr('checked')==true){
if(!isRigthCheck("nodeCheckBoxName", "remove")){
alert("i18n_tsnang.message.selectOne_n81i");
return;
}
}
}
var f = resu.find("#fw").val();
//var f = resu.document.getElementById("fw").value;//从监测页面
if($("#ng1").attr('checked')==true&&(f =="detecSetAdd" || f =="detecSetUpp")&&$("input[name=nodeCheckBoxName]").length>0&&$("input[name=nodeCheckBoxName]:checked").length==0){
var flag = true;
$("#nodesTable tr[title]").each(function(index,item){
var tit = $(this).attr("title");
if(isNaN(Number(tit))){// 所有TR的title属性若有一个为非数字则是有网元节点
alert("i18n_tsnang.message.selectOne_n81i");
flag=false;
return false;
}
});
if(!flag){
return;
}
}
if($("#ng0").attr('checked')==true){
//如果是按节点组的话,必须判断节点组中有无不符合要求的节点
if($("#nodesTable tr td input").length<=1){
alert("i18n_tsnang.message.selectNodeGroup_n81i");
return;
}
if($("#nodesTable tr[title]").length>0){
var flag=true;
$("#nodesTable tr[title]").each(function(){
var tit = $(this).attr("title");
if(isNaN(Number(tit))){// 所有TR的title属性若有一个为非数字则是有不符合的节点
alert(tit);
flag=false;
return false;
}
});
if(!flag){
return;
}
}
}
//所选节点组经过过滤的id和name
var nodeGroupIdsArray = getBottomNodeGroup();
var nodeGroupIds = nodeGroupIdsArray.join(',');
var nodeGroupNamesArray = getNameStrByArray(nodeGroupIdsArray);
var nodeGroupNames = nodeGroupNamesArray.join(',');
//所选节点id和name
var nodeIds = getSelectedNodeIds().join();
var nodeIps = getSelectedNodeIps().join();
//判断节点ids 和ips的长度
if(nodeIps.length > 500 || nodeIds.length > 500){
alert("i18n_tsnang.message.muchNode_n81i");
return;
}
//修改为模式窗口-2013-1-24-hyx--
//var resu = window.parent;
var resu = $(window.parent.document).find("#I3")[0].contentWindow;
if('${type}' == "descgroup"){//用于拓扑图配置页面选择源节点组与目标节点组的区分1目标节点组
resu.reciveNodeAndNodeGroup1(nodeGroupIds,nodeGroupNames,nodeIds,nodeIps);
}else if('${type}' == "topoManage"){//用于新拓扑图配置页面选择
resu.reciveTopoNodeAndNodeGroup(nodeGroupIds,nodeGroupNames,nodeIds,nodeIps);
}else {
resu.reciveNodeAndNodeGroup(nodeGroupIds,nodeGroupNames,nodeIds,nodeIps);
}
//window.close();
layclose();
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
}
//获得选中的节点id的数组
function getSelectedNodeIds() {
var nodeIdsArray = new Array();
$("input[type='checkbox'][id='nodeIds']:checked").each(function(k) {
nodeIdsArray[k] = this.value;
});
return nodeIdsArray;
}
//获得选中的节点ip的数组
function getSelectedNodeIps() {
var nodeIpsArray = new Array();
$("input[type='checkbox'][id='nodeIds']:checked").each(function(k) {
nodeIpsArray[k] = $("input[id='ip_"+this.value+"']").val();
});
return nodeIpsArray;
}
//过滤得到所选节点组中的最底层id
function getBottomNodeGroup() {
var allCheckedIds = $("input[type='checkbox'][name='mkid']:checked");
for(var i=0;i<allCheckedIds.length;i++) {
if(allCheckedIds[i].value!='null') {
var parId = getPid(allCheckedIds[i].value);//得到父id
while(parId!=0) {
var index = getIndexOf(allCheckedIds,parId);//父id在数组中的下标
if(index!=-1) {
allCheckedIds[index].value = 'null';
}
parId = getPid(parId);
}
}
}
var bottomNodeGroupIds = new Array;
var count = 0;
for(var k=0;k<allCheckedIds.length;k++) {
if(allCheckedIds[k].value!='null') {
bottomNodeGroupIds[count] = allCheckedIds[k].value;
count++;
}
}
return bottomNodeGroupIds;
}
//得到父id
function getPid(childId) {
var tempValue = 'pid'+childId;
var parId = document.getElementById(tempValue).value;
return parId;
}
//根据id数组获得对应的name数组
function getNameStrByArray(arr) {
var tempNameArray = new Array();
for(i=0;i<arr.length;i++) {
tempNameArray[i] = getNameById(arr[i]);
}
return tempNameArray;
}
//根据节点组id得到节点组name
function getNameById(id) {
if(id!=null&&id!='undefined') {
var tempValue = 'name'+id;
var name = document.getElementById(tempValue).value;
return name;
}
}
//判断value是否在arr数组中如果在返回在数组中的下标如果不在返回-1
function getIndexOf(arr,parId) {
var index = -1;
for(var j=0;j<arr.length;j++) {
if(parId==arr[j].value) {
index = j;
break;
}
}
return index;
}
//选中节点组,右边显示相应的节点
function onCheckedCheckBox(groupId){
}
//取消选中节点组,右边取消显示相应的节点
function onCancleCheckBox(groupId){
}
//点击(选中+取消)节点组复选框时执行的内容(右侧节点):groupId参数没有用到
function onClickCheckBox(groupId) {
//获取父页面中选中的监测类别,以及父级页面是哪个(监测设置detecSet和任务nmstask)
//var resu = window.parent;
var resu = $(window.parent.document).find("#I3").contents();
var f = resu.find("#fw").val();
//var f = resu.document.getElementById("fw").value;
var type ="";
var issp ="";
if(f =="detecSetAdd" || f =="detecSetUpp"){//从监测设置过来才需要下面两个值
type = resu.find("#checkTypeId").val();
issp = resu.find("#isSnmpType").val();
//type = resu.document.getElementById("checkTypeId").value;
//issp = resu.document.getElementById("isSnmpType").value;
}
var checkedNodeIds = ","+getSelectedNodeIds().join()+",";//得到之前选中的节点id当重新选择节点组时之前选择的节点仍然处于选中状态
var idsArray = getBottomNodeGroup();//得到选中的最底层的节点组id去掉非底层的节点组id:非底层指其子孙被选中)
var ids = idsArray.join(',');
if(ids!=null && ids!=""){
jQuery.post("<%=path%>/nodeGroupManage/nodeGroupManage!executeAction.do?action=getNodesByNodeGroupId",{"groupId":ids},
function(datas){
$("#nodesTable tr[id!='headTr']").remove();//只留下标题
$("#noInDCTable tr[id!='infoTit']").remove();//只留下标题
//循环删除表中的行(选中节点组对应的节点)
$.each(datas[0], function(k, da) {
var index = k+1;
var nodeGroupName = getNameById(da[2]);
var nodeCount = $("#nodesTable tr").length;
var nodeId = ","+da[0]+",";
var isChecked="";
var trHtml="";
var td1="";
var nodeType="";
var tit=da[0];//默认title为节点ID
/*
if(checkedNodeIds.indexOf(nodeId)!=-1) {
check = 'checked';
}
*/
if(da[3]==0){
nodeType ="i18n_tsnang.text.server_n81i";
}else if(da[3]==1){
nodeType ="i18n_tsnang.text.netElement_n81i";
}
//判断时候可以勾选交换机
if(f =="addNewTask"){//新增任务--只能选择服务器
if(da[3]!=null && da[3]==0){//服务器/pc
td1 ="<input id='nodeIds' name='nodeCheckBoxName' type='checkbox' value='"+da[0]+"' checked />"+index;
}else{//网元
td1 ="<input id='nodeIds' name='nodeCheckBoxName' class='alldisabled' type='checkbox' disabled='disabled' value='"+da[0]+"' />"+index;
tit="i18n_tsnang.message.onlyServer_n81i";
}
}else if(f =="detecSetAdd"){//监测设置新增--需判断监测类别-nmsclient,ping,snmp可以选择交换机
if(type == 9){
if(da[3]!=null && da[3]==0){//服务器/pc
td1 ="<input id='nodeIds' name='nodeCheckBoxName' class='alldisabled' type='checkbox' disabled='disabled' value='"+da[0]+"'/>"+index;
tit="这特么是服务器!";
}else if(da[3]!=null && da[3]==1 ){//交换机
td1 ="<input id='nodeIds' name='nodeCheckBoxName' type='checkbox' value='"+da[0]+"' checked />"+index;
}
}else{
if(type == 7 || type == 6||issp == 'y'){//可选交换机
td1 ="<input id='nodeIds' name='nodeCheckBoxName' type='checkbox' value='"+da[0]+"' checked />"+index;
}else{
if(da[3]!=null && da[3]==0){//服务器/pc
td1 ="<input id='nodeIds' name='nodeCheckBoxName' type='checkbox' value='"+da[0]+"' checked />"+index;
}else if(da[3]!=null && da[3]==1 ){//交换机
td1 ="<input id='nodeIds' name='nodeCheckBoxName' class='alldisabled' type='checkbox' disabled='disabled' value='"+da[0]+"'/>"+index;
tit="i18n_tsnang.message.netElement_n81i";
}
}
}
}else if(f =="detecSetUpp"){//监测设置修改
if(checkedNodeIds.indexOf(da[0])!=-1) {
isChecked = 'checked';
}
if(type == 7 || type == 6 || issp == 'y'){//可选交换机
td1 ="<input id='nodeIds' name='nodeCheckBoxName' type='checkbox' value='"+da[0]+"' "+isChecked+" />"+index;
}else{
if(da[3]!=null && da[3]==0){//服务器/pc
td1 ="<input id='nodeIds' name='nodeCheckBoxName' type='checkbox' value='"+da[0]+"' "+isChecked+" />"+index;
}else if(da[3]!=null && da[3]==1){//交换机
td1 ="<input id='nodeIds' name='nodeCheckBoxName' class='alldisabled' type='checkbox' disabled='disabled' value='"+da[0]+"'/>"+index;
tit="i18n_tsnang.message.netElement_n81i";
}
}
}else if(f =="addSimilarNmstask" ||f =="addConverseSimiTask" || f =="addConverTask"){//新增相似、逆向、相似的逆向(等于修改)
if(checkedNodeIds.indexOf(da[0])!=-1) {
isChecked = 'checked';
}
if(da[3]!=null && da[3]==0){//服务器/pc
td1 ="<input id='nodeIds' name='nodeCheckBoxName' type='checkbox' value='"+da[0]+"' "+isChecked+" />"+index;
}else{//交换机
td1 ="<input id='nodeIds' name='nodeCheckBoxName' class='alldisabled' type='checkbox' disabled='disabled' value='"+da[0]+"' />"+index;
tit="i18n_tsnang.message.onlyServer_n81i";
}
}
if(f=='topoManage'){
td1 ="<input id='nodeIds' name='nodeCheckBoxName' type='checkbox' value='"+da[0]+"' checked />"+index;
}
var sysType ;
if(da[4]==1){
sysType = "Linux";
}else if(da[4]==2){
sysType = "Windows";
}else{
sysType = "";
}
if(nodeCount%2==0) {
trHtml += "<tr title='"+tit+"'><td class='color_1'>"+td1+"</td>"+
"<td class='color_1'>"+nodeGroupName+"</td>"+
"<td class='color_1' id='nodeIps'>"+
"<input type='hidden' id='ip_"+da[0]+"' value='"+da[1]+"'/>"+da[1]+"</td>"+
"<td class='color_1'>"+nodeType+"</td>"+
"<td class='color_1'>"+sysType+"</td>"+
"</tr>";
}else{
trHtml += "<tr title='"+tit+"'><td class='color_3'>"+td1+"</td>"+
"<td class='color_3'>"+nodeGroupName+"</td>"+
"<td class='color_3' id='nodeIps'>"+
"<input type='hidden' id='ip_"+da[0]+"' value='"+da[1]+"'/>"+da[1]+"</td>"+
"<td class='color_3'>"+nodeType+"</td>"+
"<td class='color_3'>"+sysType+"</td>"+
"</tr>";
}
//tr放入table
$("#nodesTable").append(trHtml);
});
jQuery("input[type='radio'][id='ng0']").trigger('click');
//若真的无记录,再添加‘没有记录’行
var nodeCount = $("#nodesTable tr").length;
if(nodeCount==1) {
$("#nodesTable").append("<tr><td colspan='5' height='35' class='color_6' align='center'>i18n_tsnang.message.noRecord_n81i</td></tr>");
$("#checkAll").attr("checked","");
}
if(datas.length > 0){
if(f =="detecSetAdd" || f =="addNewTask"){
//$("#checkAll").attr("checked","checked");
}
}
if(datas[1]!=null ){
$("#noInDCTable").show();
//遍历未包含在DC分管IP中的节点
$.each(datas[1], function(k, da) {
var nodeGroupName = getNameById(da[2]);
var nodeCount = $("#noInDCTable tr").length;
var trHtml="";
var nodeType="";
if(da[3]==0){
nodeType ="i18n_tsnang.text.server_n81i";
}else if(da[3]==1){
nodeType ="i18n_tsnang.text.netElement_n81i";
}
var sysType ;
if(da[4]==1){
sysType = "Linux";
}else if(da[4]==2){
sysType = "Windows";
}else{
sysType = "";
}
if(nodeCount%2==0) {
trHtml += "<tr><td class='color_1'>"+da[0]+"</td>"+
"<td class='color_1'>"+da[1]+"</td>"+
"<td class='color_1'>"+nodeGroupName+"</td>"+
"<td class='color_1'>"+nodeType+"</td>"+
"<td class='color_1'>"+sysType+"</td>"+
"</tr>";
}else{
trHtml += "<tr><td class='color_3'>"+da[0]+"</td>"+
"<td class='color_3'>"+da[1]+"</td>"+
"<td class='color_3'>"+nodeGroupName+"</td>"+
"<td class='color_3'>"+nodeType+"</td>"+
"<td class='color_3'>"+sysType+"</td>"+
"</tr>";
}
//tr放入table
$("#noInDCTable").append(trHtml);
});
}
},
"json");
}else {//如果没有选中的节点组
$("#nodesTable tr[id!='headTr']").remove();//只留下标题
$("#noInDCTable tr[id!='infoTit']").remove();//只留下标题
$("#noInDCTable").hide();
$("#checkAll").attr("checked","");
$("#nodesTable").append("<tr><td colspan='5' height='35' class='color_6' align='center'>i18n_tsnang.message.noRecord_n81i</td></tr>");
}
}
$(function(){
if(navigator.userAgent.indexOf("MSIE")>0) {
$("body").css({"width":"98%"});
}else{
$("body").css({"width":"100%"});
}
});
function layclose() {
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
}
</script>
</head>
<body>
<div class="middle_list">
<form action="" name="listForm" id="listForm" method="post" >
<table border="0" cellpadding="0" cellspacing="0" class="table" >
<tr>
<td class="color_8" colspan="2">i18n_tsnang.text.selectNodeGroup_n81i</td>
</tr>
<tr>
<td class="color_1" align="left" width="30%" valign="top" height="500px;" style="padding-left: 12px;">
<div style="overflow: auto;height: auto;">
<script type="text/javascript">
var checkedNodeGroup = ','+'${groupId}'+',';//选中节点组的id
d = new dTree('d','','','ids');
var systemName = '${system.systemName}'
var checkAllName = 'mkid';
d.add('0','-1','<input type="checkbox" onclick="selectAllAndTriggerClick(this,\'mkid\')"/>'+systemName);
<%
List treeList = (List)request.getAttribute("treeList");
List list = MakeTree.getAllResourceList(treeList);
if(list != null && list.size() > 0){
Resource resource = new Resource();
for( int i = 0 ; i < list.size() ; i++ ){
resource = (Resource) list.get(i);
%>
var reCode = '<%=resource.getRsCode()%>';
var isChecked = " ";
var nodeGoupId = ','+reCode+',';
if(checkedNodeGroup.indexOf(nodeGoupId)>=0) {//说明当前节点组为选中的节点组
isChecked = 'checked';
}
d.add(reCode,'<%=resource.getParRsCode()%>','<%=resource.getRsname()%>',isChecked,'javascript:onClickNodeGroup('+reCode+');',reCode);
<%
}
}
%>
document.write(d);
</script>
<c:forEach items="${nodeGroupList}" var="group" varStatus="vs">
<input type="hidden" id="pid${group.groupId }" name="pid${group.groupId }" value="${group.parentGroupId}" />
<input type="hidden" id="name${group.groupId }" name="name${group.groupId }" value="${group.groupName}" />
<input type="hidden" id="leaf${group.groupId }" name="leaf${group.groupId }" value="${group.leafGroup}" />
</c:forEach>
</div>
</td>
<td class="color_1" align="center" valign="top" >
<div style="overflow: auto;height: auto;">
<span id="changeType">
<input type="radio" id="ng0" name="anWhat" class="ngstart" value="0" checked="checked" onclick="setDisabled();"/>i18n_tsnang.text.setDisabled_n81i
<input type="radio" id="ng1" name="anWhat" class="ngstart" value="1" onclick="setNoDisabled();"/>i18n_tsnang.text.setNoDisabled_n81i
</span>
<table id="nodesTable" border="0" cellpadding="0" cellspacing="0" class="tableTop" align="center" >
<tr id="headTr">
<td class="color_top" width="6%" >
<div style="display: inline-block;text-align: left" >
<input type="checkbox" id="checkAll" name="checkAll" onclick="selectAllCheckBoxByName(this,'nodeCheckBoxName')" title="i18n_tsnang.text.selectAll_n81i"/>
i18n_tsnang.text.index_n81i
<br/>
<input type="checkbox" id="checkInvert" name="checkInvert" onclick="invertSelect(this,'nodeCheckBoxName')" title="i18n_tsnang.text.reverse_n81i"/> i18n_tsnang.text.reverse_n81i
</div>
</td>
<td class="color_top" width="7%">
i18n_tsnang.text.nodeGroup_n81i
</td>
<td class="color_top" width="5%">
i18n_tsnang.text.nodeIp_n81i
</td>
<td class="color_top" width="5%">
i18n_tsnang.text.nodeType_n81i
</td>
<td class="color_top" width="5%">
i18n_tsnang.text.operateSystem_n81i
</td>
</tr>
<tr id="endTr">
<td colspan="5" height="35" class="color_6" align="center">
i18n_tsnang.text.noRecord_n81i
</td>
</tr>
</table>
<table id="noInDCTable" border="0" cellpadding="0" cellspacing="0" class="tableTop" align="center">
<tr id="infoTit">
<td colspan="4" align="left">i18n_tsnang.message.dcControlIp_n81i</td>
</tr>
<tr id="infoTit">
<td class="color_top" width="5%">
i18n_tsnang.message.nodeName_n81i
</td>
<td class="color_top" width="5%">
i18n_tsnang.text.nodeIp_n81i
</td>
<td class="color_top" width="7%">
i18n_tsnang.text.nodeGroup_n81i
</td>
<td class="color_top" width="5%">
i18n_tsnang.text.nodeType_n81i
</td>
<td class="color_top" width="5%">
i18n_tsnang.text.operateSystem_n81i
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td colspan="2" align="right" class="td_1" >&nbsp;
<span id="buttons_add">
<input type="button" class=btn3_mouseout id="sub"
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="selectNodeGroupAndNode()" value="i18n_tsnang.button.submit_n81i"/>
&nbsp;
<input type="button" class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
onclick="layclose()" value="i18n_tsnang.button.close_n81i"/>
</span>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,190 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="nis.nms.core.*"%>
<%@include file="/common/taglib.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>i18n_tsng.message.title_n81i</title>
<link href="<c:url value='/css/nms.css'/>" type="text/css" rel="stylesheet" />
<link href="<c:url value='/js//dtree/css/dtree.css'/>"
rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
<script language="javascript" type="text/javascript" src="<c:url value='/js/jquery.tools.js'/>"></script>
<script language="javascript" type="text/javascript" src="<c:url value='/js/onmouse.js'/>"></script>
<script language="javascript" type="text/javascript" src="<c:url value="/js/dtree/js/dtree_checkbox_multi_choose.js"/>"></script>
<script type="text/javascript">
//点击各节点触发的事件:dTree
function onClickNodeGroup(id){
//点击节点组标题时:若复选框当前选中,则取消选中,若当前未选中,则选中。可以通过点击标题多选
var isChecked= jQuery("input[type='checkbox'][name='mkid'][value='"+id+"']").attr("checked");
jQuery("input[type='checkbox'][name='mkid'][value='"+id+"']").attr("checked",!isChecked);
}
//全选节点组,取消所有节点组
function selectAllCheckBox(checkBox) {
var checks = document.getElementsByTagName("input");
for(i=0;i<checks.length;i++) {
if(checks[i].type=='checkbox'&&checks[i].disabled!=true) {
checks[i].checked = checkBox.checked;
}
}
}
//过滤选择的节点组只返回最底层的节点组的id可能是多个返回后关闭当前窗口
function selectNodeGroup(){
if(!isRigthCheck("mkid", "remove")){
alert("i18n_tsng.message.selectOne_n81i");
return;
}else {
var idsArray = getBottomNodeGroup();
var ids = idsArray.join(',')
var namesArray = getNameStrByArray(idsArray);
var names = namesArray.join(',');
window.opener.reciveNodeGroup(ids,names);
window.close();
}
}
//过滤得到所选节点组中的最底层id
function getBottomNodeGroup() {
var allCheckedIds = $("input[type='checkbox'][name='mkid']:checked");
for(var i=0;i<allCheckedIds.length;i++) {
if(allCheckedIds[i].value!='null') {
var parId = getPid(allCheckedIds[i].value);//得到父id
while(parId!=0) {
var index = getIndexOf(allCheckedIds,parId);//父id在数组中的下标
if(index!=-1) {
allCheckedIds[index].value = 'null';
}
parId = getPid(parId);
}
}
}
var bottomNodeGroupIds = new Array;
var count = 0;
for(var k=0;k<allCheckedIds.length;k++) {
if(allCheckedIds[k].value!='null') {
bottomNodeGroupIds[count] = allCheckedIds[k].value;
count++;
}
}
return bottomNodeGroupIds;
}
//得到父id
function getPid(childId) {
var tempValue = 'pid'+childId;
var parId = document.getElementById(tempValue).value;
return parId;
}
//根据id数组获得对应的name数组
function getNameStrByArray(arr) {
var tempNameArray = new Array();
for(i=0;i<arr.length;i++) {
tempNameArray[i] = getNameById(arr[i]);
}
return tempNameArray;
}
//根据id得到name
function getNameById(id) {
var tempValue = 'name'+id;
var name = document.getElementById(tempValue).value;
return name;
}
//判断value是否在arr数组中如果在返回在数组中的下标如果不在返回-1
function getIndexOf(arr,parId) {
var index = -1;
for(var j=0;j<arr.length;j++) {
if(parId==arr[j].value) {
index = j;
break;
}
}
return index;
}
function resize(){
//alert("document.listForm.dtree:"+document.all.dtree.style.height+";document.all.dtree.style.height:"+document.all.dtree.style.height);
{document.all.dtree.style.height = document.all.dtree.style.height;}
}
</script>
</head>
<body >
<form action="" name="listForm" id="listForm" method="post" >
<div align="right">
<span id="buttons_add">
<input type="button" value="i18n_tsng.button.select_n81i"
onclick="selectNodeGroup()"
class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"/>
<input type="button" value="i18n_tsng.button.close_n81i"
onclick="window.close()"
class=btn3_mouseout
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"/>
</span>
</div>
<div class="middle_list1" id="maindiv" name="maindiv" style="overflow-y:auto;overflow-x:auto;height:560px;width:360px;">
i18n_tsng.button.nodeGroup_n81i
<br/>
<br/>
<div id="dtree" name="dtree">
<script type="text/javascript">
var checkedNodeGroup = ','+'${nodeGroupIds}'+',';//选中节点组的id
d = new dTree('d','','');
var systemName = '${system.systemName}'
d.add('0','-1','<input type="checkbox" onclick="selectAllCheckBox(this)"/>'+systemName);
<%
List treeList = (List)request.getAttribute("treeList");
List list = MakeTree.getAllResourceList(treeList);
if(list != null && list.size() > 0){
Resource resource = new Resource();
for( int i = 0 ; i < list.size() ; i++ ){
resource = (Resource) list.get(i);
%>
var reCode = '<%=resource.getRsCode()%>';//当前节点id
var isChecked = " ";
var nodeGoupId = ','+reCode+',';
if(checkedNodeGroup.indexOf(nodeGoupId)>=0) {//说明当前节点组为选中的节点组
isChecked = 'checked';
}
d.add(reCode,'<%=resource.getParRsCode()%>','<%=resource.getRsname()%>',isChecked,'javascript:onClickNodeGroup('+reCode+');');
<%
}
}
%>
document.write(d);
</script>
<c:forEach items="${nodeGroupList}" var="group" varStatus="vs">
<input type="hidden" id="pid${group.groupId }" name="pid${group.groupId }" value="${group.parentGroupId}" />
<input type="hidden" id="name${group.groupId }" name="name${group.groupId }" value="${group.groupName}" />
</c:forEach>
</div>
</div>
<script type="text/javascript">
resize();
</script>
</form>
</body>
</html>