From b3df3047b51c7659a4130f281d3488d32a1e2d89 Mon Sep 17 00:00:00 2001 From: fangshunjian Date: Sat, 12 Jan 2019 11:07:45 +0600 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=B7=BB=E5=8A=A0=20ntc=20=E6=B5=81?= =?UTF-8?q?=E9=87=8F=E7=BB=9F=E8=AE=A1=202=E3=80=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=9B=91=E6=B5=8B=E8=AE=BE=E7=BD=AE=E4=BF=AE=E6=94=B9=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=20=E8=BF=9B=E7=A8=8B=E7=9B=91=E6=B5=8B=20pid=E6=96=87?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E8=BF=9B=E7=A8=8B=E6=90=9C=E7=B4=A2=E5=85=B3?= =?UTF-8?q?=E9=94=AE=E5=AD=97=E7=9A=84=E9=9D=9E=E7=A9=BA=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=203=E3=80=81=E4=BF=AE=E6=94=B9i18n=20=E4=B8=93=E7=94=A8?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=20=E4=B8=BA=20=E4=B8=B2=E8=81=94=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=204=E3=80=81=E5=A2=9E=E5=8A=A0=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E7=B1=BB=EF=BC=8C=E8=A7=A3=E5=86=B3=E5=89=8D=E7=AB=AFajax=20?= =?UTF-8?q?=E8=B7=A8=E5=9F=9F=E9=97=AE=E9=A2=98=EF=BC=8C=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E4=BC=9A=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .classpath | 2 +- WebRoot/i18n/globalMessages_en_US.properties | 2 +- WebRoot/i18n/globalMessages_ru_RU.properties | 4 +- WebRoot/i18n/globalMessages_zh_CN.properties | 2 +- WebRoot/main.jsp | 4 +- .../page/detection/monitorData/grafana.jsp | 9 +- WebRoot/page/detection/monitorData/ntc.jsp | 248 ++++++++++++++++++ WebRoot/page/detection/updateDetecSetInfo.jsp | 30 ++- .../nodeGroupManage/node/nodeInfoList.jsp | 2 +- src/nis/nms/web/actions/ProxyAction.java | 99 +++++++ .../nodeGroupManage/NodeManageAction.java | 4 +- 11 files changed, 380 insertions(+), 26 deletions(-) create mode 100644 WebRoot/page/detection/monitorData/ntc.jsp create mode 100644 src/nis/nms/web/actions/ProxyAction.java diff --git a/.classpath b/.classpath index 38c4718..7f6210e 100644 --- a/.classpath +++ b/.classpath @@ -9,7 +9,7 @@ - + diff --git a/WebRoot/i18n/globalMessages_en_US.properties b/WebRoot/i18n/globalMessages_en_US.properties index 5917cc8..dd30a29 100644 --- a/WebRoot/i18n/globalMessages_en_US.properties +++ b/WebRoot/i18n/globalMessages_en_US.properties @@ -5110,7 +5110,7 @@ option_table.2.type_value=Unreachable option_table.10.type_value=Writable option_table.8.type_value=4 Alarm option_table.25.type_value=The data status is abnormal and exceeds the alarm value -option_table.16.type_value=Dedicated Device +option_table.16.type_value=Inline Device option_table.24.type_code=Over 2 monitoring cycles, no monitoring result information received option_table.27.type_code=Get The Node System Time Failed option_table.28.type_value=ADC-A016 diff --git a/WebRoot/i18n/globalMessages_ru_RU.properties b/WebRoot/i18n/globalMessages_ru_RU.properties index 3ee03dc..0f3c5b9 100644 --- a/WebRoot/i18n/globalMessages_ru_RU.properties +++ b/WebRoot/i18n/globalMessages_ru_RU.properties @@ -4437,7 +4437,7 @@ option_table.2.type_value=\u041d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043 option_table.10.type_value=\u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0439 option_table.8.type_value=\u0442\u0440\u0435\u0432\u043e\u0433\u0430 4 \u0443\u0440\u043e\u0432\u043d\u044f option_table.25.type_value=\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0432\u043e\u0433\u0438. -option_table.16.type_value=\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435 +option_table.16.type_value=Последовательное Устройство option_table.24.type_code=\u0411\u043e\u043b\u0435\u0435 \u0434\u0432\u0443\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 option_table.27.type_code=\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0443\u0437\u043b\u0430 option_table.28.type_value=ADC-A016 @@ -6532,4 +6532,4 @@ topoManage.TopoNameSetting=\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u04 xt_mk_jbxx.604.mkmc=\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 xt_mk_jbxx.604.mkms=\u041c\u0435\u043d\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 pidFile.keyword.allblank=Процесс файл PID и процесс поиска ключевых слов не могут быть пустыми одновременно -network.throughput=Network Throughput \ No newline at end of file +network.throughput=Пропускная Способность Сети \ No newline at end of file diff --git a/WebRoot/i18n/globalMessages_zh_CN.properties b/WebRoot/i18n/globalMessages_zh_CN.properties index cb784c4..5a0c6dc 100644 --- a/WebRoot/i18n/globalMessages_zh_CN.properties +++ b/WebRoot/i18n/globalMessages_zh_CN.properties @@ -5121,7 +5121,7 @@ option_table.2.type_value=\u4e0d\u53ef\u8fbe option_table.10.type_value=\u53ef\u5199 option_table.8.type_value=4\u7ea7\u544a\u8b66 option_table.25.type_value=\u6570\u636e\u72b6\u6001\u5f02\u5e38\uff0c\u8d85\u8fc7\u544a\u8b66\u503c -option_table.16.type_value=\u4e13\u7528\u8bbe\u5907 +option_table.16.type_value=串联设备 option_table.24.type_code=\u8d85\u8fc7 2 \u76d1\u6d4b\u5468\u671f\uff0c\u672a\u63a5\u6536\u5230\u76d1\u6d4b\u7ed3\u679c\u4fe1\u606f option_table.27.type_code=\u83b7\u53d6\u8be5\u8282\u70b9\u7cfb\u7edf\u65f6\u95f4\u5931\u8d25 option_table.28.type_value=ADC-A016 diff --git a/WebRoot/main.jsp b/WebRoot/main.jsp index 6ff43b0..c71aea1 100644 --- a/WebRoot/main.jsp +++ b/WebRoot/main.jsp @@ -477,10 +477,10 @@ html, body {
  • i18n_main.text.systemSelect_n81i  |
  • <%--
  • 简体中文  |
  • ENGLISH  |
  • --%> -
  • > + <%--
  • > To Grafana   | -
  • + --%>
  • - * + * i18n_pidFile.keyword.allblank_n81i @@ -611,7 +613,7 @@ - *i18n_udsi.message.processSearchCode_n81i + * i18n_udsi.message.processSearchCode_n81i diff --git a/WebRoot/page/systemManage/nodeGroupManage/node/nodeInfoList.jsp b/WebRoot/page/systemManage/nodeGroupManage/node/nodeInfoList.jsp index 351d7e3..04cf7ee 100644 --- a/WebRoot/page/systemManage/nodeGroupManage/node/nodeInfoList.jsp +++ b/WebRoot/page/systemManage/nodeGroupManage/node/nodeInfoList.jsp @@ -12,7 +12,7 @@ - i18n_nodeInfo.message.title_n81i + ${nodegroupTable.groupName } i18n_nodeInfo.message.title_n81i headerMap = new LinkedHashMap(); + for(;headerNames.hasMoreElements();) { + String element = (String) headerNames.nextElement(); + String value = request.getHeader(element); + headerMap.put(element,value); + } + url = headerMap.get("realurl"); + Map parameterMap = request.getParameterMap(); + Header header = Header.create(headerMap); + header = null; + Request req = Request.create(url, getMethod(request.getMethod()), parameterMap, header); + Response res = Sender.create(req).send(); + is = res.getStream(); + + HttpServletResponse response = this.getResponse(); + response.setStatus(res.getStatus()); + Header resHeader = res.getHeader(); + Set> all = resHeader.getAll(); + for(Entry entry : all) { + String key = entry.getKey(); + if(key != null) { + response.setHeader(key, entry.getValue()); + } + } + IOUtils.copy(is, response.getOutputStream()); + } finally { + if(is != null) { + is.close(); + } + } + return null; + } + + //GET, POST, OPTIONS, PUT, DELETE, TRACE, CONNECT, HEAD + public static METHOD getMethod(String method) { + METHOD result = null; + switch (method.toUpperCase()) { + case "GET": + result = METHOD.GET; break; + case "POST": + result = METHOD.POST; break; + case "OPTIONS": + result = METHOD.OPTIONS; break; + case "PUT": + result = METHOD.PUT; break; + case "DELETE": + result = METHOD.DELETE; break; + case "TRACE": + result = METHOD.TRACE; break; + case "CONNECT": + result = METHOD.CONNECT; break; + case "HEAD": + result = METHOD.HEAD; break; + default: + result = METHOD.GET; break; + } + return result; + } + +} diff --git a/src/nis/nms/web/actions/nodeGroupManage/NodeManageAction.java b/src/nis/nms/web/actions/nodeGroupManage/NodeManageAction.java index f2575dd..2aeaaf3 100644 --- a/src/nis/nms/web/actions/nodeGroupManage/NodeManageAction.java +++ b/src/nis/nms/web/actions/nodeGroupManage/NodeManageAction.java @@ -190,6 +190,8 @@ public class NodeManageAction extends BaseAction { if (nodeGroupId != null) {// 指定组ID查找相应的节点 hql += " and groupId =" + nodeGroupId + ""; + NodegroupTable nodegroupTable = (NodegroupTable) this.commonService.get(NodegroupTable.class, nodeGroupId); + this.getRequest().setAttribute("nodegroupTable", nodegroupTable); } hql += " order by nodeState asc,nodeCreatetime desc"; sqlCondition += " order by node_state asc,Node_createtime desc"; @@ -199,7 +201,7 @@ public class NodeManageAction extends BaseAction { page = this.commonService.findByPage(hql, pageNo, pageSize); nodeList = (List) page.getResult(); - + for (NodeTable node : nodeList) { List syslist = this.commonService .find("from SystemTable where systemId = "