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,45 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
* {margin:0px;
padding:0px;}
html, body {;
font-size:12px;
}
</style>
<script language=javascript type="text/javascript">
function F(str)
{
window.returnValue = str;
window.close();
}
</script>
</head>
<body bgcolor="#EBECEB">
<div align="center" style="margin-top: 5%; margin-left:2%">
<div>
</br>
同时启用所有子节点组吗?
</br>
</br>
</div>
<input id="Button1" type="button" value="是" style="width:65px;height:20px" onclick="F(Button1.value);"/>
<input id="Button2" type="button" value="否" style="width:65px;height:20px" onclick="F(Button2.value);"/>
</div>
</body>

178
WebRoot/common/page.jsp Normal file
View File

@@ -0,0 +1,178 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="nis.nms.util.Page"%>
<%@ taglib uri="/jstl/c" prefix="c"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
String message = request.getParameter("pageMessage");
Page page2=(Page)request.getAttribute("page");
%>
<!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>
<style type="text/css">
</style>
<script>
function loadButton(){
//获取上一页的按钮
var prev = $("#prev").html();
var currenttotalPage = $("#currenttotalPage").html();
var currentPage = $("#currentPage").html();
if(!prev){//没有上一页按钮
if(currentPage!="1"){ //如果只有1页的时候滚动不会加载出上一页
$("#prev").html("<img src=\"<c:url value="/images/button_up.png" />\" class=\"img_middle\" onclick=\"pageList(\'prev\')\"/>");
}
}
//删除下一页的按钮
var next = $("#next").html();
if((Number(currentPage) == Number(currenttotalPage))&&(next!=null&&next!="")){
$("#next").html("");
}
$("select[name=textfield]").val(currentPage); //滚动时修改 当前页数的select
}
function pageUrl(formaction){
pageList(${pageNo},formaction);
}
function pageList(pageNo,formaction){
if(pageNo == 'prev'){
pageNo = Number($("#currentPage").html()) -1;
if(pageNo < 0){
pageNo = pageNo + 1;
}
}
if(pageNo == 'next'){
var currenttotalPage = $("#currenttotalPage").html();
pageNo = Number($("#currentPage").html()) +1;
if(pageNo > currenttotalPage){
pageNo = pageNo -1;
}
}
var newPageSize = document.getElementById("newPageSize").value;
//alert(newPageSize);
var url = '';
if(formaction != null && formaction != ''){
url = formaction;
}else{
url = document.forms[0].action;
}
var frm = document.forms[0];
// alert(url);
if(url.indexOf("?")!=-1)
document.forms[0].action = url +'&pageNo='+pageNo+'&pageSize='+newPageSize;
else
document.forms[0].action = url +'?pageNo='+pageNo+'&pageSize='+newPageSize;
// alert(document.forms[0].action);
//遮盖层
//coverDiv();
document.forms[0].submit();
}
function go(){
var pageNo = document.getElementById("pagesize").value;
var newPageSize = document.getElementById("newPageSize").value;
//if(pageNo.replace(/[\d+]/ig,"").length>0){
// alert('请输入数字');
// return ;
//}
//if(pageNo<=0){
// alert("输入的页码太小,请重新输入的页数");
// return ;
//}
//if(pageNo>${page.totalPage}){
// alert("输入的页码太大,请重新输入的页数");
// return ;
//}
var frm = document.forms[0];
var url = document.forms[0].action;
if(url.indexOf("?")!=-1)
document.forms[0].action = url +'&pageNo='+pageNo+'&pageSize='+newPageSize;
else
document.forms[0].action = url +'?pageNo='+pageNo+'&pageSize='+newPageSize;
//document.forms[0].action = document.forms[0].action+'&pageNo='+pagesize+'&pageSize='+newPageSize;
//遮盖层
//coverDiv();
document.forms[0].submit();
}
function limitNum(obj) {
if(obj.value.replace(/[\d+]/ig,"").length>0) {
alert('i18n_page.message.inputNum_n81i')
obj.value="";
return false;
}
}
//function boo(tanleName,countHql){
// CountAction.getLogCount(tanleName,countHql,${pageNo},{callback:function(data){
// document.getElementById("log").innerHTML=data;
// }}
// );
// }
</script>
</head>
<body>
<div class="box_3">
<c:if test="${page.totalCount != 0}">i18n_page.text.total_n81i<span class="">${page.totalCount}</span> i18n_page.text.record_n81i</c:if>
i18n_page.text.current_n81i
<span class=""><span id="currentPage">${pageNo}</span><c:if
test="${page.totalCount != 0}">/<span id="currenttotalPage">${page.totalPage}</span></c:if></span>i18n_page.text.page_n81i
</div>
<div class="box_2">
i18n_page.text.change_n81i <select class="option2" onchange="go();" id="pagesize"
name="textfield" >
<%
for(int n=1;n<=page2.getTotalPage();n++)
{
%>
<option value="<%=n %>" ><%=n %></option>
<%} %>
</select>
<script >
var sel=document.getElementById("pagesize");
var op=sel.options;
for(var i=0;i<op.length;i++)
{
if(op[i].value==${pageNo})
{
op.selectedIndex=i;
}
}
</script>
i18n_page.text.page_n81i i18n_page.text.pageSize_n81i <select name="pageSize"
onchange="javascript:pageList(1)" id="newPageSize" class="option2_1">
<option value="10" ${pageSize=="10"?"selected":""}>
10
</option>
<option value="20" ${pageSize=="20"?"selected":""}>
20
</option>
<option value="30" ${pageSize=="30"?"selected":""}>
30
</option>
<option value="50" ${pageSize=="50"?"selected":""}>
50
</option>
<option value="100" ${pageSize=="100"?"selected":""}>
100
</option>
<option value="200" ${pageSize=="200"?"selected":""}>
200
</option>
</select>
<span id="prev"><c:if test="${pageNo > 1}"><img src="<c:url value="/images/button_up.png" />" class="img_middle" onclick="pageList('prev')"/></c:if></span>
&nbsp;
<span id="next"><c:if test="${pageNo+1 <= page.totalPage}"><img src="<c:url value="/images/button_down.png" />" class="img_middle" onclick="pageList('next')"/></c:if></span>
</div>
</body>
</html>

114
WebRoot/common/pageSub.jsp Normal file
View File

@@ -0,0 +1,114 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/common/taglib.jsp"%>
<!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/menu.js'/>"></script>
<script language="javascript" type="text/javascript">
function pageUrl(formaction){
pageList(${pageNoSub},formaction);
}
function pageList(pageNoSub,formaction){
//var pageSize = $("#pageSize").val();//总是提示缺少对象
//var pageSize = document.getElementById("pageSize").value;
var url = '';
if(formaction != null && formaction != ''){
url = formaction;
}else{
url = document.forms[0].action;
}
var frm = document.forms[0];
if(url.split("?").length>1){
document.forms[0].action = url +'&pageNoSub='+pageNoSub;
}else{
document.forms[0].action = url +'?pageNoSub='+pageNoSub;
}
//遮盖层
//coverDiv();
document.forms[0].submit();
}
function go(){
var pageNoSub = document.getElementById("pageNoSub").value;
var pageSizeSub = document.getElementById("pageSizeSub").value;
// alert(pageNo);
// alert(pageSize);
if(pageNoSub.replace(/[\d+]/ig,"").length>0){
alert('i18n_pageSub.text.inputNum_n81i');
return ;
}
if(pageNoSub<=0){
alert("i18n_pageSub.text.tooSmall_n81i");
return ;
}
//if(pageNo>${page.totalPage}){
//alert("输入的页码太大,请重新输入的页数");
//return ;
//}
var frm = document.forms[0];
document.forms[0].action = document.forms[0].action+'?pageNoSub='+pageNoSub+'&pageSizeSub='+pageSizeSub;
//遮盖层
coverDiv();
document.forms[0].submit();
}
function limitNum(obj) {
if(obj.value.replace(/[\d+]/ig,"").length>0) {
alert('i18n_pageSub.text.inputNum_n81i')
obj.value="";
return false;
}
}
function boo(tanleName,countHql){
CountAction.getLogCount(tanleName,countHql,${pageNoSub},{callback:function(data){
document.getElementById("log").innerHTML=data;
}}
);
}
</script>
</head>
<body>
<div class="box_3"><c:if test="${pageSub.totalCount != 0}">i18n_page.text.total_n81i<span class="page_style2">${pageSub.totalCount}</span> i18n_page.text.record_n81i</c:if>
<c:if test="${pageSub.totalCount == 0}">i18n_page.text.total_n81i<span class="page_style2">0</span> i18n_page.text.record_n81i</c:if>
i18n_page.text.current_n81i
<span class="page_style2">
<c:if test="${pageSub.totalCount != 0}"><span id="currentPage"> ${pageNoSub} </span>/${pageSub.totalPage} </c:if>
<c:if test="${pageSub.totalCount == 0}"><span id="currentPage"> 0 </span>/0 </c:if> </span>页</div>
<div class="box_2">i18n_page.text.change_n81i
<select class="option2" onchange="javascript:pageList($(this).val())" id="pageNoSub" name="pageNoSub">
<c:forEach var="page0" begin="1" end="${pageSub.totalPage }" step="1">
<option value="${page0 }" ${pageNoSub==page0?"selected":""} >${page0 }</option>
</c:forEach>
</select>i18n_page.text.page_n81i
i18n_page.text.pageSize_n81i
<select name="pageSizeSub" onchange="javascript:pageList(1)" id="pageSizeSub" class="option2" style="width: 50px;">
<option value="10" ${pageSizeSub=="10"?"selected":""}>
10
</option>
<option value="20" ${pageSizeSub=="20"?"selected":""}>
20
</option>
<option value="30" ${pageSizeSub=="30"?"selected":""}>
30
</option>
<option value="50" ${pageSizeSub=="50"?"selected":""}>
50
</option>
<option value="100" ${pageSizeSub=="100"?"selected":""}>
100
</option>
<option value="200" ${pageSizeSub=="200"?"selected":""}>
200
</option>
</select>
<c:if test="${pageNoSub > 1}">
<img src="<c:url value="/images/button_up.png" />" class="img_middle" onclick="pageList(${pageNoSub-1})"/>
</c:if>
&nbsp;
<c:if test="${pageNoSub < pageSub.totalPage}">
<img src="<c:url value="/images/button_down.png" />" class="img_middle" onclick="pageList(${pageNoSub+1})"/>
</c:if>
</div>
</body>

View File

@@ -0,0 +1,178 @@
<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="/jstl/c"%>
<%--
/**
* 远程连接
* 1、流程先查看节点类型若是交换机直接Telnet连接若是服务器先查看是否有指定操作系统类型
* A、有直接连接Linux下用putty.exe(检查文件是否存在,不存在提供下载),Windows下用mstsc远程桌面
* B、没有提示选择操作系统类型
* 2、操作步骤
* A、在调用远程连接之前要在原有的SQL基础上添加对note_table的node_system_type和node_type的查询
* B、在调用远程连接的页面include引入/common/remoteConn.jsp页面
* C、在相应IP连接处调用JS--romoteConn(nodeSysType,ip)
*/
--%>
<!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_remoteConn.text.title_n81i</title>
<!-- 弹出对话框 -->
<script src="<c:url value='/js/ui/jquery-ui.min.js'/>"></script>
<link rel="stylesheet" href="<c:url value='/css/themes/base/jquery.ui.all.css'/>" />
<script language="javascript" type="text/javascript">
//---------2012-7-2 用于远程连接时,若没有指定操作系统弹出选择框
$(function() {
$( "#dialog:ui-dialog" ).dialog( "destroy" );
var tips = $( ".validateTips" );
function updateTips( t ) {
tips
.text( t )
.addClass( "ui-state-highlight" );
setTimeout(function() {
tips.removeClass( "ui-state-highlight", 1500 );
}, 500 );
}
$( "#dialog" ).dialog({
autoOpen: false,
//resizable: true,
//height: 160,
width: 260,
modal: true,
buttons: {
"i18n_remoteConn.text.sure_n81i": function() {
var valStr = document.getElementById("osType").value;
if($("#nodeSysType>option:selected").size()>0 && valStr!='i18n_remoteConn.text.select_n81i'){
runRemoteConn(valStr,$("#ip").val());
$(this).dialog( "close" );
}else {
updateTips("i18n_remoteConn.text.unknow_n81i");
}
},
"i18n_remoteConn.text.cancel_n81i": function() {
$( this ).dialog( "close" );
}
}
});
$( "#downloadDialog" ).dialog({
autoOpen: false,
minWidth: 260,
modal: true
});
});
var isDone = true;
var timeout;
var assistEl;
var triggerEl;
function remoteConn(nodeSysType,ip,nodeType, btn){//nodeSysType 操作系统类型 ip 远程连接的节点IP nodeType 节点类型
assistEl = btn;
triggerEl = document.getElementById('trigger_protocol_ifrm');
if(nodeType != null && nodeType != "" && nodeType != "0"){// 节点类型不是服务器即是交换机则默认使用Telnet连接
runRemoteConn('3', ip)
} else if (nodeSysType == null || nodeSysType == "") {// 节点类型是服务器,则判断系统类型
$("#ip").val(ip);
$("#dialog").dialog("open");
} else {
runRemoteConn(nodeSysType, ip);
}
}
function download(name){
$("#downloadDialog").dialog("close");
window.open("<c:url value='/download/downLoadFile!download.do' />?file=" + name,"","height=0,width=0,top=10000,left=10000");
}
function runRemoteConn(sysType, ip) { //sysType 操作系统类型 ip 远程连接的节点IP
var protocolUrl = "nmsweb.yuanchenglianjie://establishing?";
if (sysType == "1") {
protocolUrl += "method=putty&ip=" + ip
} else if (sysType == "2") {
protocolUrl += "method=mstsc&ip=" + ip
} else {
protocolUrl += "method=telnet&ip=" + ip
}
launchApplication(protocolUrl,
function(){<%--success --%>},
function() {<%--fail --%>
$("#downloadDialog").empty();
$("#downloadDialog").append("i18n_remoteConn.text.downMsg_n81i <a href='javascript:download(\"nmsweb.msi\");'>i18n_remoteConn.text.down_n81i</a>");
$("#downloadDialog").dialog("open");
return;
}
);
}
function done(){
isDone = true;
assistEl.onblur = null;
triggerEl.onerror = null;
clearTimeout(timeout);
}
function launchApplication(url, success, fail){
if (!isDone) return;//如果上次调起客户端没有完成,则直接返回,防止重复调用。
isDone = false;
assistEl.focus();
assistEl.onblur = function () {
if (document.activeElement && document.activeElement !== assistEl) {
assistEl.focus(); //防止用户因为随机操作,而误认为是调起了客户端。
} else {
done();
success();//如果焦点元素,快速失去了焦点,说明客户端已经被调起。
}
};
timeout = setTimeout(function () {
done();
fail();//如果超过一定时间仍然没有变化,说明没有注册协议
},1200);
triggerEl.onerror = function () {
done();
fail();//进入错误事件回调函数说明没有注册协议
};
try {
triggerEl.src = url;
} catch(e) {
done();
fail(); //捕获到异常说明没有注册协议
}
}
</script>
</head>
<body>
<iframe id="trigger_protocol_ifrm" style="display:none">
</iframe>
<div id="dialog" style="display: none" title="i18n_remoteConn.message.title_n81i">
<fieldset style="padding:0; border:0; margin-top:0px;margin-buttom:10px;">
<p class="validateTips"></p>
<label>i18n_remoteConn.text.sysType_n81i</label>
<select name="nodeSysType" id="nodeSysType" class="text ui-widget-content ui-corner-all" onchange="document.getElementById('osType').value=this.value;">
<option>i18n_remoteConn.text.select_n81i</option>
<option value="1">Linux</option>
<option value="2">Windows</option>
<option value="3">Other</option>
</select>
<input type="hidden" name="ip" id="ip" value=""/>
<input type="hidden" name="osType" id="osType" value=""/>
</fieldset>
</div>
<div id="downloadDialog" style="display: none;font-size:14px;margin-top:10px;" title="i18n_remoteConn.text.download_n81i">
</div>
</body>
</html>

View File

@@ -0,0 +1,40 @@
<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="/jstl/c"%>
<!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>
<!-- 弹出对话框 -->
<script src="<c:url value='/js/ui/jquery-ui.min.js'/>"></script>
<link rel="stylesheet" href="<c:url value='/css/themes/base/jquery.ui.all.css'/>" />
</head>
<script language="javascript" type="text/javascript">
$(function() {
$( "#downloadDialog" ).dialog({
autoOpen: false,
minWidth: 240,
modal: true
});
});
function download(name){
$("#downloadDialog").dialog('close');
window.open("<c:url value='/download/downLoadFile!download.do' />?file=" + name,"","height=0,width=0,top=10000,left=10000");
}
function svgDownloadConn(){
var fso = new ActiveXObject("Scripting.FileSystemObject");
$("#downloadDialog").empty();
$("#downloadDialog").append("i18n_remoteConn.text.svgMsg_n81i</br></br> <a href='javascript:download(\"SVGView.EXE\");' ><strong>i18n_remoteConn.text.down_n81i</strong></a>");
$("#downloadDialog").dialog("open");
return;
}
</script>
<body>
<div id="downloadDialog" style="display: none;font-size:14px;margin-top:10px;" title="i18n_remoteConn.text.download_n81i" align="center">
</div>
</body>
</html>

View File

@@ -0,0 +1,4 @@
<%@ page language="java" contentType="text/html; charset=utf-8" autoFlush="true" buffer="0kb" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="/jstl/c"%>
<%@ taglib prefix="fn" uri="/jstl/fn"%>
<%@ taglib prefix="fmt" uri="/jstl/fmt"%>

View File

@@ -0,0 +1,12 @@
<%@ page language="java" contentType="text/html; charset=utf-8" autoFlush="true" buffer="0kb" pageEncoding="utf-8"%>
<%@include file="/common/taglib.jsp"%>
<%
response.addHeader("Cache-Control", "no-cache");
response.addHeader("Expires", "Thu, 01 Jan 1970 00:00:01 GMT");
%>
<!-- 页面需要传递的隐藏参数 -->
<input type="hidden" name="pageNo" value="${pageNo}" /><!-- 列表当前页数 -->
<input type="hidden" name="pageSize" value="${pageSize}" /><!-- 列表当前页数 -->