public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n"); out.write("\n\n"); // Get the current user's ac WTAccountCredentials ac = WTAccountCredentials.current(); SecureInfoManagerImpl sim = new SecureInfoManagerImpl(); // Setup for permission checking boolean editInterfaces = false; if (sim.canEditEntity(ProtectedResourceConstants.PR_INTERFACES, ac)) editInterfaces = true; pageContext.setAttribute("editInterfaces", new Boolean(editInterfaces)); out.write(" \n"); String hostIP = null; try { hostIP = InetAddress.getLocalHost().getHostAddress(); // out.print(hostIP); } catch (UnknownHostException ex) { throw new Exception("Could not determine the local host address", ex); } out.write("\n\nvar javaScriptVar=\""); out.print(hostIP); out.write("\";\nvar javaScriptVar2=\""); out.print(editInterfaces); out.write("\";\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\r\n\r\n"); out.write("\r\n\r\n"); out.write("<html>\r\n "); out.write("<head>"); out.write("<title>WebTelemetry System Monitor"); out.write("</title>"); out.write("</head>\r\n\r\n"); out.write("<frameset cols=\"*\" border=\"0\" frameborder=\"0\">\r\n\t"); out.write( "<frame src=\"/wt-monitor/wt-jsp/WTmonitor-frame.jsp\" name=\"sysmonOnlyMotherFrame\" scrolling=\"no\" border=\"0\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\">\r\n"); out.write("</frameset>\r\n\r\n "); out.write("<noframes>\r\n "); out.write("<h2>Frame Alert"); out.write("</h2>\r\n "); out.write( "<p>This document is designed to be viewed using the frames feature.\r\n If you see this message, you are using a non-frame-capable web client."); out.write("<BR>"); out.write("</p>\r\n "); out.write("</noframes>\r\n"); out.write("</html>\r\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/xml;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n"); out.write("\n"); HttpSession user = request.getSession(true); Notification newNotice = (Notification) user.getAttribute("newNotice"); List exclude = new ArrayList(); exclude.add(NotificationWizardServlet.WT_VENDOR_NAME); // Exclude WebTelemetry out.print(buildTree(newNotice, exclude)); out.write("\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n\n"); out.write("\n\n"); // Get required parameter(s) String nodeIdStr = request.getParameter("node"); if (nodeIdStr == null) throw new org.opennms.web.MissingParameterException("node"); int nodeId = Integer.parseInt(nodeIdStr); String nodeLabel = org.opennms.web.element.NetworkElementFactory.getNodeLabel(nodeId); Node node_db = NetworkElementFactory.getNode(nodeId); String orgName = node_db.getOrganizationName(); Asset asset = this.model.getAsset(nodeId); boolean isNew = false; if (asset == null) { asset = new Asset(); isNew = true; } Vector vCategories = WTProperties.getList("AssetCategories.list"); out.write("\n\n"); out.write("<html>\n"); out.write("<head>\n\t"); out.write("<title>WebTelemetry - Node Assets | System Info for "); out.print(node_db.getLabel()); out.write("</title>\n\t"); out.write("<base HREF=\""); out.print(org.opennms.web.Util.calculateUrlBase(request)); out.write("\" />\n\t"); out.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\n\t"); out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">"); out.write("</script>\n"); out.write("</head>\n\n"); out.write("<body>\n\t"); out.write("<!-- Header -->\n\t"); String title = "Asset - Vendor Info for Node: " + node_db.getLabel() + " (" + orgName + ")"; out.write("\n\t"); JspRuntimeLibrary.include( request, response, "/includes/tabheader.jsp" + "?" + "title=" + java.net.URLEncoder.encode("" + title) + "&" + "refresh=" + "1" + "&" + "helpURL=" + "assetmanager%2FWTHelp_AssetManager.html" + "&" + "tabgroup=" + "asset" + "&" + "tabselected=" + "vendor" + "&" + "node=" + java.net.URLEncoder.encode("" + nodeIdStr), out, false); out.write("\n\n"); out.write("<!-- BEGIN FRAMING TABLE:open tags, keep at 100%-->\n"); out.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t"); out.write("<tr>\n\t\t"); out.write("<td width=\"10\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\n\t\t"); out.write("<td>\n\n"); out.write("<!-- USER-DEFINED ATTRIBUTES TABLE: was Identification -->\n "); out.write("<form action=\"asset/modifyAsset\" method=\"POST\" name=\"sysInfo\">\n "); out.write("<input type=\"hidden\" name=\"node\" value=\""); out.print(nodeId); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"isnew\" value=\""); out.print(isNew); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"view\" value=\"asset-tab-vendor\" />\n\n "); if (!isNew) { out.write("\n "); out.write("<!-- asset-tab-system -->\n "); out.write("<input type=\"hidden\" name=\"category\" value=\""); out.print(asset.getCategory()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"serialnumber\" value=\""); out.print(asset.getSerialNumber()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"manufacturer\" value=\""); out.print(asset.getManufacturer()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"operatingsystem\" value=\""); out.print(asset.getOperatingSystem()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"modelnumber\" value=\""); out.print(asset.getModelNumber()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"assetnumber\" value=\""); out.print(asset.getAssetNumber()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"dateinstalled\" value=\""); out.print(asset.getDateInstalled()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"description\" value=\""); out.print(asset.getDescription()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"comments\" value=\""); out.print(asset.getComments()); out.write("\" />\n\n "); out.write("<!-- asset-tab-location -->\n "); out.write("<input type=\"hidden\" name=\"region\" value=\""); out.print(asset.getRegion()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"division\" value=\""); out.print(asset.getDivision()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"department\" value=\""); out.print(asset.getDepartment()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"address1\" value=\""); out.print(asset.getAddress1()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"address2\" value=\""); out.print(asset.getAddress2()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"city\" value=\""); out.print(asset.getCity()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"state\" value=\""); out.print(asset.getState()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"zip\" value=\""); out.print(asset.getZip()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"building\" value=\""); out.print(asset.getBuilding()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"floor\" value=\""); out.print(asset.getFloor()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"room\" value=\""); out.print(asset.getRoom()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"rack\" value=\""); out.print(asset.getRack()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"slot\" value=\""); out.print(asset.getSlot()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"port\" value=\""); out.print(asset.getPort()); out.write("\" />\n "); out.write("<input type=\"hidden\" name=\"circuitid\" value=\""); out.print(asset.getCircuitId()); out.write("\" />\n "); } out.write("\n\n"); out.write("<!-- END FRAMING TABLE:open tags, keep at 100%-->\n\t"); out.write("<table width=\"98%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t "); out.write("<tr class=\"tableHeader\">\n\t "); out.write("<td colspan=\"6\" class=\"tableHeader\">Vendor"); out.write("</td>\n\t "); out.write("</tr>\n\t "); out.write("<tr class=\"tableRowLight\">\n\t "); out.write("<td class=\"tableText\">"); out.write("<span class=\"formText\">Name:"); out.write("</span>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<input type=\"text\" name=\"vendor\" value=\""); out.print(asset.getVendor()); out.write("\" size=\"20\" maxlength=\"64\"/>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<span class=\"formText\">Phone:"); out.write("</span>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<input type=\"text\" name=\"vendorphone\" value=\""); out.print(asset.getVendorPhone()); out.write("\" size=\"20\" maxlength=\"64\"/>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<span class=\"formText\">Fax:"); out.write("</span>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<input type=\"text\" name=\"vendorfax\" value=\""); out.print(asset.getVendorFax()); out.write("\" size=\"20\" maxlength=\"64\"/>"); out.write("</td>\n\t "); out.write("</tr>\n\t "); out.write("<tr class=\"tableRowLight\">\n\t "); out.write("<td class=\"tableText\">"); out.write("<span class=\"formText\">Lease:"); out.write("</span>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<input type=\"text\" name=\"lease\" value=\""); out.print(asset.getLease()); out.write("\" size=\"20\" maxlength=\"64\"/>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<span class=\"formText\">Lease Expires:"); out.write("</span>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<input type=\"text\" name=\"leaseexpires\" value=\""); out.print(asset.getLeaseExpires()); out.write("\" size=\"20\" maxlength=\"64\"/>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<span class=\"formText\">Vendor Asset:"); out.write("</span>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<input type=\"text\" name=\"vendorassetnumber\" value=\""); out.print(asset.getVendorAssetNumber()); out.write("\" size=\"20\" maxlength=\"64\"/>"); out.write("</td>\n\t "); out.write("</tr>\n\t "); out.write("<tr class=\"tableRowLight\">\n\t "); out.write("<td class=\"tableText\">"); out.write("<span class=\"formText\">Maint Contract:"); out.write("</span>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<input type=\"text\" name=\"maintcontract\" value=\""); out.print(asset.getMaintContract()); out.write("\" size=\"20\" maxlength=\"64\"/>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<span class=\"formText\">Contract Expires:"); out.write("</span>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<input type=\"text\" name=\"maintcontractexpires\" value=\""); out.print(asset.getMaintContractExpires()); out.write("\" size=\"20\" maxlength=\"64\"/>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<span class=\"formText\">Maint Phone:"); out.write("</span>"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.write("<input type=\"text\" name=\"supportphone\" value=\""); out.print(asset.getSupportPhone()); out.write("\" size=\"20\" maxlength=\"64\"/>"); out.write("</td>\n\t "); out.write("</tr>\n\t "); out.write("<tr class=\"tableRowLight\">\n\t "); out.write("<td class=\"tableText\" colspan=\"6\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"4\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\n\t "); out.write("</tr>\n\t"); out.write("</table>"); out.write("<br />\n\n\t"); out.write("<table width=\"98%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">\n\t "); out.write("<tr>\n\t\t"); out.write("<td colspan=\"3\">"); out.write("<br />\n\t\t\t"); out.write("<INPUT type=\"hidden\" name=\"button\" value=\"\">\n\t\t\t"); out.write( "<INPUT type=\"image\" src=\"/wt-portal/images/buttons/btn_save_changes.gif\" onClick=\"document.sysInfo.button.value='Save Changes';\">\n\t\t\t \n\t\t\t"); out.write( "<a href=\"javascript:document.sysInfo.reset()\" onClick=\"javascript:document.sysInfo.reset();\">"); out.write("<img src=\"/wt-portal/images/buttons/btn_reset.gif\" border=\"0\" alt=\"Reset\">"); out.write("</a>"); out.write("<br /> \n\t\t\t"); out.write("<!-- "); out.write("<input type=\"submit\" value=\"Save Changes\"/>\n\t\t\t"); out.write("<input type=\"reset\" /> -->\n\t\t"); out.write("</td>\n\t\t"); out.write("<td colspan=\"3\" align=\"right\" class=\"message\">"); out.write("<br />\n\t\t\t"); if (isNew) { out.write("\n\t\t\t\tNew Record\n\t\t\t"); } else { out.write("\n\t\t\t\tLast Modified: "); out.print(WTTools.formatLocalDateToString(asset.getLastModifiedDate())); out.write(" by "); out.print(asset.getUserLastModified()); out.write("\n\t\t\t"); } out.write("\n\t\t"); out.write("</td>\n\t "); out.write("</tr>\n\t"); out.write("</table>\n\t"); out.write("</form>\n\n"); out.write("<!-- BEGIN FRAMING TABLE:close tags-->\n\t\t"); out.write("</td>\n\t"); out.write("</tr>\n"); out.write("</table>\n"); out.write("<!-- END FRAMING TABLE:close tags-->\n\n"); out.write("<br>\n"); JspRuntimeLibrary.include(request, response, "/includes/footer.jsp", out, false); out.write("\n\n"); out.write("</body>\n"); out.write("</html>\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write( "<!--\n\n//\n// This file is part of the OpenNMS(R) Application.\n//\n// OpenNMS(R) is Copyright (C) 2002-2003 The OpenNMS Group, Inc. All rights reserved.\n// OpenNMS(R) is a derivative work, containing both original code, included code and modified\n// code that was published under the GNU General Public License. Copyrights for modified \n// and included code are below.\n//\n// OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.\n//\n// Modifications:\n//\n// 2002 Nov 12: Added response time, based on original performance code.\n//\n// Original code base Copyright (C) 1999-2001 Oculan Corp. All rights reserved.\n//\n// This program is free software; you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation; either version 2 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"); out.write( "// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n//\n// For more information contact:\n// OpenNMS Licensing "); out.write( "<*****@*****.**>\n// http://www.opennms.org/\n// http://www.opennms.com/\n//\n\n-->\n\n"); out.write("\n\n"); out.write("\n\n"); out.write("\n\n"); ResponseTimeModel.QueryableNode[] nodes = this.model.getQueryableNodes(); out.write("\n \n"); out.write( "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"black\" bgcolor=\"#cccccc\">\n "); out.write("<tr>\n "); out.write("<td bgcolor=\"#999999\" >"); out.write("<b>"); out.write("<a href=\"response/index.jsp\">Response Time"); out.write("</a>"); out.write("</b>"); out.write("</td>\n "); out.write("</tr>\n\n"); if (nodes != null && nodes.length > 0) { out.write("\n "); out.write("<tr> \n "); out.write("<td>\n "); out.write("<form method=\"get\" action=\"response/addIntfFromNode\" >\n "); out.write( "<input type=\"hidden\" name=\"endUrl\" value=\"response/addReportsToUrl\" />\n "); out.write("<input type=\"hidden\" name=\"relativetime\" value=\"lastday\" />\n\n "); out.write( "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n "); out.write("<tr>\n "); out.write("<td>\n "); out.write("<font size=\"-1\">Choose a node to query"); out.write("</font>\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr>\n "); out.write("<td>\n "); out.write("<select name=\"node\" size=\"1\">\n "); for (int i = 0; i < nodes.length; i++) { out.write("\n "); out.write("<option value=\""); out.print(nodes[i].nodeId); out.write("\">"); out.print(nodes[i].nodeLabel); out.write("</option>\n "); } out.write("\n "); out.write("</select>\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr>\n "); out.write("<td>\n "); out.write("<input type=\"submit\" value=\"Execute Query\" />\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("</table>\n "); out.write("</form>\n "); out.write("</td>\n "); out.write("</tr>\n"); } else { out.write("\n "); out.write("<tr>\n "); out.write("<td>\n No response time data has been gathered yet\n "); out.write("</td>\n "); out.write("</tr> \n"); } out.write("\n"); out.write("</table>\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); User user = null; UserFactory userFactory = UserFactory.getInstance(); String userID = request.getParameter("userID"); try { UserFactory.init(); user = userFactory.getUser(userID); } catch (Exception e) { throw new ServletException("Could not find user " + userID + " in user factory.", e); } out.write("\n"); out.write("<html>\n"); out.write("<head>\n "); out.write("<title>WebTelemetry - | User Management | User Detail"); out.write("</title>\n "); out.write("<base HREF=\""); out.print(org.opennms.web.Util.calculateUrlBase(request)); out.write("\" />\n "); out.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\n\t"); out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">"); out.write("</script>\n"); out.write("</head>\n"); out.write("<body>\n"); String title = " User Management - Detail Summary for: " + userID; out.write("\n"); /* ---- c:if ---- */ org.apache.taglibs.standard.tag.el.core.IfTag _jspx_th_c_if_0 = (org.apache.taglibs.standard.tag.el.core.IfTag) _jspx_tagPool_c_if_test.get(org.apache.taglibs.standard.tag.el.core.IfTag.class); _jspx_th_c_if_0.setPageContext(pageContext); _jspx_th_c_if_0.setParent(null); _jspx_th_c_if_0.setTest("${not param.orgAdminPopup}"); int _jspx_eval_c_if_0 = _jspx_th_c_if_0.doStartTag(); if (_jspx_eval_c_if_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\n "); JspRuntimeLibrary.include( request, response, "/includes/header.jsp" + "?" + "title=" + java.net.URLEncoder.encode("" + title) + "&" + "help=" + "monitoringadmin%2Fusers%2FWTHelp_User.html", out, false); out.write("\n"); int evalDoAfterBody = _jspx_th_c_if_0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_if_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; _jspx_tagPool_c_if_test.reuse(_jspx_th_c_if_0); out.write("\n"); if (_jspx_meth_c_if_1(pageContext)) return; out.write("\n\n"); out.write("<!-- BEGIN FRAMING TABLE:open tags, keep at 100%-->\n"); out.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t"); out.write("<tr>\n\t\t"); out.write("<td width=\"10\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\n\t\t"); out.write("<td>\n"); out.write("<!-- END FRAMING TABLE:open tags, keep at 100%-->\n"); out.write("<table width=\"98%\"border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n "); out.write("<tr class=\"tableHeader\">\n "); out.write("<td class=\"tableHeader\" colspan=\"2\">User Information"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" width=\"25%\">"); out.write("<b>Full Name:"); out.write("</b>"); out.write("</td>\n "); out.write("<td class=\"tableText\" width=\"75%\">"); out.print(user.getFullName()); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowDark\">\n "); out.write("<td class=\"tableText\">"); out.write("<b>Comments:"); out.write("</b>"); out.write("</td>\n "); out.write("<td class=\"tableText\">"); out.print(user.getUserComments()); out.write("</td>\n "); out.write("</tr>\n"); out.write("</table>\n"); out.write("<br>\n"); out.write("<table width=\"98%\"border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n "); out.write("<tr class=\"tableHeader\">\n "); out.write("<td class=\"tableHeader\" colspan=\"2\">Notification Information"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" width=\"25%\">"); out.write("<b>Email:"); out.write("</b>"); out.write("</td>\n "); out.write("<td class=\"tableText\" width=\"75%\">"); out.print(userFactory.getEmail(userID)); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowDark\">\n "); out.write("<td class=\"tableText\">"); out.write("<b>Pager Email:"); out.write("</b>"); out.write("</td>\n "); out.write("<td class=\"tableText\">"); out.print(userFactory.getPagerEmail(userID)); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\">"); out.write("<b>Numerical Service:"); out.write("</b>"); out.write("</td>\n "); out.write("<td class=\"tableText\">"); out.print(userFactory.getNumericPage(userID)); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowDark\">\n "); out.write("<td class=\"tableText\">"); out.write("<b>Numerical Pin:"); out.write("</b>"); out.write("</td>\n "); out.write("<td class=\"tableText\">"); out.print(userFactory.getNumericPin(userID)); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\">"); out.write("<b>Text Service:"); out.write("</b>"); out.write("</td>\n "); out.write("<td class=\"tableText\">"); out.print(userFactory.getTextPage(userID)); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowDark\">\n "); out.write("<td class=\"tableText\">"); out.write("<b>Text Pin:"); out.write("</b>"); out.write("</td>\n "); out.write("<td class=\"tableText\">"); out.print(userFactory.getTextPin(userID)); out.write("</td>\n "); out.write("</tr>\n"); out.write("</table>\n"); out.write("<br>\n"); out.write("<table width=\"98%\"border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n "); out.write("<tr class=\"tableHeader\">\n "); out.write("<td class=\"tableHeader\" colspan=\"2\">Duty Schedules"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" colspan=\"2\">"); out.write("<br />\n "); out.write("<!-- weekly schedule -->\n "); out.write( "<table width=\"50%\" border=\"1\" bordercolor=\"#999999\" cellspacing=\"0\" cellpadding=\"2\" >\n\t\t\t"); Collection dutySchedules = user.getDutyScheduleCollection(); out.write("\n "); int i = 0; Iterator iter = dutySchedules.iterator(); while (iter.hasNext()) { DutySchedule tmp = new DutySchedule((String) iter.next()); Vector curSched = tmp.getAsVector(); i++; out.write("\n "); out.write("<tr>\n "); ChoiceFormat days = new ChoiceFormat("0#Mo|1#Tu|2#We|3#Th|4#Fr|5#Sa|6#Su"); for (int j = 0; j < 7; j++) { Boolean curDay = (Boolean) curSched.get(j); out.write("\n "); out.write("<td width=\"5%\">\n "); out.print((curDay.booleanValue() ? days.format(j) : "X")); out.write("\n "); out.write("</td>\n "); } out.write("\n "); out.write("<td width=\"5%\">\n "); out.print(curSched.get(7)); out.write("\n "); out.write("</td>\n "); out.write("<td width=\"5%\">\n "); out.print(curSched.get(8)); out.write("\n "); out.write("</td>\n "); out.write("</tr>\n "); } out.write("\n "); out.write("</table>\n "); out.write("<!-- end weekly schedule --> \n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" colspan=\"2\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"4\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\n "); out.write("</tr> \n"); out.write("</table>\n"); out.write("<br>"); out.write("<br>\n"); out.write("<b>Member of the Following Organizations & Groups:"); out.write("</b>\n"); out.write("<!-- BEGIN: NEW ASSIGNED GROUPS TABLE -->\n"); out.write("<table width=\"98%\"border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\n "); // Get the user's orgs WTOrganizationDAO orgDAO = DAOImpl.OrgDAO; WTOrganization[] orgs = orgDAO.getWTOrganization(); if (orgs != null) { // Loop thru orgs for (int idx = 0; idx < orgs.length; idx++) { out.write("\n\n "); out.write("<tr class=\"tableHeader\">\n "); out.write("<td class=\"tableHeader\" colspan=\"2\">Organization Name: "); out.print(orgs[idx].getName()); out.write("</td>\n\t"); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" width=\"25%\">"); out.write("<b>Assigned Groups:"); out.write("</b>"); out.write("</td>\n "); out.write("<td class=\"tableText\" width=\"75%\">\n "); // Get the orgs groups WTGroupManager grpMgr = ManagersImpl.GroupManager; int[] orgids = {orgs[idx].getID()}; List groups = grpMgr.getUserGroups(user.getUserId(), orgids); if (groups != null) { // Loop thru the groups for (Iterator iterGrps = groups.iterator(); iterGrps.hasNext(); ) { WTGroup group = (WTGroup) iterGrps.next(); WTRole role = (group.getRoles() == null ? null : (WTRole) group.getRoles().get(0)); out.write("\n "); out.print(group.getName()); out.write(" ("); out.print((role == null ? "" : role.getName())); out.write(")"); out.write("<br/>\n "); } } out.write("\n\n "); out.write("</td>\n\t"); out.write("</tr>\n\n "); } } out.write("\n\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" colspan=\"2\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"4\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\n "); out.write("</tr> \n"); out.write("</table>\n"); out.write("<!-- END: NEW ASSIGNED GROUPS TABLE -->\n\n\n"); out.write("<!-- BEGIN FRAMING TABLE:close tags-->\n\t\t"); out.write("</td>\n\t"); out.write("</tr>\n"); out.write("</table>\n"); out.write("<!-- END FRAMING TABLE:close tags-->\n"); out.write("<br>\n\n"); JspRuntimeLibrary.include(request, response, "/includes/footer.jsp", out, false); out.write("\n"); out.write("</body>\n"); out.write("</html>\n\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\r\n\r\n"); out.write("\r\n\r\n"); String strIp = (String) request.getParameter("ip"); String strCommunityString = (String) request.getParameter("cs"); String strPort = (String) request.getParameter("port"); String strTimeout = (String) request.getParameter("timeout"); String strRetries = (String) request.getParameter("retries"); String strNodeLabel = (String) request.getParameter("node"); String strNodeId = request.getParameter("nodeId"); String strFirstTime = (String) request.getParameter("firsttime"); String strWindowId = (String) request.getParameter("windowid"); // Create the querier and make the request. QueryFactory factory = new QueryFactory(); Querier querier = (Querier) factory.createQuerier(WinPagePerfSnmpQuerier.QUERIER_NAME); DeviceCommunicator deviceCommunicator = new DeviceCommunicator(); deviceCommunicator.sendQuery(querier, strIp); // Error processing if (querier.getErrorStatus() == -1) { RequestDispatcher rd = getServletContext() .getRequestDispatcher("/jsp/WTerror-handler.jsp?error=SnmpCommError"); rd.forward(request, response); return; } if (querier.getErrorStatus() == -2) { RequestDispatcher rd = getServletContext() .getRequestDispatcher("/jsp/WTerror-handler.jsp?error=NoPerfmibSnmpError"); rd.forward(request, response); return; } if (querier.getErrorStatus() != 0) { RequestDispatcher rd = getServletContext().getRequestDispatcher("/jsp/WTerror-handler.jsp?error=SnmpError"); rd.forward(request, response); return; } Map calcs = querier.getCalculations(); long[] results = (long[]) calcs.get(WinPagePerfSnmpQuerier.PAGE_RESULTS); if (results[0] < 0 || results[1] < 0 || results[2] < 0 || results[3] < 0 || results[4] < 0 || results[5] < 0 || results[6] < 0 || results[7] < 0 || results[8] < 0 || results[9] < 0) { RequestDispatcher rd = getServletContext().getRequestDispatcher("/jsp/WTerror-handler.jsp?error=SnmpError"); rd.forward(request, response); return; } Vector vPageStats = null; if (strFirstTime == null) { // Not the first time, so get the previous polled data from the session vPageStats = (Vector) session.getAttribute("vPageStats" + strWindowId); } else { // This is the first time in this JSP, so create the Vector which will contain the // polled data Random random = new Random(); strWindowId = String.valueOf(random.nextInt()); vPageStats = new Vector(); } vPageStats.add(results); session.setAttribute("vPageStats" + strWindowId, vPageStats); // This random number is used to prevent the brower from caching the IMG tags Random random = new Random(); int randomInt = random.nextInt(); out.write("\r\n\r\n"); out.write("<html>\r\n"); out.write("<head>\r\n "); out.write("<title>WebTelemetry - Graphs | Real-Time | Windows Page Performance Monitoring"); out.write("</title>\r\n "); out.write("<META HTTP-EQUIV=\"refresh\" CONTENT=\""); out.print(WTProperties.getMonitorUIRefreshRate()); out.write("; URL="); out.print(WTTools.getJspURL(request)); out.write("WTwin-page-monitor.jsp?cs="); out.print(URLEncoder.encode(strCommunityString, "UTF-8")); out.write("&ip="); out.print(strIp); out.write("&port="); out.print(strPort); out.write("&timeout="); out.print(strTimeout); out.write("&retries="); out.print(strRetries); out.write("&node="); out.print(URLEncoder.encode(strNodeLabel, "UTF-8")); out.write("&windowid="); out.print(strWindowId); out.write("&nodeId="); out.print(strNodeId); out.write("\">\r\n "); out.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\r\n "); out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">"); out.write("</script>\r\n"); out.write("</head>\r\n"); out.write("<body>\r\n"); String title = "Graphs - Real-Time - Windows Page Performance Monitoring for Node: " + strNodeLabel; out.write("\r\n"); request.setAttribute("title", title); request.setAttribute("nodeJsp", "/wt-monitor/element/node.jsp?node=" + strNodeId); out.write("\r\n"); /* ---- c:import ---- */ org.apache.taglibs.standard.tag.el.core.ImportTag _jspx_th_c_import_0 = (org.apache.taglibs.standard.tag.el.core.ImportTag) _jspx_tagPool_c_import_url_context.get( org.apache.taglibs.standard.tag.el.core.ImportTag.class); _jspx_th_c_import_0.setPageContext(pageContext); _jspx_th_c_import_0.setParent(null); _jspx_th_c_import_0.setContext("/wt-monitor"); _jspx_th_c_import_0.setUrl("/includes/header.jsp"); int[] _jspx_push_body_count_c_import_0 = new int[] {0}; try { int _jspx_eval_c_import_0 = _jspx_th_c_import_0.doStartTag(); if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) { javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody(); _jspx_push_body_count_c_import_0[0]++; out = _bc; _jspx_th_c_import_0.setBodyContent(_bc); _jspx_th_c_import_0.doInitBody(); } do { out.write("\r\n\t"); if (_jspx_meth_c_param_0( _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return; out.write("\r\n\t"); if (_jspx_meth_c_param_1( _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return; out.write("\r\n\t"); if (_jspx_meth_c_param_2( _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return; out.write("\r\n"); int evalDoAfterBody = _jspx_th_c_import_0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) out = pageContext.popBody(); _jspx_push_body_count_c_import_0[0]--; } if (_jspx_th_c_import_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; } catch (Throwable _jspx_exception) { while (_jspx_push_body_count_c_import_0[0]-- > 0) out = pageContext.popBody(); _jspx_th_c_import_0.doCatch(_jspx_exception); } finally { _jspx_th_c_import_0.doFinally(); _jspx_tagPool_c_import_url_context.reuse(_jspx_th_c_import_0); } out.write("\t\r\n\t"); out.write("\r\n"); out.write("<div align=\"center\">\r\n"); out.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n\t"); out.write("<tr>\r\n\t\t"); out.write("<td align=\"right\">"); out.write("<IMG SRC=\""); out.print(WTTools.getServletURL(request)); out.write("WTsnmpRealTimeGraphs?chart=winpagefaultchart&random="); out.print(randomInt); out.write("&windowid="); out.print(strWindowId); out.write("\" BORDER=0>"); out.write("</td>\r\n\t\t"); out.write("<td>"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"20\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\r\n\t\t"); out.write("<td>"); out.write("<IMG SRC=\""); out.print(WTTools.getServletURL(request)); out.write("WTsnmpRealTimeGraphs?chart=winpagefaultseries&random="); out.print(randomInt); out.write("&windowid="); out.print(strWindowId); out.write("\" BORDER=0>"); out.write("</td>\r\n\t"); out.write("</tr>\r\n\t"); out.write("<tr>\r\n\t\t"); out.write("<td align=\"right\">"); out.write("<IMG SRC=\""); out.print(WTTools.getServletURL(request)); out.write("WTsnmpRealTimeGraphs?chart=winpagenumchart&random="); out.print(randomInt); out.write("&windowid="); out.print(strWindowId); out.write("\" BORDER=0>"); out.write("</td>\r\n\t\t"); out.write("<td> "); out.write("</td>\r\n\t\t"); out.write("<td>"); out.write("<IMG SRC=\""); out.print(WTTools.getServletURL(request)); out.write("WTsnmpRealTimeGraphs?chart=winpagenumseries&random="); out.print(randomInt); out.write("&windowid="); out.print(strWindowId); out.write("\" BORDER=0>"); out.write("</td>\r\n\t"); out.write("</tr>\r\n\t"); out.write("<tr>\r\n\t\t"); out.write("<td align=\"right\">"); out.write("<IMG SRC=\""); out.print(WTTools.getServletURL(request)); out.write("WTsnmpRealTimeGraphs?chart=winpagetimeschart&random="); out.print(randomInt); out.write("&windowid="); out.print(strWindowId); out.write("\" BORDER=0>"); out.write("</td>\r\n\t\t"); out.write("<td> "); out.write("</td>\r\n\t\t"); out.write("<td>"); out.write("<IMG SRC=\""); out.print(WTTools.getServletURL(request)); out.write("WTsnmpRealTimeGraphs?chart=winpagetimesseries&random="); out.print(randomInt); out.write("&windowid="); out.print(strWindowId); out.write("\" BORDER=0>"); out.write("</td>\r\n\t"); out.write("</tr>\r\n"); out.write("</table>\r\n"); out.write("</div>\r\n"); out.write("<br>\r\n\r\n"); /* ---- c:import ---- */ org.apache.taglibs.standard.tag.el.core.ImportTag _jspx_th_c_import_1 = (org.apache.taglibs.standard.tag.el.core.ImportTag) _jspx_tagPool_c_import_url_context_nobody.get( org.apache.taglibs.standard.tag.el.core.ImportTag.class); _jspx_th_c_import_1.setPageContext(pageContext); _jspx_th_c_import_1.setParent(null); _jspx_th_c_import_1.setContext("/wt-monitor"); _jspx_th_c_import_1.setUrl("/includes/footer.jsp"); int[] _jspx_push_body_count_c_import_1 = new int[] {0}; try { int _jspx_eval_c_import_1 = _jspx_th_c_import_1.doStartTag(); if (_jspx_th_c_import_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; } catch (Throwable _jspx_exception) { while (_jspx_push_body_count_c_import_1[0]-- > 0) out = pageContext.popBody(); _jspx_th_c_import_1.doCatch(_jspx_exception); } finally { _jspx_th_c_import_1.doFinally(); _jspx_tagPool_c_import_url_context_nobody.reuse(_jspx_th_c_import_1); } out.write("\r\n\t\r\n"); out.write("</body>\r\n"); out.write("</html>"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n\n\n"); out.write("\n\n"); Vector vMibs = (Vector) request.getAttribute("mibs"); String strIp = (String) request.getAttribute("ip"); if (strIp == null) strIp = ""; String strCommunity = (String) request.getAttribute("cs"); if (strCommunity == null) strCommunity = ""; String strPort = (String) request.getAttribute("port"); if (strPort == null) strPort = "161"; String strRetries = (String) request.getAttribute("retries"); if (strRetries == null) strRetries = "1"; String strTimeout = (String) request.getAttribute("timeout"); if (strTimeout == null) strTimeout = "3000"; String strOID = (String) request.getAttribute("oid"); if (strOID == null) strOID = ""; String strDesc = (String) request.getAttribute("desc"); if (strDesc == null) strDesc = ""; String strASN1 = (String) request.getAttribute("asn1"); if (strASN1 == null) strASN1 = ""; String authpass = (String) request.getAttribute("authpass"); if (authpass == null) authpass = ""; String privpass = (String) request.getAttribute("privpass"); if (privpass == null) privpass = ""; String version = (String) request.getAttribute("version"); if (version == null) version = "version 1"; String securityname = (String) request.getAttribute("securityname"); if (securityname == null) securityname = ""; String seclevel = (String) request.getAttribute("seclevel"); if (seclevel == null) seclevel = "AUTH_PRIV"; String authproto = (String) request.getAttribute("authproto"); authproto = authproto == null ? "MD5" : authproto; String privproto = (String) request.getAttribute("privproto"); privproto = privproto == null ? "DES" : privproto; out.write("\n\n\n"); out.write("<html>\n"); out.write("<head>\n "); out.write("<title>WebTelemetry - Tools - SNMP Walk"); out.write("</title>\n "); out.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\n "); out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">"); out.write("</script>\n\n\n\t"); out.write( "<script type=text/javascript>\n\t\n\t// Validate the SNMP form\n\tfunction validateForm()\n\t{\n\t var seclevel = \"\";\n\t\tvar seclevelChecked = \"\";\n\t\tif (document.snmpwalk.ip.value == \"\" ) \n\t\t{\n\t\t alert (\"Please fill in the ip address field.\");\n\t\t return false;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif (!verifyIP(document.snmpwalk.ip.value))\n\t\t\t{\n\t\t\t\tdocument.snmpwalk.ip.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\t\t\t\t\n\t\tif (document.snmpwalk.port.value != \"\" ) \n\t\t{\n\t\t\tif (!checkInteger(trim(document.snmpwalk.port.value))) {\n\t alert (\"Please enter a whole number for 'Port' and try again.\");\n\t document.snmpwalk.port.focus();\n\t return false;\n\t }\n\t }\n\t \n\t if (document.snmpwalk.retries.value != \"\" ) \n\t\t{\n\t\t\tif (!checkInteger(trim(document.snmpwalk.retries.value))) {\n\t alert (\"Please enter a whole number for 'Retries' and try again.\");\n\t document.snmpwalk.retries.focus();\n\t return false;\n\t }\n\t }\n\t \n\t if (document.snmpwalk.timeout.value != \"\" ) \n\t\t{\n"); out.write( "\t\t\tif (!checkInteger(trim(document.snmpwalk.timeout.value))) {\n\t alert (\"Please enter a whole number for 'Timeout' and try again.\");\n\t document.snmpwalk.timeout.focus();\n\t return false;\n\t }\n\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tvar sel = document.getElementById( \"version\");\t\t\t\n\t\tvar opt = sel.options[ sel.selectedIndex];\t\n\t\t\n\t\tif( opt.text != \"version 3\")\n\t\t{\n\t\t\t// Community String\n\t\t\tvar cs = document.snmpwalk.cs.value;\n\t\t\tif (cs == \"\" || cs == null || trim(cs).length "); out.write( "<= 0)\n\t\t\t{\n\t\t \talert (\"Please fill in the community string field.\");\n\t\t \tdocument.snmpwalk.cs.focus();\n\t\t \treturn false;\n\t\t }\n\t\t}\n\t\telse\n {\n // Security name\n var secname = document.getElementById( \"securityname\"); \n if( secname.value == null || trim(secname.value).length == 0)\n {\n alert( \"Please enter a security name\");\n secname.focus();\n return false;\n }\n\n //Find Security level, pass checks\n\t\t\tfor (var i = 0; i "); out.write( "< document.snmpwalk.seclevel.length; i++) \n\t\t\t{ \n\t\t\t\tseclevel = document.snmpwalk.seclevel[i].value;\n\t\t\t\tsecChecked = document.snmpwalk.seclevel[i].checked;\n\t\t\n\t\t\t\tif (secChecked){\n\t\t\t\t\tseclevelChecked = seclevel;\n\t\t\t\t}\n\t\n\t\t\t\tif ( (seclevel == \"AUTH_PRIV\") && (secChecked) )\n\t\t\t\t{\n\t\t\t\t\tif( !checkAuthPassFld() || !checkPrivPassFld())\n\t \t{ \t\n\t \t\treturn false;\n\t \t\t}\t\n\t\t\t\t}\n\t\t\t\telse\n\t \t{\n\t\t \t\t\tif( (seclevel == \"AUTH_NOPRIV\") && (secChecked && !checkAuthPassFld()) )\n\t\t \t{ \t\n\t\t \t\treturn false;\n\t\t \t\t}\n\t\t \t\t} \n\t\t\t} \n }\n\t \n\t\t// The following is needed to support Mozilla & IE browsers with retrieving values from drop-down boxes (version, authproto, privproto).\n\t\tvar versionSel = document.snmpwalk.version;\n\t\tvar versionVal = versionSel.options[ versionSel.selectedIndex].text;\t\n\t\tvar authprotoSel = document.snmpwalk.authproto;\n\t\tvar authprotoVal = authprotoSel.options[ authprotoSel.selectedIndex].text;\t\n\t\tvar privprotoSel = document.snmpwalk.privproto;\n"); out.write( "\t\tvar privprotoVal = privprotoSel.options[ privprotoSel.selectedIndex].text;\n\t\t\n\t\t// The followings are needed to avoid passing inappropriate SNMP version-dependent browser saved values to the servlet. \n\t\tvar authpassVal = document.snmpwalk.authpass.value; \n\t\tvar privpassVal = document.snmpwalk.privpass.value; \n\t\tvar communityStr = document.snmpwalk.cs.value;\n\t\t\n\t\tif (versionVal == \"version 3\")\n\t\t{\n\t\t\tcommunityStr = \"\";\n\t\t\tif (seclevelChecked == \"AUTH_NOPRIV\")\n\t\t\t{\n\t\t\t\tprivpassVal = \"\";\n\t\t\t\tprivprotoVal = \"\"; \n\t\t\t}\n\t\t\telse if (seclevelChecked == \"NOAUTH_NOPRIV\")\n\t\t\t{\n\t\t\t\tauthpassVal = \"\";\n\t\t\t\tauthprotoVal = \"\";\n\t\t\t\tprivpassVal = \"\";\n\t\t\t\tprivprotoVal = \"\"; \n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\tauthpassVal = \"\";\n\t\t\tauthprotoVal = \"\";\n\t\t\tprivpassVal = \"\";\n\t\t\tprivprotoVal = \"\"; \n\t\t}\n\t\t\n\t top.frames[1].document.snmpwalk.ip.value=document.snmpwalk.ip.value;\t \t\t\n\t top.frames[1].document.snmpwalk.oid.value=document.snmpwalk.oid.value;\t\n\t top.frames[1].document.snmpwalk.port.value=document.snmpwalk.port.value;\n\t top.frames[1].document.snmpwalk.retries.value=document.snmpwalk.retries.value;\n"); out.write( "\t top.frames[1].document.snmpwalk.timeout.value=document.snmpwalk.timeout.value;\n\t top.frames[1].document.snmpwalk.cs.value=communityStr;\t\t\n\t top.frames[1].document.snmpwalk.version.value=versionVal; \t\t\t\n\t top.frames[1].document.snmpwalk.securityname.value=document.snmpwalk.securityname.value; \n\t top.frames[1].document.snmpwalk.seclevel.value=seclevelChecked; \t\t\n\t top.frames[1].document.snmpwalk.authpass.value=authpassVal; \t\n\t top.frames[1].document.snmpwalk.authproto.value=authprotoVal; \t\n\t top.frames[1].document.snmpwalk.privpass.value=privpassVal; \t\n\t top.frames[1].document.snmpwalk.privproto.value=privprotoVal; \n\t top.frames[1].document.snmpwalk.button.value='GetResults';\n\t top.frames[1].document.snmpwalk.submit();\n\t \n\t return true; \n\t}\n\n\t// Validate ASN.1 value\n\tfunction validateLookup()\n\t{\n\t if (document.snmpwalk.desc.value == \"\" ) \n\t\t{\n\t\t alert (\"Please fill in ASN.1 Description (example: hrStorageDescr).\");\n\t\t return false;\n\t\t}\n\t\telse\n\t\t\treturn true;\n"); out.write( "\t}\n\t\n\t// Show MIB pop-up window\n\tfunction viewMIB()\n\t{\n\t if (document.snmpwalk.mibs.selectedIndex == -1 ) \n\t\t{\n\t\t alert (\"Please select a MIB to view.\");\n\t\t}\n\t\tvar mib = document.snmpwalk.mibs.options[document.snmpwalk.mibs.selectedIndex];\n\t var win = window.open('"); out.print(WTTools.getMibURL(request)); out.write( "' + mib.text, '', \n\t\t\t'status=yes,resizeable=yes,scrollbars=yes,menubar=yes,height=600,width=800');\t\n\t return false;\n\t}\n\t\n\t// hide element\n function hide( targetId)\n {\n if (document.getElementById)\n {\n target = document.getElementById(targetId);\n target.style.visibility = \"hidden\";\n target.style.display = \"none\";\n }\n }\n // show element\n function show( targetId)\n {\n if (document.getElementById)\n {\n target = document.getElementById(targetId);\n target.style.visibility = \"visible\";\n target.style.display = \"\";\n }\n }\n \n // Adjust frame\n function adjustFrames(topFrameSize)\n {\n \tvar framesSize = topFrameSize + \",*\";\n \tparent.document.getElementById(\"snmpframes\").rows = framesSize; \n }\n\n\t\n\t// Check for SNMPv3 selection\n\tfunction checkForSNMPv3()\n\t{\n\t\tvar sel = document.getElementById( \"version\");\n\t\tvar opt = sel.options[ sel.selectedIndex];\n\t\tif( opt.text == \"version 3\")\n"); out.write( "\t\t{\t\t\t\n\t\t\thide (\"csOptions\");\n\t\t\tshow (\"snmpOptions\"); \n\t\t\tadjustFrames(420);\n\t\t\tcheckSecLevel();\t\t\t\n\t\t}\n\t\telse\n\t\t{\t\t\t\n\t\t\tshow (\"csOptions\");\n\t\t\thide (\"snmpOptions\"); \n\t\t\thide (\"authOptions\"); \n\t\t\thide (\"privOptions\"); \n\t\t\tadjustFrames(270);\n\t\t}\n\n\t\t// This is work around for IE browsers which do not support "); out.write( "<option disabled>\n\t\t// This text will not appear for any other browsers as this option can never be selected \n\t\tif(( opt.text == \"SNMPv3 disabled\") || ( opt.text == \"SNMPv3 expired\"))\n\t\t{\n\t\t\talert(\"You are currently not licensed to use this feature. Please contact your sales representative for questions regarding this feature.\");\n\n\t\t\t// When the user selects SNMP v3 feature, select index is changed to version 1\n\t\t\tsel.selectedIndex = sel.options[sel.selectedIndex];\n\t\t}\n\t}\n\t\n\t// Check Auth Passphrase\n\tfunction checkAuthPassFld()\n {\n var authpass = document.getElementById( \"authpassfld\");\n if( authpass.value == null || authpass.value.length "); out.write( "< 8)\n {\n alert( \"Authentication Passphrase must be 8 characters or more\");\n authpass.focus();\n return false;\n }\n\n return true;\n }\n \n // Check Privacy Passphrase\n function checkPrivPassFld()\n {\n var privpass = document.getElementById( \"privpassfld\");\n if( privpass.value == null || privpass.value.length "); out.write( "< 8)\n {\n alert( \"Privacy Passphrase must be 8 characters or more\");\n privpass.focus();\n return false;\n }\n\n return true;\n }\n \n function checkSecLevel()\n { \n \tvar secLevelChecked; \t\n \tfor (var i = 0; i "); out.write( "< document.snmpwalk.seclevel.length; i++) \n\t\t{ \n\t\t\tvar seclevel = document.snmpwalk.seclevel[i].value;\n\t\t\tvar secChecked = document.snmpwalk.seclevel[i].checked;\n\t\t\tif ( secChecked )\n\t\t\t{\n\t\t\t\tsecLevelChecked = seclevel;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\tif ( secLevelChecked == \"AUTH_PRIV\" )\n\t\t{\n\t\t\tif( checkAuthPassFld() || checkPrivPassFld())\n \t{\n\t\t\t\tshowAuthPriv();\t\n\t\t\t}\n\t\t}\n\t\telse \n \t{\t \t\t\n\t \t\tif ( (secLevelChecked == \"AUTH_NOPRIV\") && checkAuthPassFld() )\n\t \t{\n\t \t\tshowAuth();\n\t \t\t}\n\t \t\telse \n\t \t{\n\t \t\thideAuthPriv();\n\t \t}\n \t\t} \n }\n \n \n\tfunction showAuthPriv()\n\t{\n\t\tshow( \"authOptions\");\n\t\tshow( \"privOptions\");\n\t}\n\t \n\t\n\tfunction showAuth()\n\t{\n\t\tshow( \"authOptions\");\n\t\thide( \"privOptions\");\n\t}\n\t \n\t\n\tfunction hideAuthPriv()\n\t{\n\t\thide( \"authOptions\");\n\t \thide( \"privOptions\");\n\t}\n\t\n\tfunction checkForSpaces( evt)\n {\n evt = (evt) ? evt : ((window.event) ? event : null);\n if( evt)\n {\n var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);\n"); out.write( " if( elem)\n {\n var charCode = (evt.charCode) ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode);\n return( charCode != 32);\n }\n }\n }\n\n\t"); out.write("</script>\n"); out.write("</head>\n\n\n"); out.write("<body onload='checkForSNMPv3()'>\n"); /* ---- c:import ---- */ org.apache.taglibs.standard.tag.el.core.ImportTag _jspx_th_c_import_0 = (org.apache.taglibs.standard.tag.el.core.ImportTag) _jspx_tagPool_c_import_url_context.get( org.apache.taglibs.standard.tag.el.core.ImportTag.class); _jspx_th_c_import_0.setPageContext(pageContext); _jspx_th_c_import_0.setParent(null); _jspx_th_c_import_0.setContext("/wt-monitor"); _jspx_th_c_import_0.setUrl("/includes/header.jsp"); int[] _jspx_push_body_count_c_import_0 = new int[] {0}; try { int _jspx_eval_c_import_0 = _jspx_th_c_import_0.doStartTag(); if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) { javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody(); _jspx_push_body_count_c_import_0[0]++; out = _bc; _jspx_th_c_import_0.setBodyContent(_bc); _jspx_th_c_import_0.doInitBody(); } do { out.write("\n\t"); if (_jspx_meth_c_param_0( _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return; out.write("\n\t"); if (_jspx_meth_c_param_1( _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return; out.write("\n\t"); if (_jspx_meth_c_param_2( _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return; out.write("\n\t"); if (_jspx_meth_c_param_3( _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return; out.write("\n"); int evalDoAfterBody = _jspx_th_c_import_0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) out = pageContext.popBody(); _jspx_push_body_count_c_import_0[0]--; } if (_jspx_th_c_import_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; } catch (Throwable _jspx_exception) { while (_jspx_push_body_count_c_import_0[0]-- > 0) out = pageContext.popBody(); _jspx_th_c_import_0.doCatch(_jspx_exception); } finally { _jspx_th_c_import_0.doFinally(); _jspx_tagPool_c_import_url_context.reuse(_jspx_th_c_import_0); } out.write("\n\n"); out.write("<!-- BEGIN FRAMING TABLE:open tags, keep at 100%-->\n"); out.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t"); out.write("<tr valign=\"top\">\n\t\t"); out.write("<td valign=\"top\" width=\"10\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\n\t\t"); out.write("<td>\n"); out.write("<!-- END FRAMING TABLE:open tags, keep at 100%-->\n\n"); out.write("<form action=\""); out.print(WTTools.getServletURL(request)); out.write("WTsnmpWalkServlet\" method=\"get\" name=\"snmpwalk\" autocomplete=\"off\">\n\n"); out.write( "<table width=\"100%\" valign=\"top\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\n "); out.write("<td width=\"32%\" valign=\"top\" bgcolor=\"#f0f0f0\">\n "); out.write("<!-- BEGIN WALK SNMP TABLES -->\n "); out.write( "<table width=\"100%\" valign=\"top\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n "); out.write("<tr class=\"tableHeader\">\n "); out.write("<td class=\"tableHeader\" colspan=\"2\">Walk an SNMP Agent"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" width=\"45%\">"); out.write("<b>IP Address:"); out.write("</b>"); out.write("<A class=\"tt\" HREF=\"javascript: towerTip("); out.print(WTTips.TIP_SNMP_IPADDR); out.write(");\" TITLE=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n "); out.write("<td class=\"tableText\" >"); out.write("<input type=\"text\" name=\"ip\" value=\""); out.print(strIp); out.write("\" size=\"23\">"); out.write("</td>\n "); out.write("</tr> \n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" width=\"45%\">"); out.write("<b>Starting OID:"); out.write("</b>"); out.write("<A class=\"tt\" HREF=\"javascript: towerTip("); out.print(WTTips.TIP_SNMP_START_OID); out.write(");\" TITLE=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n "); out.write("<td class=\"tableText\" >"); out.write("<input type=\"text\" size=\"23\" name=\"oid\" value=\""); out.print(strOID); out.write("\">"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" width=\"45%\">"); out.write("<b>Port:"); out.write("</b>"); out.write("<A class=\"tt\" HREF=\"javascript: towerTip("); out.print(WTTips.TIP_SNMP_PORT); out.write(");\" TITLE=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n "); out.write("<td class=\"tableText\" >"); out.write("<input type=\"text\" size=\"23\" maxlength=10 name=\"port\" value=\""); out.print(strPort); out.write("\" >"); out.write("</td> \t\t\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" width=\"45%\">"); out.write("<b>Retries:"); out.write("</b>"); out.write("<A class=\"tt\" HREF=\"javascript: towerTip("); out.print(WTTips.TIP_RETRIES); out.write(");\" TITLE=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n "); out.write("<td class=\"tableText\" >"); out.write("<input type=\"text\" size=\"4\" maxlength=10 name=\"retries\" value=\""); out.print(strRetries); out.write("\" >"); out.write("</td> \t\t\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" width=\"45%\">"); out.write("<b>Timeout(ms):"); out.write("</b>"); out.write("<A class=\"tt\" HREF=\"javascript: towerTip("); out.print(WTTips.TIP_TIMEOUT); out.write(");\" TITLE=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n "); out.write("<td class=\"tableText\" >"); out.write("<input type=\"text\" size=\"23\" maxlength=10 name=\"timeout\" value=\""); out.print(strTimeout); out.write("\" >"); out.write("</td> \t\t\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" width=\"45%\">"); out.write("<b>SNMP Version:"); out.write("</b>"); out.write("<A class=\"tt\" HREF=\"javascript: towerTip("); out.print(WTTips.TIP_SNMP_VERSION); out.write(");\" TITLE=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n "); out.write("<td class=\"tableText\" >\n \t"); out.write( "<select name=\"version\" id=\"version\" onclick=\"checkForSNMPv3()\">\n \t\t\t"); out.write("<option "); out.print(version.equals("version 1") ? "SELECTED" : ""); out.write(">version 1\n \t\t\t"); out.write("<option "); out.print(version.equals("version 2c") ? "SELECTED" : ""); out.write(">version 2c\n\t"); com.websina.license.LicenseManager lim = com.websina.license.LicenseManager.getInstance(); if (lim != null) { // Check if license is not null if (lim.isValid()) { // Check if license is valid if (((Boolean.valueOf( lim.getFeature(com.websina.license.License.WT_SECURE_SNMPV3_ENABLED_FIELD_NAME))) .booleanValue())) { // Check if feature is enabled if ((lim.daysLeft(com.websina.license.License.WT_SECURE_SNMPV3_EXPIRATION_FIELD_NAME) > 0) || (lim.daysLeft(com.websina.license.License.WT_SECURE_SNMPV3_EXPIRATION_FIELD_NAME) == -1)) { // Check if feature has expired (-1 indicates never expired) out.write("\t\t\t\t\n \t\t\t"); out.write("<option "); out.print(version.equals("version 3") ? "SELECTED" : ""); out.write(">version 3\n\t"); } else { out.write("\n\t\t\t\t\t\t\t"); out.write("<!-- The text for "); out.write( "<option disabled> tag is changed as a workaround for IE browsers -->\n\t\t\t\t"); out.write( "<!-- Although other browsers will not allow to select this option -->\n\t\t\t\t"); out.write( "<!-- IE lets you select it and hence call checkForSNMPv3() which displays a message that the feature is not enabled and select version 1 -->\n\t\t\t\t"); out.write("<!-- SNMPv3 enabled and expired -->\n\t\t\t\t"); out.write("<option disabled=\"disabled\" style=\"color:#aaa\">SNMPv3 expired"); out.write("</option>\n\t"); } } else { out.write("\n\t\t\t\t\t\t\t"); out.write("<!-- License is valid, SNMPv3 is disabled -->\n\t\t\t\t"); out.write("<option disabled=\"disabled\" style=\"color:#aaa\">SNMPv3 disabled"); out.write("</option>\n "); } } } out.write(" \n \t\t\t"); out.write("</select>\n "); out.write("</td>\n \t"); out.write("</tr>\n "); out.write("</table>\n \n "); out.write("<!-- COMMUNITY STRING OPTION -->\n \n "); out.write("<div id=\"csOptions\" style=\"visibility: visible\"> \n\t\t\t\t"); out.write( "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n \t"); out.write("<tr class=\"tableRowLight\">\n \t \t\t"); out.write("<td class=\"tableText\" width=\"45%\">"); out.write("<b>Community String:"); out.write("</b>"); out.write("<A class=\"tt\" HREF=\"javascript: towerTip("); out.print(WTTips.TIP_SNMP_COMMSTR); out.write(");\" TITLE=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n \t\t"); out.write("<td class=\"tableText\" >"); out.write("<input type=\"password\" name=\"cs\" value=\""); out.print(strCommunity); out.write("\" size=\"23\">"); out.write("</td>\n \t"); out.write("</tr>\n \t"); out.write("</table>\n "); out.write("</div>\n \n\t\t\t"); out.write("<!-- SNMP v3 OPTIONS --> \n \n\t\t\t"); out.write("<div id=\"snmpOptions\" style=\"display: none; visibility: hidden\"> \n\t\t\t\t"); out.write( "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t\t\t\n \t"); out.write("<!-- SNMP Version 3 Config Label -->\n \t"); out.write("<BR/>"); out.write("<HR width=\"95% align=\"center\">\n \t"); out.write("<tr class=\"tableRowLight\">\n \t\t"); out.write("<td class=\"tableText\" colspan=\"2\">"); out.write("<b>SNMP Version 3 Options"); out.write("</b>"); out.write("</td>\n \t"); out.write("</tr> \n \t\n \t"); out.write("<!-- Security Name -->\n \t"); out.write("<tr class=\"tableRowLight\">\n \t"); out.write("<td class=\"tableText\" width=\"45%\">"); out.write("<b>Security Name:"); out.write("</b>"); out.write("</td>\n \t"); out.write("<td class=\"tableText\" >"); out.write( "<INPUT type=\"text\" name=\"securityname\" id=\"securityname\" size=\"23\" maxlength=\"255\" value=\""); out.print(securityname); out.write("\" >"); out.write("</td>\n \t"); out.write("</tr> \n \t\n \t"); out.write("<!-- Security Level Options -->\n \t"); out.write("<tr class=\"tableRowLight\"> \n \t"); out.write("<td class=\"tableText\">"); out.write("<b>Security Level:"); out.write("</b>"); out.write("<A class=\"tt\" HREF=\"javascript: towerTip("); out.print(WTTips.TIP_SNMP_SECURITY_LEVEL); out.write(");\" TITLE=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n \t\t"); out.write("</tr>\n \t\t\n \t\t"); out.write("<!-- Authentication with Privacy radio button-->\n \t\t"); out.write("<tr class=\"tableRowLight\">\n \t"); out.write("<td class=\"tableText\" colspan=\"2\">\n \t\t"); out.write( "<input type=\"radio\" onClick=\"showAuthPriv();adjustFrames(600)\" name=\"seclevel\" id=\"authpriv\" \n \t\tvalue=\"AUTH_PRIV\" "); out.print("AUTH_PRIV".equals(seclevel) ? "CHECKED" : ""); out.write("> \n \t\tAuthentication with Privacy\n \t\t"); out.write("</td>\n \t\t"); out.write("</tr>\n \t\t\n \t\t"); out.write("<!-- Authentication without Privacy radio button-->\n \t\t"); out.write("<tr class=\"tableRowLight\"> \n \t"); out.write("<td class=\"tableText\" colspan=\"2\">\n \t\t"); out.write( "<input type=\"radio\" onClick=\"showAuth();adjustFrames(500)\" name=\"seclevel\" id=\"authnopriv\" \n \t\tvalue=\"AUTH_NOPRIV\" "); out.print("AUTH_NOPRIV".equals(seclevel) ? "CHECKED" : ""); out.write( "> \n \t\tAuthentication without Privacy\n \t\t"); out.write("</td>\n \t\t"); out.write("</tr> \n \t\t\n \t\t"); out.write("<!-- No Authentication and No Privacy radio button-->\n \t\t"); out.write("<tr class=\"tableRowLight\"> \n \t"); out.write("<td class=\"tableText\" colspan=\"2\">\n \t\t"); out.write( "<input type=\"radio\" onClick=\"hideAuthPriv();adjustFrames(420)\" name=\"seclevel\" id=\"noauthnopriv\" \n \t\tvalue=\"NOAUTH_NOPRIV\" "); out.print("NOAUTH_NOPRIV".equals(seclevel) ? "CHECKED" : ""); out.write( "> \n \t\tNo Authentication and no Privacy\n \t\t"); out.write("</td>\n \t\t"); out.write("</tr> \n \t\t\n \t"); out.write("</table>\n\t\t\t"); out.write("</div> \t\n \n\t\t\t"); out.write("<!-- Authentication Passphrase & Protocol-->\t\n\t\t\t"); out.write("<div id=\"authOptions\" style=\"display:none; visibility:hidden\"> \n\t\t\t\t"); out.write( "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n \t\t"); out.write("<br/>\n \t\t"); out.write("<!-- Authentication Passphrase -->\n \t\t"); out.write("<tr class=\"tableRowLight\"> \t\t\t \n \t\t"); out.write("<td class=\"tableText\" colspan=\"2\">"); out.write("<b>Authentication:"); out.write("</b>"); out.write("</td> \n \t\t"); out.write("</tr> \n \t\t"); out.write("<tr class=\"tableRowLight\"> \n \t\t\t"); out.write("<td class=\"tableText\" width=\"31%\">Passphrase"); out.write("<a class=\"tt\" href=\"javascript:towerTip("); out.print(WTTips.TIP_SNMP_AUTH_PASS); out.write(");\" title=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n \t"); out.write("<td class=\"tableText\" >"); out.write( "<input type=\"password\" name=\"authpass\" id=\"authpassfld\" size=\"18\" maxlength=\"255\" value=\""); out.print(authpass); out.write("\" > (min. 8 char.)"); out.write("</td>\n \t\t"); out.write("</tr>\n \t\t \t\t\n \t\t"); out.write("<!-- Authentication Protocol --> \t\t\n \t\t"); out.write("<tr class=\"tableRowLight\"> \n \t\t\t"); out.write("<td class=\"tableText\" width=\"31%\">Protocol"); out.write("<a class=\"tt\" href=\"javascript:towerTip("); out.print(WTTips.TIP_SNMP_AUTH_PROC); out.write(");\" title=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n \t"); out.write("<td class=\"tableText\" >\n \t\t"); out.write("<select name=\"authproto\" id=\"authprotofld\">\n \t\t\t\t"); out.write("<option "); out.print("MD5".equals(authproto) ? "SELECTED" : ""); out.write(">MD5"); out.write("</option>\n \t\t\t\t"); out.write("<option "); out.print("SHA".equals(authproto) ? "SELECTED" : ""); out.write(">SHA"); out.write("</option>\n \t\t\t\t"); out.write("</select> \t\t\t \n \t\t\t"); out.write("</td> \t \t\t\n \t\t"); out.write("</tr>\n \t\t"); out.write("</table>\n\t\t\t"); out.write("</div> \t\n \t\t\n "); out.write("<!-- Privacy Passphrase & Protocol--> \t\t\n\t \t"); out.write("<div id=\"privOptions\" style=\"display:none; visibility:hidden\"> \n\t\t\t\t"); out.write( "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n \t\t"); out.write("<br/> \t\t \t\t\n \t\t"); out.write("<!-- Privacy Passphrase -->\n \t\t"); out.write("<tr class=\"tableRowLight\">\n \t\t"); out.write("<td class=\"tableText\" colspan=\"2\">"); out.write("<b>Privacy:"); out.write("</b>"); out.write("</td>\n "); out.write("</tr> \t\t\n \t\t\n \t\t"); out.write("<tr class=\"tableRowLight\"> \n \t\t\t"); out.write("<td class=\"tableText\" width=\"31%\">Passphrase"); out.write("<a class=\"tt\" href=\"javascript:towerTip("); out.print(WTTips.TIP_SNMP_PRIV_PASS); out.write(");\" title=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n \t"); out.write("<td class=\"tableText\" >"); out.write( "<input type=\"password\" name=\"privpass\" id=\"privpassfld\" size=\"18\" maxlength=\"255\" value=\""); out.print(privpass); out.write("\" > (min. 8 char.)"); out.write("</td>\n \t\t"); out.write("</tr>\n \t\t \n \t\t"); out.write("<!-- Privacy Protocol --> \t\t\n \t\t"); out.write("<tr class=\"tableRowLight\"> \n \t\t\t"); out.write("<td class=\"tableText\" width=\"31%\">Protocol"); out.write("<a class=\"tt\" href=\"javascript:towerTip("); out.print(WTTips.TIP_SNMP_PRIV_PROC); out.write(");\" title=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n \t"); out.write("<td class=\"tableText\" > \t\t\n \t\t"); out.write("<select name=\"privproto\" id=\"privprotofld\">\n \t\t\t\t"); out.write("<option "); out.print("DES".equals(privproto) ? "SELECTED" : ""); out.write(">DES"); out.write("</option>\n \t\t\t\t"); out.write("<option "); out.print("AES 128".equals(privproto) ? "SELECTED" : ""); out.write(">AES 128"); out.write("</option>\n \t\t\t\t"); out.write("<option "); out.print("AES 192".equals(privproto) ? "SELECTED" : ""); out.write(">AES 192"); out.write("</option>\n \t\t\t\t"); out.write("<option "); out.print("AES 256".equals(privproto) ? "SELECTED" : ""); out.write(">AES 256"); out.write("</option>\n \t\t\t\t"); out.write("</select>\n \t\t\t"); out.write("</td> \t \t\t\n \t\t"); out.write("</tr> \n \t\t\t"); out.write("</table>\n\t\t\t"); out.write("</div> \t\t\n \n \t\t"); out.write("<!-- End of SNMP v3 OPTIONS --> \n \n \t"); out.write("<!-- SNMP Submit button -->\n\t\t\t"); out.write("<tr class=\"tableRowLight\">\n\t\t\t\t"); out.write("<td class=\"tableText\" colspan=\"2\">\n \t\t"); out.write("<INPUT type=\"hidden\" name=\"button\" value=\"\">\n\t\t\t\t\t"); out.write( "<INPUT type=\"image\" src=\"/wt-portal/images/buttons/btn_walk.gif\" onClick=\"document.snmpwalk.button.value='Walk'; return validateForm();\">\n \t\t\t"); out.write("</td>\n \t\t"); out.write("</tr>\n\t"); if (lim != null) { // Check if license is not null if (lim.isValid()) { // Check if license is valid if (((Boolean.valueOf( lim.getFeature(com.websina.license.License.WT_SECURE_SNMPV3_ENABLED_FIELD_NAME))) .booleanValue())) { // Check if feature is enabled if ((lim.daysLeft(com.websina.license.License.WT_SECURE_SNMPV3_EXPIRATION_FIELD_NAME) > 0) || (lim.daysLeft(com.websina.license.License.WT_SECURE_SNMPV3_EXPIRATION_FIELD_NAME) == -1)) { // Check if feature has expired (-1 indicates never expired) out.write("\t\t\n \t\t"); out.write("<!-- License valid, SNMPv3 enabled and expired -->\t\t\t\n \t\t"); out.write("<tr class=\"tableRowLight\">\n \t\t\t"); out.write("<td colspan=\"2\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"10\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\n \t\t"); out.write("</tr>\n "); } else { out.write("\n \t\t"); out.write("<!-- SNMPv3 enabled and expired -->\n \t\t"); out.write("<tr class=\"tableRowLight\">\n \t\t\t"); out.write("<td colspan=\"2\" class=\"tableText\">"); out.write("<span class=\"error\">Access to SNMP v3 has expired."); out.write("</span>"); out.write("<br> \n \t\t\t"); out.write("</td>\n\t\t\t"); out.write("</tr>\n "); } } else { out.write("\n \t\t"); out.write("<!-- License is valid, SNMPv3 is disabled -->\n \t\t"); out.write("<tr class=\"tableRowLight\">\n \t\t\t"); out.write("<td colspan=\"2\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"10\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\n \t\t"); out.write("</tr>\n "); } } } out.write(" \n\n\t\t\t"); out.write("</table>\n "); out.write("<!-- END WALK SNMP TABLES -->\n "); out.write("</td> \n \n "); out.write("<td valign=\"top\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"10\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\n "); out.write("<td valign=\"top\" bgcolor=\"#f0f0f0\">\n "); out.write("<!-- BEGIN MIB TABLE -->\n "); out.write( "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n "); out.write("<tr class=\"tableHeader\">\n "); out.write("<td class=\"tableHeader\">View MIBs"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\">\n \t"); out.write("<select name=mibs size=7>\n\t\t\t\t\t\t "); if (vMibs != null) { for (int j = 0; j < vMibs.size(); j++) { out.print("<OPTION>" + (String) vMibs.get(j)); } } out.write("\n\t\t\t\t\t "); out.write("</select>\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\">\n\t\t\t\t\t"); out.write( "<INPUT type=\"image\" src=\"/wt-portal/images/buttons/btn_view_MIB.gif\" onClick=\"document.snmpwalk.button.value='View MIB'; return viewMIB();\"> "); out.write( "<INPUT type=\"image\" src=\"/wt-portal/images/buttons/btn_reload_MIB.gif\" onClick=\"document.snmpwalk.button.value='Reload MIBs';\">"); out.write("</td>\n "); out.write("</tr>\n "); out.write("</table>\n "); out.write("<!-- END MIB TABLE -->\n "); out.write("</td>\n \n "); out.write("<td valign=\"top\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"10\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\n\t\t"); out.write("<td valign=\"top\" bgcolor=\"#f0f0f0\">\n "); out.write("<!-- BEGIN ASN TABLE -->\n "); out.write( "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n "); out.write("<tr class=\"tableHeader\">\n "); out.write("<td class=\"tableHeader\">Lookup ASN.1 Values By Name"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\">"); out.write("<INPUT type=\"text\" name=\"desc\" value=\""); out.print(strDesc); out.write("\" size=\"30\" >"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\">"); out.write("<textarea cols=\"30\" rows=\"5\">"); out.print(strASN1); out.write("</textarea>"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\">\n\t "); out.write( "<INPUT type=\"image\" src=\"/wt-portal/images/buttons/btn_lookup.gif\" onClick=\"document.snmpwalk.button.value='lookup'; return validateLookup();\">\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("</table>"); out.write("<BR>\n "); out.write("<!-- END ASN TABLE -->\n "); out.write("</td> \n \t"); out.write("<td valign=\"top\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"10\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td> \n "); out.write("</tr>\n"); out.write("</table>\n"); out.write("</form>\n"); out.write("<!-- BEGIN FRAMING TABLE:close tags-->\n\t\t"); out.write("</td>\n\t"); out.write("</tr>\n"); out.write("</table>\n"); out.write("<!-- END FRAMING TABLE:close tags--> \n "); out.write("</body>\n"); out.write("</html>\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=utf-8"); pageContext = _jspxFactory.getPageContext( this, request, response, "/jsp/GeneralError.jsp", true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n\n"); out.write("\n"); out.write("\n"); out.write("\n\n"); out.write("\n"); out.write("\n\n"); out.write("\n"); java.util.Date now = null; synchronized (pageContext) { now = (java.util.Date) pageContext.getAttribute("now", PageContext.PAGE_SCOPE); if (now == null) { try { now = (java.util.Date) java.beans.Beans.instantiate( this.getClass().getClassLoader(), "java.util.Date"); } catch (ClassNotFoundException exc) { throw new InstantiationException(exc.getMessage()); } catch (Exception exc) { throw new ServletException("Cannot create bean of class " + "java.util.Date", exc); } pageContext.setAttribute("now", now, PageContext.PAGE_SCOPE); } } out.write("\n\n"); out.write("\n"); out.write("<script type=\"text/javascript\" src=\""); if (_jspx_meth_c_url_0(pageContext)) return; out.write("\">"); out.write("</script>\n\n"); out.write("\n"); if (_jspx_meth_html_xhtml_0(pageContext)) return; out.write("\n"); out.write("\n\n"); out.write("\n"); out.write("\n"); out.write("\n\n\n\n"); out.write("<html>\n"); out.write("<head>\n "); out.write("<title>WebTelemetry - Admin Settings | System Management | License Management"); out.write("</title>\n "); out.write("<base HREF=\""); out.print(org.opennms.web.Util.calculateUrlBase(request)); out.write("\" />\n "); out.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\n "); out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">"); out.write("</script>\n"); out.write("</HEAD>\n\n"); out.write("<SCRIPT LANGUAGE=JAVASCRIPT>\nfunction checkError()\n{\n\t"); if (request.getSession().getAttribute("thErrorMsg") != null) { out.write("\n\talert(\""); out.print(request.getSession().getAttribute("thErrorMsg")); out.write("\");\n "); request.getSession().removeAttribute("thErrorMsg"); out.write("\n\t"); } out.write("\n\t"); if (request.getAttribute("thErrorMsg") != null) { out.write("\n\talert(\""); out.print(request.getAttribute("thErrorMsg")); out.write("\");\n "); request.removeAttribute("thErrorMsg"); out.write("\n\t"); } out.write("\n}\n"); out.write("</SCRIPT>\n"); out.write("<body onload=\"checkError();\">\n"); /* ---- c:import ---- */ org.apache.taglibs.standard.tag.el.core.ImportTag _jspx_th_c_import_0 = (org.apache.taglibs.standard.tag.el.core.ImportTag) _jspx_tagPool_c_import_url_context.get( org.apache.taglibs.standard.tag.el.core.ImportTag.class); _jspx_th_c_import_0.setPageContext(pageContext); _jspx_th_c_import_0.setParent(null); _jspx_th_c_import_0.setContext("/wt-monitor"); _jspx_th_c_import_0.setUrl("/includes/header.jsp"); int[] _jspx_push_body_count_c_import_0 = new int[] {0}; try { int _jspx_eval_c_import_0 = _jspx_th_c_import_0.doStartTag(); if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) { javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody(); _jspx_push_body_count_c_import_0[0]++; out = _bc; _jspx_th_c_import_0.setBodyContent(_bc); _jspx_th_c_import_0.doInitBody(); } do { out.write("\n "); if (_jspx_meth_c_param_0( _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return; out.write("\n "); if (_jspx_meth_c_param_1( _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return; out.write("\n "); if (_jspx_meth_c_param_2( _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return; out.write("\n"); int evalDoAfterBody = _jspx_th_c_import_0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) out = pageContext.popBody(); _jspx_push_body_count_c_import_0[0]--; } if (_jspx_th_c_import_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; } catch (Throwable _jspx_exception) { while (_jspx_push_body_count_c_import_0[0]-- > 0) out = pageContext.popBody(); _jspx_th_c_import_0.doCatch(_jspx_exception); } finally { _jspx_th_c_import_0.doFinally(); _jspx_tagPool_c_import_url_context.reuse(_jspx_th_c_import_0); } out.write("\n\n"); String errorMsg = (String) request.getAttribute("error"); if (errorMsg != null && !errorMsg.equals("")) { out.write("\n\n"); out.write("<table width=\"98%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n "); out.write("<tr class=\"tableHeader\">\n "); out.write("<td class=\"tableHeader\">Internal Error"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"error\" >\n "); out.write("<td class=\"error\">"); out.write("<br>"); out.print(errorMsg); out.write("\n "); out.write("<br />"); out.write("<br />"); out.write("<a href=\"mailto:[email protected]\">[email protected]"); out.write("</a>"); out.write("<br /> "); out.write("</td>\n "); out.write("</tr>\n"); out.write("</table>\n"); } out.write("\n\n"); out.write("<!-- BEGIN FRAMING TABLE:open tags, keep at 100%-->\n"); out.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t"); out.write("<tr>\n\t\t"); out.write("<td width=\"10\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"10\" border=\"0\" alt=\"WebTelemetry LLC\">"); out.write("</td>\n\t\t"); out.write("<td>\n"); out.write("<!-- END FRAMING TABLE:open tags, keep at 100%-->\n\n"); LicenseManager lim = (LicenseManager) request.getAttribute("licenseManager"); boolean valid = false; boolean bIsAdmin = ((Boolean) request.getAttribute("bIsAdmin")).booleanValue(); if (lim == null) { out.write("\n "); out.write("<p class=\"error\">License File not found!\n "); if (bIsAdmin) { out.write("\n Please install a license file to run WebTelemetry.\n "); } else { out.write( "\n Please contact your System Administrator to rectify this problem.\n "); } out.write("\n "); out.write("</p>\n"); } else { if (!lim.isSigValid()) { out.write("<p class=\"error\">License File corrupted!\n "); if (bIsAdmin) { out.write( "\n Please install a new license file to run WebTelemetry.\n "); } else { out.write( "\n Please contact your System Administrator to rectify this problem.\n "); } out.write("\n "); out.write("</p>"); } else if (lim.daysLeft() == 0) { out.write("<p class=\"error\">License File expired!\n\t "); if (bIsAdmin) { out.write( "\n\t Please install a license file to run WebTelemetry.\n\t "); } else { out.write( "\n\t Please contact your System Administrator to rectify this problem.\n\t "); } out.write("\n "); out.write("</p>"); } else { valid = true; } } out.write("\n"); out.write("<table width=\"98%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n"); if (bIsAdmin) { out.write("\n "); out.write("<tr>\n\t\t"); if (lim != null) { out.write("\n\t\t"); out.write("<td colspan=\"2\" align=\"right\" valign=\"top\">\n\t\t"); } else { out.write("\n\t\t"); out.write("<td colspan=\"2\" align=\"left\" valign=\"top\">"); out.write("<br>\n\t\t"); } out.write("\n\t\t"); out.write("<a href=\"/wt-core/license/manager.do?currentCommand="); out.print(WTLicenseForm.LICENSE_UPLOAD); out.write("\">"); out.write( "<img src=\"/wt-portal/images/buttons/btn_install_license.gif\" border=\"0\" alt=\"Install a New License\" vspace=\"4\">"); out.write("</a>\n "); out.write("<a class=\"tt\" href=\"javascript:towerTip("); out.print(WTTips.TIP_LICENSE_UPLOAD); out.write(");\" title=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>\n \n\t\t"); out.write("\n"); out.write("</td>"); out.write("</tr>\n"); } out.write("\n "); out.write("<tr>\n "); out.write("<td colspan=\"2\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"4\" width=\"10\" border=\"0\" alt=\"WebTelemetry LLC\">"); out.write("</td>\n "); out.write("</tr>\n\n"); if (lim != null) { String licStatus = valid ? "<span class='success'>Valid</span>" : "<span class='error'>Invalid</span>"; String exp = lim.getFeature(License.WT_EXPIRATION_FIELD_NAME); int trCount = -1; out.write("\n\t "); out.write("<tr class=\"tableHeader\">\n\t "); out.write("<td class=\"tableHeader\" width=\"70%\">Attribute"); out.write("<a class=\"tt\" href=\"javascript: towerTip("); out.print(WTTips.TIP_LICENSE_ATTRIBUTES); out.write(");\" title=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n\t "); out.write("<td class=\"tableHeader\" width=\"30%\">Value"); out.write("</td>\n\t "); out.write("</tr>\n\n "); String trColor = (++trCount % 2 == 0) ? "tableRowLight" : "tableRowDark"; out.write("\n\t "); out.write("<tr class=\""); out.print(trColor); out.write("\">\n\t "); out.write("<td class=\"tableText\">Support License"); out.write("</td>\n\t "); out.write("<td class=\"tableText\">"); out.print(licStatus); out.write("</td>\n\t "); out.write("</tr>\n\n "); trColor = (++trCount % 2 == 0) ? "tableRowLight" : "tableRowDark"; out.write("\n\t "); out.write("<tr class=\""); out.print(trColor); out.write("\">\n\t "); out.write("<td class=\"tableText\">Support Licensor"); out.write("</td>\n"); out.write("<!-- \n\t "); out.write("<td class=\"tableText\">"); out.print(lim.getFeature(License.WT_LICENSOR_FIELD_NAME)); out.write("</td>\n\t\t-->\n\t\t "); out.write("<td class=\"tableText\">WebTelemetry LLC"); out.write("</td>\n\t "); out.write("</tr>\n\n "); trColor = (++trCount % 2 == 0) ? "tableRowLight" : "tableRowDark"; out.write("\n\t "); out.write("<tr class=\""); out.print(trColor); out.write("\">\n\t "); out.write("<td class=\"tableText\">Support Licensee"); out.write("</td>\n\n"); out.write("<!--\n\t "); out.write("<td class=\"tableText\">"); out.print(lim.getFeature(License.WT_LICENSEE_FIELD_NAME)); out.write("</td>\n-->\n\t\t "); out.write("<td class=\"tableText\">WebTelemetry LLC"); out.write("</td>\n\n\t "); out.write("</tr>\n\n\n"); out.write("\n\n "); trColor = (++trCount % 2 == 0) ? "tableRowLight" : "tableRowDark"; out.write("\n\t "); out.write("<tr class=\""); out.print(trColor); out.write("\">\n\t "); out.write("<td class=\"tableText\">Discovery Engine"); out.write("</td>\n\t "); String safariStatus = (Integer.parseInt(lim.getFeature(License.WT_SAFARI_MASTER_ACCOUNT_ID_FIELD_NAME)) > 0 && Integer.parseInt(lim.getFeature(License.WT_SAFARI_USER_COUNT_FIELD_NAME)) > 0) ? "Enabled" : "Disabled"; if (!"Disabled".equals(safariStatus)) { int safariDaysLeft = lim.daysLeft(License.WT_SAFARI_EXPIRATION_FIELD_NAME); if (safariDaysLeft == 0) safariStatus = "Expired"; } out.write("\n\t "); out.write("<td class=\"tableText\">"); out.print(safariStatus); out.write("</td>\n\t "); out.write("</tr>\n\n\t "); if (!"Disabled".equals(safariStatus)) { out.write("\n "); trColor = (++trCount % 2 == 0) ? "tableRowLight" : "tableRowDark"; out.write("\n\t\t "); out.write("<tr class=\""); out.print(trColor); out.write("\">\n\t\t "); out.write("<td class=\"tableText\">Smart Discovery Expiration Date"); out.write("</td>\n\t\t "); out.write("<td class=\"tableText\">"); out.print(lim.getFeature(License.WT_SAFARI_EXPIRATION_FIELD_NAME)); out.write("\n\t\t "); out.write("</tr>\n\t "); } out.write(" \n"); } out.write("\n"); out.write("</table>\n\n"); out.write("<!-- BEGIN FRAMING TABLE:close tags-->\n\t\t"); out.write("</td>\n\t"); out.write("</tr>\n"); out.write("</table>\n"); out.write("<!-- END FRAMING TABLE:close tags-->\n"); out.write("<br>\n\n"); JspRuntimeLibrary.include( request, response, "../includes/footer.jsp" + "?" + "location=" + "admin" + "&" + "help=" + "WTHelp_License.html", out, false); out.write("\n\n "); out.write("</BODY>\n "); out.write("<!-- end list-organiztion.jsp -->\n"); out.write("</HTML>\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n\n"); out.write("\n\n"); try { this.model = ResponseTimeModel.instance(); } catch (Exception e) { throw new ServletException("Could not initialize the ResponseTimeModel", e); } ResponseTimeModel.QueryableNode[] nodes = this.model.getQueryableNodes(); out.write("\n\n"); out.write("<html>\n"); out.write("<head>\n "); out.write("<title>Response Time"); out.write("</title>\n "); out.write("<base HREF=\""); out.print(org.opennms.web.Util.calculateUrlBase(request)); out.write("\" />\n "); out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"includes/styles.css\" />\n"); out.write("</head>\n\n"); out.write( "<script language=\"Javascript\" type=\"text/javascript\" >\n function validateNode()\n {\n var isChecked = false\n for( i = 0; i "); out.write( "< document.choose_node.node.length; i++ )\n {\n //make sure something is checked before proceeding\n if (document.choose_node.node[i].selected)\n {\n isChecked=true;\n }\n }\n\n if (!isChecked)\n {\n alert(\"Please check the node that you would like to report on.\");\n }\n return isChecked;\n }\n\n function validateNodeAdhoc()\n {\n var isChecked = false\n for( i = 0; i "); out.write( "< document.choose_node_adhoc.node.length; i++ )\n {\n //make sure something is checked before proceeding\n if (document.choose_node_adhoc.node[i].selected)\n {\n isChecked=true;\n }\n }\n\n if (!isChecked)\n {\n alert(\"Please check the node that you would like to report on.\");\n }\n return isChecked;\n }\n\n function submitForm()\n {\n if (validateNode())\n {\n document.choose_node.submit();\n }\n }\n\n function submitFormAdhoc()\n {\n if (validateNodeAdhoc())\n {\n document.choose_node_adhoc.submit();\n }\n }\n"); out.write("</script>\n\n"); out.write("<body>\n\n"); String breadcrumb1 = "<a href='report/index.jsp'>Reports</a>"; out.write("\n"); String breadcrumb2 = "Response Time"; out.write("\n"); JspRuntimeLibrary.include( request, response, "/includes/header.jsp" + "?" + "title=" + "Response+Time" + "&" + "location=" + "response" + "&" + "breadcrumb=" + java.net.URLEncoder.encode("" + breadcrumb1) + "&" + "breadcrumb=" + java.net.URLEncoder.encode("" + breadcrumb2), out, false); out.write("\n\n"); out.write("<br>\n"); out.write("<!-- Body -->\n\n"); out.write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">\n "); out.write("<tr>\n "); out.write("<td> "); out.write("</td>\n\n "); out.write("<td valign=\"top\">\n "); out.write("<h3>Standard Response Time Reports"); out.write("</h3>\n\n "); out.write( "<form method=\"get\" name=\"choose_node\" action=\"response/addIntfFromNode\" >\n "); out.write("<p>Choose a node to generate a standard response time report on."); out.write("</p>\n "); out.write("<p>\n "); out.write( "<input type=\"hidden\" name=\"endUrl\" value=\"response/choosereportanddate.jsp\" />\n "); out.write("<select name=\"node\" size=\"10\">\n "); for (int i = 0; i < nodes.length; i++) { out.write("\n "); out.write("<option value=\""); out.print(nodes[i].nodeId); out.write("\">"); out.print(nodes[i].nodeLabel); out.write("</option>\n "); } out.write("\n "); out.write("</select>\n "); out.write("</p>\n "); out.write("<p>\n "); out.write("<input type=\"button\" value=\"Start\" onclick=\"submitForm()\"/>\n "); out.write("</p>\n "); out.write("</form>\n\n "); out.write("<h3>Custom Response Time Reports"); out.write("</h3>\n\n "); out.write( "<form method=\"get\" name=\"choose_node_adhoc\" action=\"response/adhoc.jsp\" >\n "); out.write("<p>Choose a node to generate a custom response time report on."); out.write("</p>\n "); out.write("<p>\n "); out.write("<select name=\"node\" size=\"10\">\n "); for (int i = 0; i < nodes.length; i++) { out.write("\n "); out.write("<option value=\""); out.print(nodes[i].nodeId); out.write("\">"); out.print(nodes[i].nodeLabel); out.write("</option>\n "); } out.write("\n "); out.write("</select>\n "); out.write("</p>\n "); out.write("<p>"); out.write("<input type=\"button\" value=\"Start\" onclick=\"submitFormAdhoc()\"/>"); out.write("</p>\n "); out.write("</form>\n "); out.write("</td>\n\n "); out.write("<td> "); out.write("</td>\n\n "); out.write("<td valign=\"top\" width=\"60%\">\n "); out.write("<h3>Network Response Time Data"); out.write("</h3>\n\n "); out.write("<p>The "); out.write("<strong>Standard Response Time Reports"); out.write( "</strong> provide a stock way to\n easily visualize the service response time data collected from managed nodes throughout\n your network.\n "); out.write("<p>\n\n "); out.write("<p>"); out.write("<strong>Custom Response Time Reports"); out.write( "</strong> can be used to produce a single\n graph that contains the data of your choice from a single interface or node.\n You can select the timeframe, line colors, line styles, and title of the graph\n and you can bookmark the results.\n "); out.write("</p>\n "); out.write("</td>\n\n "); out.write("<td> "); out.write("</td>\n "); out.write("</tr>\n"); out.write("</table>\n\n"); out.write("<br>\n\n"); JspRuntimeLibrary.include( request, response, "/includes/footer.jsp" + "?" + "location=" + "response", out, false); out.write("\n\n"); out.write("</body>\n"); out.write("</html>\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n\n"); out.write("\n\n"); PollerConfiguration pollconfig = getPollerConfiguration(); org.opennms.netmgt.config.poller.Package pkg = null; int pkgIdx = -1; String pkgIdxStr = (String) request.getParameter("pkgidx"); if (pkgIdxStr != null && pkgIdxStr.trim().length() > 0) { try { pkgIdx = Integer.parseInt(pkgIdxStr); if (pkgIdx >= 0) { if (pollconfig != null) { pkg = pollconfig.getPackage(pkgIdx); } } } catch (NumberFormatException ne) { ne.printStackTrace(); } } if (pkg == null) { if ((org.opennms.netmgt.config.poller.Package) request.getSession().getAttribute("pkg") != null) { pkg = (org.opennms.netmgt.config.poller.Package) request.getSession().getAttribute("pkg"); } } if (pkgIdx == -1) { pkgIdxStr = (String) request.getSession().getAttribute("pkgidx"); if (pkgIdxStr != null && pkgIdxStr.trim().length() > 0) { try { pkgIdx = Integer.parseInt(pkgIdxStr); } catch (NumberFormatException ne) { ne.printStackTrace(); } } } request.getSession().setAttribute("pkg", pkg); request.getSession().setAttribute("pkgidx", String.valueOf(pkgIdx)); String title = " Poller Package Downtime Model"; if (pkg != null) { title = " Poller Package - Downtime Model for: " + pkg.getName(); } out.write("\n\n"); out.write("<html>\n"); out.write("<head>\n "); out.write("<title>"); out.print(title); out.write("</title>\n "); out.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\n "); out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">"); out.write("</script>\n\n"); out.write( "<script language=javascript>\nfunction confirmDelete(msg)\n{\n\tvar agree=confirm(msg);\n\tif (agree)\n\t\treturn true;\n\telse\n\t\treturn false;\n}\n\nfunction addDowntime()\n{\n var msg = \"\";\n var error = false;\n var begin = 0;\n var end = 0;\n var interval = 0;\n\n dtbeginday = parseInt(document.downtime.dtbeginday.value) * 24 * 60 * 60 * 1000;\n dtbeginhour = parseInt(document.downtime.dtbeginhour.value) * 60 * 60 * 1000;\n dtbeginminute = parseInt(document.downtime.dtbeginminute.value) * 60 * 1000;\n dtbeginsecond = parseInt(document.downtime.dtbeginsecond.value) * 1000;\n dtbeginmillisecond = parseInt(document.downtime.dtbeginmillisecond.value);\n\n dtendday = parseInt(document.downtime.dtendday.value) * 24 * 60 * 60 * 1000;\n dtendhour = parseInt(document.downtime.dtendhour.value) * 60 * 60 * 1000;\n dtendminute = parseInt(document.downtime.dtendminute.value) * 60 * 1000;\n dtendsecond = parseInt(document.downtime.dtendsecond.value) * 1000;\n dtendmillisecond = parseInt(document.downtime.dtendmillisecond.value);\n"); out.write( "\n dtintervalday = parseInt(document.downtime.dtintervalday.value) * 24 * 60 * 60 * 1000;\n dtintervalhour = parseInt(document.downtime.dtintervalhour.value) * 60 * 60 * 1000;\n dtintervalminute = parseInt(document.downtime.dtintervalminute.value) * 60 * 1000;\n dtintervalsecond = parseInt(document.downtime.dtintervalsecond.value) * 1000;\n dtintervalmillisecond = parseInt(document.downtime.dtintervalmillisecond.value);\n\n document.downtime.dtbegin.value = dtbeginday + dtbeginhour + dtbeginminute + dtbeginsecond + dtbeginmillisecond;\n document.downtime.dtend.value = dtendday + dtendhour + dtendminute + dtendsecond + dtendmillisecond;\n document.downtime.dtinterval.value = dtintervalday + dtintervalhour + dtintervalminute + dtintervalsecond + dtintervalmillisecond;\n\n\tvar beginVal = trim(document.downtime.dtbegin.value);\n\tvar endVal = trim(document.downtime.dtend.value);\n\tvar intervalVal = trim(document.downtime.dtinterval.value);\n\n if (beginVal == \"\") {\n error = true;\n msg += \"Must enter a numeric time value for \\\"begin\\\".\\n\";\n"); out.write( " }\n if (endVal == \"\") {\n error = true;\n msg += \"\\nMust enter a numeric time value for \\\"end\\\".\\n\";\n }\n if (intervalVal == \"\") {\n error = true;\n msg += \"\\nMust enter a numeric time value for \\\"interval\\\".\\n\";\n }\n if (isNaN(beginVal)) {\n error = true;\n msg += \"\\nMust enter a numeric time value for \\\"begin\\\".\\n\";\n }\n if (isNaN(endVal)) {\n error = true;\n msg += \"\\nMust enter a numeric time value for \\\"end\\\".\\n\";\n }\n if (isNaN(intervalVal)) {\n error = true;\n msg += \"\\nMust enter a numeric time value for \\\"interval\\\".\\n\";\n }\n\n if (!error) {\n begin = parseInt(beginVal);\n end = parseInt(endVal);\n interval = parseInt(intervalVal);\n \n if (!(end > 0)) {\n error = true;\n msg = \"The end time must be greater than zero.\\n\";\n }\n if (!(interval > 0)) {\n error = true;\n msg += \"\\nThe 'interval' value must be greater than zero.\\n\";\n }\n"); out.write( " if (!((end - begin) > 0)) {\n error = true;\n msg += \"\\nThe 'end' time must be greater than the 'begin'.\\n\";\n }\n if (!(interval "); out.write( "<= (end - begin))) {\n error = true;\n msg += \"\\nThe 'interval' time must be less than the difference of the 'begin' and the 'end'.\\n\";\n }\n }\n\n if (error) {\n alert (msg);\n return;\n }\n else\n {\n document.downtime.target = \"pollerDetailFrame\";\n \tdocument.downtime.action.value = 'adddt';\n \tdocument.downtime.submit();\n }\n}\n\nfunction removeDowntime(dtidx)\n{\n if (confirmDelete('Are you sure you want to delete this downtime model?')) {\n document.downtime.target = \"pollerDetailFrame\";\n document.downtime.action.value = 'removedt';\n document.downtime.dtidx.value = dtidx;\n \tdocument.downtime.submit();\n }\n}\n\nfunction updateDowntime()\n{\n document.downtime.target = \"_parent\";\n document.downtime.action.value = 'updatedt';\n\tdocument.downtime.submit();\n}\n\nfunction restoreDefaultDowntime()\n{\n if (confirmDelete('Are you sure you want to restore the default downtime model? All your changes will be lost.')) {\n document.downtime.target = \"pollerDetailFrame\";\n"); out.write( " document.downtime.action.value = 'restoredt';\n \tdocument.downtime.submit();\n }\n}\n"); out.write("</script>\n"); out.write("</head>\n"); out.write("<body>\n\n\t"); String breadcrumb1 = "<a href='admin/index.jsp'></a>"; out.write("\n\t"); String breadcrumb2 = "Poller Packages"; out.write("\n\t"); JspRuntimeLibrary.include( request, response, "/includes/header.jsp" + "?" + "title=" + java.net.URLEncoder.encode("" + title) + "&" + "location=" + "admin" + "&" + "help=" + "monitoringadmin%2Fpolling%2FWTHelp_PollerPackageDowntimeModel.html" + "&" + "noPopOut=" + "true" + "&" + "breadcrumb=" + java.net.URLEncoder.encode("" + breadcrumb1) + "&" + "breadcrumb=" + java.net.URLEncoder.encode("" + breadcrumb2), out, false); out.write("\n"); out.write("<!-- BEGIN FRAMING TABLE:open tags, keep at 100%-->\n"); out.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t"); out.write("<tr>\n\t\t"); out.write("<td width=\"10\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\n\t\t"); out.write("<td>\n"); out.write("<!-- END FRAMING TABLE:open tags, keep at 100%-->\n\t"); out.write("<form action=\""); out.print(WTTools.getMonServletURL(request)); out.write("WTPollerPackages\" method=\"post\" name=\"downtime\" target=\"_parent\">\n\t "); out.write("<input type=\"hidden\" name=\"action\" value=\"\">\n\t "); out.write("<input type=\"hidden\" name=\"pkgidx\" value=\"\">\n\t "); out.write("<input type=\"hidden\" name=\"dtidx\" value=\"\">\n\t "); out.write("<input type=\"hidden\" name=\"dtbegin\" value=\"\">\n\t "); out.write("<input type=\"hidden\" name=\"dtend\" value=\"\">\n\t "); out.write("<input type=\"hidden\" name=\"dtinterval\" value=\"\">\n\n"); out.write("<table width=\"98%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n "); out.write("<tr>\n "); out.write("<td colspan=\"4\">"); out.write("<b>Downtime Model:"); out.write("</b>"); out.write("<a class=\"tt\" href=\"javascript: towerTip("); out.print(WTTips.TIP_POLLER_MON_SERVICE); out.write(");\" title=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableHeader\">\n "); out.write("<td class=\"tableHeader\" width=\"25%\">Begin Time"); out.write("<a class=\"tt\" href=\"javascript: towerTip("); out.print(WTTips.TIP_POLLER_DT_BEGIN); out.write(");\" title=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n "); out.write("<td class=\"tableHeader\" width=\"25%\">End Time"); out.write("<a class=\"tt\" href=\"javascript: towerTip("); out.print(WTTips.TIP_POLLER_DT_END); out.write(");\" title=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n "); out.write("<td class=\"tableHeader\" width=\"25%\">Polling Interval"); out.write("<a class=\"tt\" href=\"javascript: towerTip("); out.print(WTTips.TIP_POLLER_DT_INTERVAL); out.write(");\" title=\"Telemetry Tip\">"); out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">"); out.write("</a>"); out.write("</td>\n "); out.write("<td class=\"tableHeader\" width=\"25%\">Action"); out.write("</td>\n "); out.write("</tr>\n "); long daymilli = 24 * 60 * 60 * 1000; // 86400000 long hourmlli = 60 * 60 * 1000; // 3600000; long minutemilli = 60 * 1000; // 60000; long secondmilli = 1000; String pattern2digit = "00"; DecimalFormat df2digit = new DecimalFormat(pattern2digit); String pattern3digit = "000"; DecimalFormat df3digit = new DecimalFormat(pattern3digit); long begin = 0; long end = 0; long interval = 0; String delete = null; long addbegin = 0; if (pkg != null) { Downtime[] ds = pkg.getDowntime(); if (ds != null) { for (int i = 0; i < ds.length; i++) { Downtime d = ds[i]; begin = d.getBegin(); end = d.getEnd(); interval = d.getInterval(); delete = d.getDelete(); long dtbegin = begin; long dtend = end; long dtinterval = interval; addbegin = begin; long dtbeginday = 0; long dtbeginhour = 0; long dtbeginminute = 0; long dtbeginsecond = 0; long dtbeginmillisecond = 0; long dtendday = 0; long dtendhour = 0; long dtendminute = 0; long dtendsecond = 0; long dtendmillisecond = 0; long dtintervalday = 0; long dtintervalhour = 0; long dtintervalminute = 0; long dtintervalsecond = 0; long dtintervalmillisecond = 0; if (dtbegin > 0) { dtbeginday = dtbegin / daymilli; dtbegin -= (dtbeginday * daymilli); } if (dtbegin > 0) { dtbeginhour = dtbegin / hourmlli; dtbegin -= (dtbeginhour * hourmlli); } if (dtbegin > 0) { dtbeginminute = dtbegin / minutemilli; dtbegin -= (dtbeginminute * minutemilli); } if (dtbegin > 0) { dtbeginsecond = dtbegin / secondmilli; dtbegin -= (dtbeginsecond * secondmilli); } if (dtbegin > 0) { dtbeginmillisecond = dtbegin; } if (dtend > 0) { dtendday = dtend / daymilli; dtend -= (dtendday * daymilli); } if (dtend > 0) { dtendhour = dtend / hourmlli; dtend -= (dtendhour * hourmlli); } if (dtend > 0) { dtendminute = dtend / minutemilli; dtend -= (dtendminute * minutemilli); } if (dtend > 0) { dtendsecond = dtend / secondmilli; dtend -= (dtendsecond * secondmilli); } if (dtend > 0) { dtendmillisecond = dtend; } if (dtinterval > 0) { dtintervalday = dtinterval / daymilli; dtinterval -= (dtintervalday * daymilli); } if (dtinterval > 0) { dtintervalhour = dtinterval / hourmlli; dtinterval -= (dtintervalhour * hourmlli); } if (dtinterval > 0) { dtintervalminute = dtinterval / minutemilli; dtinterval -= (dtintervalminute * minutemilli); } if (dtinterval > 0) { dtintervalsecond = dtinterval / secondmilli; dtinterval -= (dtintervalsecond * secondmilli); } if (dtinterval > 0) { dtintervalmillisecond = dtinterval; } out.write("\n "); out.write("<!--\n \t\t"); out.write("<TR>\n \t\t"); out.write("<TD align=\"center\">\n \t\t"); out.write("<INPUT name=\"dtbegin_"); out.print(String.valueOf(i)); out.write("\" type=\"text\" value=\""); out.print(begin); out.write("\" disabled>\n \t\t"); out.write("</TD>\n \t\t"); out.write("<TD align=\"center\">"); out.write("<INPUT name=\"dtend_"); out.print(String.valueOf(i)); out.write("\" type=\"text\" value=\""); out.print(end); out.write("\" disabled>"); out.write("</TD>\n \t\t"); out.write("<TD align=\"center\">"); out.write("<INPUT name=\"dtinterval_"); out.print(String.valueOf(i)); out.write("\" type=\"text\" value=\""); out.print(interval); out.write("\" disabled>"); out.write("</TD>\n \t\t"); out.write("<TD align=\"center\">"); out.write("<INPUT name=\"dtdel_"); out.print(String.valueOf(i)); out.write("\" type=\"checkbox\" value=\"true\" "); if (delete != null && delete.equals("true")) { out.write("checked"); } out.write(" disabled>"); out.write("</TD>\n \t\t"); out.write("<TD align=\"center\">\n "); if ((i + 2) == ds.length) { out.write("\n "); out.write("<a HREF=\"javascript:removeDowntime('"); out.print(i); out.write("')\" title=\"Remove Downtime Model\">Remove"); out.write("</a>\n "); } else { out.write("\n \n "); } out.write("\n "); out.write("</TD>\n \t\t"); out.write("</TR>\n \t\t-->\n\n \t\t"); if (i < (ds.length - 1)) { out.write("\n "); out.write("<tr class=\""); out.print(((i % 2) == 0) ? "tableRowLIght" : "tableRowDark"); out.write("\">\n \t\t"); out.write("<td class=\"tableText\">\n \t\t"); out.print(dtbeginday); out.write(" days "); out.print(df2digit.format(dtbeginhour)); out.write(":"); out.print(df2digit.format(dtbeginminute)); out.write(":"); out.print(df2digit.format(dtbeginsecond)); out.write(":"); out.print(df3digit.format(dtbeginmillisecond)); out.write("\n "); out.write("</td>\n \t\t"); out.write("<td class=\"tableText\">\n \t\t "); out.print(dtendday); out.write(" days "); out.print(df2digit.format(dtendhour)); out.write(":"); out.print(df2digit.format(dtendminute)); out.write(":"); out.print(df2digit.format(dtendsecond)); out.write(":"); out.print(df3digit.format(dtendmillisecond)); out.write("\n "); out.write("</td>\n \t\t"); out.write("<td class=\"tableText\">\n \t\t"); out.print(dtintervalday); out.write(" days "); out.print(df2digit.format(dtintervalhour)); out.write(":"); out.print(df2digit.format(dtintervalminute)); out.write(":"); out.print(df2digit.format(dtintervalsecond)); out.write(":"); out.print(df3digit.format(dtintervalmillisecond)); out.write("\n "); out.write("</td>\n "); out.write("<td class=\"tableText\">\n "); if (i == (ds.length - 2)) { out.write("\n "); out.write("<a href=\"javascript:removeDowntime('"); out.print(i); out.write("')\" title=\"Remove Downtime Model\">Remove"); out.write("</a>"); out.write("</td>\n "); } out.write("\n "); out.write("</td>\n \t\t"); } else { out.write("\n\t\t\t\t\t\t"); out.write("<tr>"); out.write("<td colspan=\"3\"> "); out.write("</td>"); out.write("</tr>\n "); out.write("<tr class=\"tableHeader\">\n \t\t"); out.write("<td class=\"tableHeader\" colspan=\"3\">\n "); if ((delete == null || !delete.equals("true")) && end == 0 && interval > 0) { out.write("\n \t\tAfter\n \t\t"); out.write("<b>\n \t\t "); if (dtbeginday > 0) { out.print(dtbeginday); out.write(" days"); } out.write("\n \t\t "); if (dtbeginhour > 0) { out.print(dtbeginhour); out.write(" hr"); } out.write("\n \t\t "); if (dtbeginminute > 0) { out.print(dtbeginminute); out.write(" min"); } out.write("\n \t\t "); if (dtbeginsecond > 0) { out.print(dtbeginsecond); out.write(" sec"); } out.write("\n \t\t "); if (dtbeginmillisecond > 0) { out.print(dtbeginmillisecond); out.write(" ms"); } out.write("\n \t\t"); out.write( "</b>\n \t\tthe system will continue to poll downed nodes at a\n \t\t"); out.write("<b>\n \t\t "); if (dtintervalday > 0) { out.print(dtintervalday); out.write(" day"); } out.write("\n \t\t "); if (dtintervalhour > 0) { out.print(dtintervalhour); out.write(" hr"); } out.write("\n \t\t "); if (dtintervalminute > 0) { out.print(dtintervalminute); out.write(" min"); } out.write("\n \t\t "); if (dtintervalsecond > 0) { out.print(dtintervalsecond); out.write(" sec"); } out.write("\n \t\t "); if (dtintervalmillisecond > 0) { out.print(dtintervalmillisecond); out.write(" ms"); } out.write("\n "); out.write( "</b>\n interval.\n "); } out.write("\n "); out.write("</td>\n "); if (i == (ds.length - 2)) { out.write("\n "); } else { out.write("\n "); out.write("<td class=\"tableHeader\"> "); out.write("</td>\n "); } out.write("\n \t\t"); } out.write("\n \t\t"); out.write("</tr>\n \t\t"); } } } out.write("\n "); out.write("<!--\n \t"); out.write("<TR>\n \t"); out.write("<TD align=\"center\">"); out.write("<INPUT name=\"dtbegin\" type=\"text\" value=\""); out.print(begin); out.write("\" readonly>"); out.write("</TD>\n \t"); out.write("<TD align=\"center\">"); out.write("<INPUT name=\"dtend\" type=\"text\" value=\"\">"); out.write("</TD>\n \t"); out.write("<TD align=\"center\">"); out.write("<INPUT name=\"dtinterval\" type=\"text\" value=\"\">"); out.write("</TD>\n \t"); out.write("<TD align=\"center\">"); out.write("<INPUT name=\"dtdel\" type=\"checkbox\" value=\"true\" disabled>"); out.write("</TD>\n \t"); out.write("<TD align=\"center\">"); out.write("<a HREF=\"javascript:addDowntime()\" title=\"Add Downtime Model\">Add Downtime"); out.write("</a>"); out.write("</TD>\n \t"); out.write("</TR>\n \t-->\n \t"); long dtbeginday = 0; long dtbeginhour = 0; long dtbeginminute = 0; long dtbeginsecond = 0; long dtbeginmillisecond = 0; long dtendday = 0; long dtendhour = 0; long dtendminute = 0; long dtendsecond = 0; long dtendmillisecond = 0; long dtintervalday = 0; long dtintervalhour = 0; long dtintervalminute = 0; long dtintervalsecond = 0; long dtintervalmillisecond = 0; if (addbegin > 0) { dtbeginday = addbegin / daymilli; addbegin = addbegin - (dtbeginday * daymilli); } if (addbegin > 0) { dtbeginhour = addbegin / hourmlli; addbegin = addbegin - (dtbeginhour * hourmlli); } if (addbegin > 0) { dtbeginminute = addbegin / minutemilli; addbegin = addbegin - (dtbeginminute * minutemilli); } if (addbegin > 0) { dtbeginsecond = addbegin / secondmilli; addbegin = addbegin - (dtbeginsecond * secondmilli); } if (addbegin > 0) { dtbeginmillisecond = addbegin; } out.write("\n \t"); out.write("<tr class=\"tableRowLight\">\n \t"); out.write("<td>\n \t "); out.write("<input type=\"hidden\" name=\"dtbeginday\" value=\""); out.print(dtbeginday); out.write("\">\n \t "); out.write("<input type=\"hidden\" name=\"dtbeginhour\" value=\""); out.print(dtbeginhour); out.write("\">\n \t "); out.write("<input type=\"hidden\" name=\"dtbeginminute\" value=\""); out.print(dtbeginminute); out.write("\">\n \t "); out.write("<input type=\"hidden\" name=\"dtbeginsecond\" value=\""); out.print(dtbeginsecond); out.write("\">\n \t "); out.write("<input type=\"hidden\" name=\"dtbeginmillisecond\" value=\""); out.print(dtbeginmillisecond); out.write("\">\n \t "); out.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Days: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.print(dtbeginday); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Hours: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.print(dtbeginhour); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Minutes: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.print(dtbeginminute); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Seconds: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.print(dtbeginsecond); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Milliseconds: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.print(dtbeginmillisecond); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("</table>\n \t"); out.write("</td>\n \t"); out.write("<td>\n \t "); out.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Days: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.write("<select name=\"dtendday\">\n\t\t "); for (int i = 0; i <= 365; i++) { out.write("\n\t\t "); out.write("<option value="); out.print(i); out.write(" "); if (dtendday == i) { out.write("selected"); } out.write(">"); out.print(df3digit.format(i)); out.write("\n "); } out.write("\n\t\t "); out.write("</select>"); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Hours: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.write("<select name=\"dtendhour\">\n\t\t "); for (int i = 0; i < 24; i++) { out.write("\n\t\t "); out.write("<option value="); out.print(i); out.write(" "); if (dtendhour == i) { out.write("selected"); } out.write(">"); out.print(df3digit.format(i)); out.write("\n "); } out.write("\n\t\t "); out.write("</select>"); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Minutes: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.write("<select name=\"dtendminute\">\n\t\t "); for (int i = 0; i < 60; i++) { out.write("\n\t\t "); out.write("<option value="); out.print(i); out.write(" "); if (dtendminute == i) { out.write("selected"); } out.write(">"); out.print(df3digit.format(i)); out.write("\n "); } out.write("\n\t\t "); out.write("</select>"); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Seconds: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.write("<select name=\"dtendsecond\">\n\t\t "); for (int i = 0; i < 60; i++) { out.write("\n\t\t "); out.write("<option value="); out.print(i); out.write(" "); if (dtendsecond == i) { out.write("selected"); } out.write(">"); out.print(df3digit.format(i)); out.write("\n "); } out.write("\n\t\t "); out.write("</select>"); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Milliseconds: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.write("<select name=\"dtendmillisecond\">\n\t\t "); for (int i = 0; i < 1000; i++) { out.write("\n\t\t "); out.write("<option value="); out.print(i); out.write(" "); if (dtendmillisecond == i) { out.write("selected"); } out.write(">"); out.print(df3digit.format(i)); out.write("\n "); } out.write("\n\t\t "); out.write("</select>"); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("</table>\n\n \t"); out.write("</td>\n \t"); out.write("<td>\n \t "); out.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Days: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.write("<select name=\"dtintervalday\">\n\t\t "); for (int i = 0; i <= 365; i++) { out.write("\n\t\t "); out.write("<option value="); out.print(i); out.write(" "); if (dtintervalday == i) { out.write("selected"); } out.write(">"); out.print(df3digit.format(i)); out.write("\n "); } out.write("\n\t\t "); out.write("</select>"); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Hours: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.write("<select name=\"dtintervalhour\">\n\t\t "); for (int i = 0; i < 24; i++) { out.write("\n\t\t "); out.write("<option value="); out.print(i); out.write(" "); if (dtintervalhour == i) { out.write("selected"); } out.write(">"); out.print(df3digit.format(i)); out.write("\n "); } out.write("\n\t\t "); out.write("</select>"); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Minutes: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.write("<select name=\"dtintervalminute\">\n\t\t "); for (int i = 0; i < 60; i++) { out.write("\n\t\t "); out.write("<option value="); out.print(i); out.write(" "); if (dtintervalminute == i) { out.write("selected"); } out.write(">"); out.print(df3digit.format(i)); out.write("\n "); } out.write("\n\t\t "); out.write("</select>"); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Seconds: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.write("<select name=\"dtintervalsecond\">\n\t\t "); for (int i = 0; i < 60; i++) { out.write("\n\t\t "); out.write("<option value="); out.print(i); out.write(" "); if (dtintervalsecond == i) { out.write("selected"); } out.write(">"); out.print(df3digit.format(i)); out.write("\n "); } out.write("\n\t\t "); out.write("</select>"); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("<tr class=\"tableRowLight\">\n \t "); out.write("<td nowrap>Milliseconds: "); out.write("</td>\n \t "); out.write("<td nowrap>"); out.write("<select name=\"dtintervalmillisecond\">\n\t\t "); for (int i = 0; i < 1000; i++) { out.write("\n\t\t "); out.write("<option value="); out.print(i); out.write(" "); if (dtintervalmillisecond == i) { out.write("selected"); } out.write(">"); out.print(df3digit.format(i)); out.write("\n "); } out.write("\n\t\t "); out.write("</select>"); out.write("</td>\n \t "); out.write("</tr>\n \t "); out.write("</table>\n \t"); out.write("</td>\n \t"); out.write("<!--\n \t"); out.write("<TD align=\"center\">\n \t"); out.write("<INPUT name=\"dtdel\" type=\"checkbox\" value=\"true\" disabled>\n \t"); out.write("</TD>\n \t-->\n \t"); out.write("<td align=\"center\" nowrap>"); out.write("<a href=\"javascript:addDowntime()\" title=\"Add Downtime Model\">Add Downtime"); out.write("</a>"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr class=\"tableRowLight\">\n "); out.write("<td class=\"tableText\" colspan=\"4\">"); out.write( "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"4\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr>\n "); out.write("<td colspan=\"4\">"); out.write("<br />\n "); out.write("<a href=\"javascript:restoreDefaultDowntime()\">"); out.write( "<img src=\"/wt-portal/images/buttons/btn_restore_defaults.gif\" border=\"0\" alt=\"Restore Defaults\">"); out.write("</a>\n \n "); out.write("<!--"); out.write( "<input type=\"submit\" name=\"button\" onclick=\"return restoreDefaultDowntime()\" value=\"Restore Defaults\" title=\"Restore Downtime Model Defaults\">-->"); out.write("<br />\n "); out.write("</td>\n "); out.write("</tr>\n"); out.write("</table>\n"); out.write("</form>\n"); out.write("<!-- BEGIN FRAMING TABLE:close tags-->\n\t\t"); out.write("</td>\n\t"); out.write("</tr>\n"); out.write("</table>\n"); out.write("<!-- END FRAMING TABLE:close tags-->\n"); out.write("<p>\n"); JspRuntimeLibrary.include( request, response, "/includes/footer.jsp" + "?" + "location=" + "admin", out, false); out.write("\n\n "); out.write("</body>\n"); out.write("</html>\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=utf-8"); pageContext = _jspxFactory.getPageContext( this, request, response, "/jsp/GeneralError.jsp", true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n"); out.write("\n\n"); out.write("\n"); out.write("\n"); out.write("\n\n"); out.write("\n"); out.write("\n\n"); out.write("\n"); java.util.Date now = null; synchronized (pageContext) { now = (java.util.Date) pageContext.getAttribute("now", PageContext.PAGE_SCOPE); if (now == null) { try { now = (java.util.Date) java.beans.Beans.instantiate( this.getClass().getClassLoader(), "java.util.Date"); } catch (ClassNotFoundException exc) { throw new InstantiationException(exc.getMessage()); } catch (Exception exc) { throw new ServletException("Cannot create bean of class " + "java.util.Date", exc); } pageContext.setAttribute("now", now, PageContext.PAGE_SCOPE); } } out.write("\n\n"); out.write("\n"); out.write("<script type=\"text/javascript\" src=\""); if (_jspx_meth_c_url_0(pageContext)) return; out.write("\">"); out.write("</script>\n\n"); out.write("\n"); if (_jspx_meth_html_xhtml_0(pageContext)) return; out.write("\n"); out.write("\n\n\n"); out.write("\n"); out.write("<!--"); out.write("<table border=\"1\">\n "); out.write("<tr>\n "); out.write("<td>\n "); out.write("<u>"); if (_jspx_meth_fmt_message_0(pageContext)) return; out.write("</u>"); out.write("<br/>"); out.write("<br/>-->\n "); out.write("<span class=\"error\">"); if (_jspx_meth_fmt_message_1(pageContext)) return; out.write("</span>\n "); out.write("<br/>\n "); out.write("<!--"); out.write("</td>\n "); out.write("</tr>\n"); out.write("</table>-->\n\n"); /* ---- c:if ---- */ org.apache.taglibs.standard.tag.el.core.IfTag _jspx_th_c_if_0 = (org.apache.taglibs.standard.tag.el.core.IfTag) _jspx_tagPool_c_if_test.get(org.apache.taglibs.standard.tag.el.core.IfTag.class); _jspx_th_c_if_0.setPageContext(pageContext); _jspx_th_c_if_0.setParent(null); _jspx_th_c_if_0.setTest("${not empty querygroupresult}"); int _jspx_eval_c_if_0 = _jspx_th_c_if_0.doStartTag(); if (_jspx_eval_c_if_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\n"); out.write("<table>\n\t"); /* ---- c:forEach ---- */ org.apache.taglibs.standard.tag.el.core.ForEachTag _jspx_th_c_forEach_0 = (org.apache.taglibs.standard.tag.el.core.ForEachTag) _jspx_tagPool_c_forEach_var_items.get( org.apache.taglibs.standard.tag.el.core.ForEachTag.class); _jspx_th_c_forEach_0.setPageContext(pageContext); _jspx_th_c_forEach_0.setParent(_jspx_th_c_if_0); _jspx_th_c_forEach_0.setItems("${querygroupresult.resultItems}"); _jspx_th_c_forEach_0.setVar("resultitem"); int[] _jspx_push_body_count_c_forEach_0 = new int[] {0}; try { int _jspx_eval_c_forEach_0 = _jspx_th_c_forEach_0.doStartTag(); if (_jspx_eval_c_forEach_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\n "); out.write("\n "); out.write("\n "); out.write("<tr valign=\"top\">\n "); out.write("<td width=\"60%\">"); out.write("<b>"); if (_jspx_meth_fmt_message_2( _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return; out.write(":"); out.write("</b>"); out.write("</td>\n "); out.write("<td width=\"40%\">"); if (_jspx_meth_c_out_0( _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return; out.write("</td>\n "); out.write("</tr>\n \n "); out.write("\n "); out.write("<tr valign=\"top\">\n "); out.write("<td width=\"60%\">"); out.write("<b>"); if (_jspx_meth_fmt_message_3( _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return; out.write(":"); out.write("</b>"); out.write("</td>\n "); out.write("<td width=\"40%\">"); if (_jspx_meth_c_out_1( _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return; out.write("</td>\n "); out.write("</tr>\n \n "); out.write("\n "); out.write("<tr valign=\"top\">\n "); out.write("<td width=\"60%\">"); out.write("<b>"); if (_jspx_meth_fmt_message_4( _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return; out.write(":"); out.write("</b>"); out.write("</td>\n "); out.write("<td width=\"40%\">"); if (_jspx_meth_fmt_formatNumber_0( _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return; out.write("</td>\n "); out.write("</tr>\n \n "); if (_jspx_meth_c_if_1( _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return; out.write("\n \n "); out.write("\n "); out.write("<tr valign=\"top\">\n "); out.write("<td width=\"60%\">"); out.write("<b>"); if (_jspx_meth_fmt_message_7( _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return; out.write("</b>"); out.write("</td>\n "); out.write("<td width=\"40%\">\n \t"); if (_jspx_meth_c_choose_0( _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return; out.write("\n\n "); out.write("</td>\n "); out.write("</tr>\n \n"); out.write(" \n"); out.write("\n "); int evalDoAfterBody = _jspx_th_c_forEach_0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_forEach_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; } catch (Throwable _jspx_exception) { while (_jspx_push_body_count_c_forEach_0[0]-- > 0) out = pageContext.popBody(); _jspx_th_c_forEach_0.doCatch(_jspx_exception); } finally { _jspx_th_c_forEach_0.doFinally(); _jspx_tagPool_c_forEach_var_items.reuse(_jspx_th_c_forEach_0); } out.write("\n"); out.write("</table>\n"); int evalDoAfterBody = _jspx_th_c_if_0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_if_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; _jspx_tagPool_c_if_test.reuse(_jspx_th_c_if_0); out.write("\n\n\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html; charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, "/error.jsp", true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); /** This include page ensures that the handler exists and is ready to be accessed. */ CrawlJobHandler handler = (CrawlJobHandler) application.getAttribute("handler"); Heritrix heritrix = (Heritrix) application.getAttribute("heritrix"); // If handler is empty then this is the first time this bit of code is // being run since the server came online. In that case get or create the // handler. if (handler == null) { if (Heritrix.isSingleInstance()) { heritrix = Heritrix.getSingleInstance(); handler = heritrix.getJobHandler(); application.setAttribute("heritrix", heritrix); application.setAttribute("handler", handler); } else { // TODO: // If we get here, then there are multiple heritrix instances // and we have to put up a screen allowing the user choose between. // Otherwise, there is no Heritrix instance. Thats a problem. throw new RuntimeException( "No heritrix instance (or multiple " + "to choose from and we haven't implemented this yet)"); } } // ensure controller's settingsHandler is always thread-installed // in web ui threads if (handler != null) { CrawlJob job = handler.getCurrentJob(); if (job != null) { CrawlController controller = job.getController(); if (controller != null) { controller.installThreadContextSettingsHandler(); } } } out.write("\n"); out.write("\n\n"); String title = "Help"; int tab = 6; out.write("\n\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); String currentHeritrixName = (heritrix == null) ? "No current Heritrix instance" : (heritrix.getMBeanName() == null) ? heritrix.getInstances().keySet().iterator().next().toString() : heritrix.getMBeanName().toString(); /** * An include file that handles the "look" and navigation of a web page. Include at top (where * you would normally begin the HTML code). If used, the include "foot.jsp" should be included * at the end of the HTML code. It will close any table, body and html tags left open in this * one. Any custom HTML code is thus placed between the two. * * <p>The following variables must exist prior to this file being included: * * <p>String title - Title of the web page int tab - Which to display as 'selected'. 0 - * Console 1 - Jobs 2 - Profiles 3 - Logs 4 - Reports 5 - Settings 6 - Help * * <p>SimpleHandler handler - In general this is provided by the include page 'handler.jsp' * which should be included prior to this one. * * @author Kristinn Sigurdsson */ String shortJobStatus = null; if (handler.getCurrentJob() != null) { shortJobStatus = TextUtils.getFirstWord(handler.getCurrentJob().getStatus()); } String favicon = System.getProperties().getProperty("heritrix.favicon", "h.ico"); out.write("\n"); StatisticsTracker stats = null; if (handler.getCurrentJob() != null) { // Assume that StatisticsTracker is being used. stats = (StatisticsTracker) handler.getCurrentJob().getStatisticsTracking(); } out.write("\n"); out.write("\n\n"); out.write("<html>\n "); out.write("<head>\n \t"); out.write( "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n "); out.write("<title>Heritrix: "); out.print(title); out.write("</title>\n "); out.write("<link rel=\"stylesheet\" \n href=\""); out.print(request.getContextPath()); out.write("/css/heritrix.css\">\n "); out.write("<link rel=\"icon\" href=\""); out.print(request.getContextPath()); out.write("/images/"); out.print(favicon); out.write("\" type=\"image/x-icon\" />\n "); out.write("<link rel=\"shortcut icon\" href=\""); out.print(request.getContextPath()); out.write("/images/"); out.print(favicon); out.write("\" type=\"image/x-icon\" />\n "); out.write("<script src=\"/js/util.js\">\n "); out.write("</script>\n "); out.write("</head>\n\n "); out.write("<body>\n "); out.write( "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n "); out.write("<tr>\n "); out.write("<td>\n "); out.write( "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"100%\">\n "); out.write("<tr>\n "); out.write( "<td height=\"60\" width=\"155\" valign=\"top\" nowrap>\n "); out.write( "<table border=\"0\" width=\"155\" cellspacing=\"0\" cellpadding=\"0\" height=\"60\">\n "); out.write("<tr>\n "); out.write( "<td align=\"center\" height=\"40\" valign=\"bottom\">\n "); out.write("<a border=\"0\" \n href=\""); out.print(request.getContextPath()); out.write("/index.jsp\">"); out.write("<img border=\"0\" src=\""); out.print(request.getContextPath()); out.write("/images/logo.gif\" height=\"37\" width=\"145\">"); out.write("</a>\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr>\n "); out.write("<td class=\"subheading\">\n "); out.print(title); out.write("\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("</table>\n "); out.write("</td>\n "); out.write( "<td width=\"5\" nowrap>\n \n "); out.write("</td>\n "); out.write("<td width=\"460\" align=\"left\" nowrap>\n "); out.write( "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"60\">\n "); out.write("<tr>\n "); out.write("<td colspan=\"2\" nowrap>\n "); SimpleDateFormat sdf = new SimpleDateFormat("MMM. d, yyyy HH:mm:ss"); sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT")); out.write("\n "); out.write("<b>\n Status as of "); out.write("<a style=\"color: #000000\" href=\""); out.print(request.getRequestURL()); out.write("\">"); out.print(sdf.format(new java.util.Date())); out.write(" GMT"); out.write("</a>\n "); out.write( "</b>\n \n "); out.write("<span style=\"text-align:right\">\n "); out.write( "<b>\n Alerts: \n "); out.write("</b>\n "); if (heritrix.getAlertsCount() == 0) { out.write("\n "); out.write("<a style=\"color: #000000; text-decoration: none\" href=\""); out.print(request.getContextPath()); out.write("/console/alerts.jsp\">no alerts"); out.write("</a>\n "); } else if (heritrix.getNewAlertsCount() > 0) { out.write("\n "); out.write("<b>"); out.write("<a href=\""); out.print(request.getContextPath()); out.write("/console/alerts.jsp\">"); out.print(heritrix.getAlerts().size()); out.write(" ("); out.print(heritrix.getNewAlertsCount()); out.write(" new)"); out.write("</a>"); out.write("</b>\n "); } else { out.write("\n "); out.write("<a style=\"color: #000000\" href=\""); out.print(request.getContextPath()); out.write("/console/alerts.jsp\">"); out.print(heritrix.getAlertsCount()); out.write(" ("); out.print(heritrix.getNewAlertsCount()); out.write(" new)"); out.write("</a>\n "); } out.write("\n "); out.write("</span>\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr>\n "); out.write("<td valign=\"top\" nowrap>\n\t\t\t\t\t\t\t\t\t\t"); out.print( handler.isRunning() ? "<span class='status'>Crawling Jobs</span>" : "<span class='status'>Holding Jobs</span>"); out.write("<i> "); out.write("</i>\n\t\t\t\t\t\t\t\t\t\t"); out.write("</td>\n\t\t\t\t\t\t\t\t\t\t"); out.write("<td valign=\"top\" align=\"right\" nowrap>\n\t\t\t\t\t\t\t\t\t\t"); if (handler.isRunning() || handler.isCrawling()) { if (handler.getCurrentJob() != null) { out.write("\n\t\t\t\t\t\t\t\t\t\t"); out.write("<span class='status'>\n\t\t\t\t\t\t\t\t\t\t"); out.print(shortJobStatus); out.write("</span> job:\n\t\t\t\t\t\t\t\t\t\t"); out.write("<i>"); out.print(handler.getCurrentJob().getJobName()); out.write("</i>\n\t\t\t\t\t\t\t\t\t\t"); } else { out.println("No job ready <a href=\""); out.println(request.getContextPath()); out.println("/jobs.jsp\" style='color: #000000'>(create new)</a>"); } } out.write("\n\t\t\t\t\t\t\t\t\t\t"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr>\n "); out.write("<td nowrap>\n "); out.print(handler.getPendingJobs().size()); out.write( "\n jobs\n "); out.write("<a style=\"color: #000000\" href=\""); out.print(request.getContextPath()); out.write("/jobs.jsp#pending\">pending"); out.write("</a>,\n "); out.print(handler.getCompletedJobs().size()); out.write("\n "); out.write("<a style=\"color: #000000\" href=\""); out.print(request.getContextPath()); out.write("/jobs.jsp#completed\">completed"); out.write( "</a>\n \n "); out.write("</td>\n "); out.write("<td nowrap align=\"right\">\n "); if (handler.isCrawling()) { out.write("\n "); out.print((stats != null) ? stats.successfullyFetchedCount() : 0); out.write(" URIs in \n\t\t "); out.print( ArchiveUtils.formatMillisecondsToConventional( ((stats != null) ? (stats.getCrawlerTotalElapsedTime()) : 0), false)); out.write("\n\t\t ("); out.print( ArchiveUtils.doubleToString( ((stats != null) ? stats.currentProcessedDocsPerSec() : 0), 2)); out.write("/sec)\n "); } out.write("\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("</table>\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("</table>\n "); out.write("</td>\n "); out.write("<td width=\"100%\" nowrap>\n \n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr>\n "); out.write("<td bgcolor=\"#0000FF\" height=\"1\" colspan=\"4\">\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr>\n "); out.write("<td colspan=\"4\" height=\"20\">\n "); out.write( "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" height=\"20\">\n "); out.write("<tr>\n "); out.write("<td class=\"tab_seperator\"> "); out.write("</td>\n "); out.write("<td class=\"tab"); out.print(tab == 0 ? "_selected" : ""); out.write("\">\n "); out.write("<a href=\""); out.print(request.getContextPath()); out.write("/index.jsp\" class=\"tab_text"); out.print(tab == 0 ? "_selected" : ""); out.write("\">Console"); out.write("</a>\n "); out.write("</td>\n "); out.write("<td class=\"tab_seperator\"> "); out.write("</td>\n "); out.write("<td class=\"tab"); out.print(tab == 1 ? "_selected" : ""); out.write("\">\n "); out.write("<a href=\""); out.print(request.getContextPath()); out.write("/jobs.jsp\" class=\"tab_text"); out.print(tab == 1 ? "_selected" : ""); out.write("\">Jobs"); out.write("</a>\n "); out.write("</td>\n "); out.write("<td class=\"tab_seperator\"> "); out.write("</td>\n "); out.write("<td class=\"tab"); out.print(tab == 2 ? "_selected" : ""); out.write("\">\n "); out.write("<a href=\""); out.print(request.getContextPath()); out.write("/profiles.jsp\" class=\"tab_text"); out.print(tab == 2 ? "_selected" : ""); out.write("\">Profiles"); out.write("</a>\n "); out.write("</td>\n "); out.write("<td class=\"tab_seperator\"> "); out.write("</td>\n "); out.write("<td class=\"tab"); out.print(tab == 3 ? "_selected" : ""); out.write("\">\n "); out.write("<a href=\""); out.print(request.getContextPath()); out.write("/logs.jsp\" class=\"tab_text"); out.print(tab == 3 ? "_selected" : ""); out.write("\">Logs"); out.write("</a>\n "); out.write("</td>\n "); out.write("<td class=\"tab_seperator\"> "); out.write("</td>\n "); out.write("<td class=\"tab"); out.print(tab == 4 ? "_selected" : ""); out.write("\">\n "); out.write("<a href=\""); out.print(request.getContextPath()); out.write("/reports.jsp\" class=\"tab_text"); out.print(tab == 4 ? "_selected" : ""); out.write("\">Reports"); out.write("</a>\n "); out.write("</td>\n "); out.write("<td class=\"tab_seperator\"> "); out.write("</td>\n "); out.write("<td class=\"tab"); out.print(tab == 5 ? "_selected" : ""); out.write("\">\n "); out.write("<a href=\""); out.print(request.getContextPath()); out.write("/setup.jsp\" class=\"tab_text"); out.print(tab == 5 ? "_selected" : ""); out.write("\">Setup"); out.write("</a>\n "); out.write("</td>\n "); out.write("<td class=\"tab_seperator\"> "); out.write("</td>\n "); out.write("<td class=\"tab"); out.print(tab == 6 ? "_selected" : ""); out.write("\">\n "); out.write("<a href=\""); out.print(request.getContextPath()); out.write("/help.jsp\" class=\"tab_text"); out.print(tab == 6 ? "_selected" : ""); out.write("\">Help"); out.write("</a>\n "); out.write("</td>\n "); out.write("<td width=\"100%\">\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("</table>\n "); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr>\n "); out.write("<td bgcolor=\"#0000FF\" height=\"1\" colspan=\"4\">"); out.write("</td>\n "); out.write("</tr>\n "); out.write("</table>\n "); out.write("<!-- MAIN BODY -->\n"); out.write("\n\n"); out.write("<div class=\"margined\">\n "); out.write("<h1>Heritrix online help"); out.write("</h1>\n"); out.write("<p>\n "); out.write("<b>"); out.write("<a href=\""); out.print(request.getContextPath()); out.write("/about.jsp\">About Heritrix"); out.write("</a>"); out.write("</b>"); out.write("</br>\n Includes license and current environment information.\n"); out.write("</p>\n"); out.write("<p>\n "); out.write("<b>"); out.write("<a target=\"_blank\" \n href=\""); out.print(request.getContextPath()); out.write("/docs/articles/user_manual/index.html\">User\n Manual"); out.write("</a>"); out.write("</b>"); out.write( "<br> Covers creating, configuring, launching,\n monitoring and analysing crawl jobs. For all users.\n"); out.write("</p>\n"); out.write("<p>\n "); out.write("<b>"); out.write("<a target=\"_blank\" \n href=\""); out.print(request.getContextPath()); out.write("/docs/articles/developer_manual/index.html\">Developer Manual"); out.write("</a>"); out.write("</b>"); out.write( "<br> Covers how to write add on modules for Heritrix\n and provides in depth coverage of Heritrix's architecture. For\n advanced users.\n"); out.write("</p>\n"); out.write("<p>\n "); out.write("<b>"); out.write("<a target=\"_blank\" \n href=\""); out.print(request.getContextPath()); out.write("/docs/articles/releasenotes/index.html\">Release Notes"); out.write("</a>"); out.write("</b>"); out.write("<br>\n"); out.write("</p>\n"); out.write("<p>\n\t"); out.write("<b>"); out.write( "<a href=\"http://crawler.archive.org/issue-tracking.html\" target=\"_blank\">Issue Tracking"); out.write("</a>"); out.write("</b>"); out.write( "<br />\n\tIf you have found a bug or would like to see new features in Heritrix, check the following links:\n\t"); out.write("<ul>\n\t\t"); out.write("<li>"); out.write( "<a href=\"http://sourceforge.net/tracker/?atid=539099&group_id=73833&func=browse\" target=\"_blank\">Bugs"); out.write("</a>"); out.write("</li>\n\t\t"); out.write("<li>"); out.write( "<a href=\"http://sourceforge.net/tracker/?atid=539102&group_id=73833&func=browse\" target=\"_blank\">Feature Requests"); out.write("</a>"); out.write("</li>\n\t"); out.write("</ul>\n"); out.write("</p>\n"); out.write("<p>\n "); out.write("<b>"); out.write( "<a href=\"http://crawler.archive.org/mail-lists.html\" target=\"_blank\">Mailing Lists"); out.write("</a>"); out.write("</b>"); out.write("<br />\n For general discussion on Heritrix, use our "); out.write( "<a href=\"http://groups.yahoo.com/group/archive-crawler/\" target=\"_blank\">Crawler Discussion List"); out.write("</a>.\n"); out.write("</p>\n"); out.write("<p>\n "); out.write("<b>"); out.write("<a href=\""); out.print(request.getContextPath()); out.write("/help/regexpr.jsp\">Regular Expressions"); out.write("</a>"); out.write("</b>"); out.write( "<br />\n Information about the regular expressions used in Heritrix and a tool to double check that your regular expressions are valid and that they correctly identify the desired strings.\n"); out.write("</p>\n"); out.write("<p>\n "); out.write("<b>"); out.write("<a href=\""); out.print(request.getContextPath()); out.write("/help/codes.jsp\">URI Fetch Status Codes"); out.write("</a>"); out.write("</b>"); out.write( "<br />\n This reference details what each of the fetch status codes assigned to URIs means.\n"); out.write("</p>\n"); out.write("<hr />\n"); out.write("<font size=\"-1\">Heritrix version @VERSION@"); out.write("</font>\n"); out.write("</div>\n"); /** * An include file that handles the "look" and navigation of a web page. Wrapps up things * begun in the "head.jsp" include file. See it for more details. * * @author Kristinn Sigurdsson */ out.write("\n"); out.write("<br/>\n"); out.write("<br/>\n "); out.write( "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n "); out.write("<tr>\n "); out.write("<td bgcolor=\"#0000FF\" height=\"1\" colspan=\"4\">"); out.write("</td>\n "); out.write("</tr>\n "); out.write("<tr>\n "); out.write("<td class=\"instance_name\">Identifier: "); out.print(currentHeritrixName); out.write("</td>\n "); out.write("</tr>\n "); out.write("</table>\n "); out.write("<!-- END MAIN BODY -->\n "); out.write("</body>\n"); out.write("</html>"); out.write("\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, "/error.jsp", true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); /** This include page ensures that the handler exists and is ready to be accessed. */ CrawlJobHandler handler = (CrawlJobHandler) application.getAttribute("handler"); Heritrix heritrix = (Heritrix) application.getAttribute("heritrix"); // If handler is empty then this is the first time this bit of code is // being run since the server came online. In that case get or create the // handler. if (handler == null) { if (Heritrix.isSingleInstance()) { heritrix = Heritrix.getSingleInstance(); handler = heritrix.getJobHandler(); application.setAttribute("heritrix", heritrix); application.setAttribute("handler", handler); } else { // TODO: // If we get here, then there are multiple heritrix instances // and we have to put up a screen allowing the user choose between. // Otherwise, there is no Heritrix instance. Thats a problem. throw new RuntimeException( "No heritrix instance (or multiple " + "to choose from and we haven't implemented this yet)"); } } // ensure controller's settingsHandler is always thread-installed // in web ui threads if (handler != null) { CrawlJob job = handler.getCurrentJob(); if (job != null) { CrawlController controller = job.getController(); if (controller != null) { controller.installThreadContextSettingsHandler(); } } } out.write("\n"); out.write("\n"); /** This webpage performs actions that can be performed from the console. */ String sAction = request.getParameter("action"); if (sAction != null) { // Need to handle an action if (sAction.equalsIgnoreCase("start")) { // Tell handler to start crawl job handler.startCrawler(); } else if (sAction.equalsIgnoreCase("stop")) { // Tell handler to stop crawl job handler.stopCrawler(); } else if (sAction.equalsIgnoreCase("terminate")) { // Delete current job if (handler.getCurrentJob() != null) { handler.deleteJob(handler.getCurrentJob().getUID()); } } else if (sAction.equalsIgnoreCase("pause")) { // Tell handler to pause crawl job handler.pauseJob(); } else if (sAction.equalsIgnoreCase("resume")) { // Tell handler to resume crawl job handler.resumeJob(); } else if (sAction.equalsIgnoreCase("checkpoint")) { if (handler.getCurrentJob() != null) { handler.checkpointJob(); } } } response.sendRedirect(request.getContextPath() + "/index.jsp"); out.write("\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n\n"); // This JSP handles cross context communications from wt-monitor // to wt-core for use in accessing wt-core functionality that is // needed in WTnav-tree.jsp. // Assign a pooled DB connection handle Context ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup(WTConstants.WATCHTOWERDB_CONN); int iIndex = 6100; GraphViewManager graphman = new GraphViewManager(ds); // Vector views = graphman.getViews(); Vector views = new Vector(); WTOrganization[] orgs = null; WTAccountCredentials ac = (WTAccountCredentials) request.getSession().getAttribute(WTAccountCredentials.SESSION_ATTRIBUTE_AC); if (ac != null) { // WTOrganization[] orgs = null; int selectedOrg = ac.getCurrentManagedId(); boolean siteUser = ac.getIsSiteUser(); int userId = ac.getUserId(); // Get list of organizations for the current user if (siteUser) { try { orgs = DAOImpl.OrgDAO.getWTOrganization(); } catch (Exception e) { e.printStackTrace(); } } else { if (!(userId < 0)) { try { orgs = DAOImpl.OrgDAO.getWTOrganizationsByUser(userId); } catch (Exception e) { e.printStackTrace(); } } } // Get the list of actively managed nodes if (selectedOrg == WTAccountCredentials.ALL_ORGS) { if (siteUser) { views = graphman.getViews(); } else { if (orgs != null) { int[] orgsIds = new int[orgs.length]; for (int i = 0; i < orgs.length; i++) { orgsIds[i] = orgs[i].getID(); } views = graphman.getViews(orgsIds); } } } else { views = graphman.getViews(selectedOrg); } } // My Graph Views is an experimental feature and is commented out until all kinks are worked // out. LS String strOutput = null; // if( views.size()==0 ) { // strOutput = "nav.add(6100, 6000, 'My Graph Views', '/wt-monitor/report/index.jsp', 'My // Customized Graph Views', 'mainContentsFrame', icon16_basedir + 'bs_chart.gif', // icon16_basedir + 'bs_chart.gif', '');\r\n"; // } else { // strOutput = "nav.add(6100, 6000, 'My Graph Views', '', 'My Customized Graph Views', // 'mainContentsFrame', icon16_basedir + 'bs_chart.gif', icon16_basedir + 'bs_chart.gif', // '');\r\n"; // } // for (int i=0; i<views.size(); i++) // { // iIndex++; // String strViewName = ((GraphViewJB)views.elementAt(i)).getName(); // int strOrgId = ((GraphViewJB)views.elementAt(i)).getOrgId(); // String orgName = null; // for(int j=0;j<orgs.length;j++){ // if(orgs[j].getID() != -1 && orgs[j].getID() == strOrgId){ // orgName = orgs[j].getName(); // } // } // // strOutput +="nav.add(" + iIndex + // ", 6100, '" + strViewName + // "', 'javascript: // PopupCenteredWindow(\\'/wt-core/jsp/sysmon/graphview/GraphView.jsp?view=" + strViewName + // "&orgname="+orgName +"&start=01&end=02" + "\\', \\'graphview\\', \\'yes\\', \\'yes\\', // \\'yes\\', \\'900\\', \\'1010\\'); location.href=\\'/wt-monitor/wt-jsp/WTnav-tree.jsp\\';', // 'Open " + strViewName + " Graph View', '', icon16_basedir + 'bs_chart.gif', icon16_basedir // + 'bs_chart.gif', '');\r\n"; // } out.write("\n\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n\n"); out.print(strOutput); out.write("\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n"); out.write("\n"); response.setContentType("text/xml"); int mapId = -1; TopologyMap map = (TopologyMap) request.getAttribute("map"); String isRcad = "false"; if (map == null) { String strMapId = request.getParameter("mapId"); if (strMapId != null) { mapId = Integer.parseInt(request.getParameter("mapId")); } } if (map == null && mapId != 99999) { map = TopologyMap.getMapById(mapId); } if (map != null) { List centities = map.getCentityMaps(); List connections = map.getConnections(); List bgimages = map.getMapBgimages(); if (WTAccountCredentials.current() == null) { System.out.println("NullPointerException: WTAccountCredentials.current() is null"); return; } String user = WTAccountCredentials.current().getUserName(); boolean admin = false; WTRole role = WTAccountCredentials.current().getMostPrivilegedRole(); admin = role.isOrgAdmin() || role.isSiteAdmin(); if (user == null) { out.write("<topology-map />"); return; } boolean readOnly = !user.equals(map.getCreator()); Integer groupId = map.getGroupId(); String groupAttrs = ""; if (groupId != null) { WTGroupManager groupMan = ManagersImpl.GroupManager; WTGroup group = (WTGroup) groupMan.getObject(groupId.intValue()); groupMan.resolveReferences(group); groupAttrs = "groupName=\"" + URLEncoder.encode(group.getOrg().getName() + " - " + group.getName(), "UTF-8") + "\" groupId=\"" + groupId.intValue() + "\""; } isRcad = String.valueOf(map.isRca()); out.write("\n\t"); out.write("<topology-map mapId=\""); out.print(map.getMapId()); out.write("\" name=\""); out.print(map.getName()); out.write("\" mapTypeId=\""); out.print(map.getTypeId()); out.write("\" \n\t zoomLevel=\""); out.print(map.getZoom()); out.write("\" paneScrollX=\""); out.print(map.getScrollX()); out.write("\" paneScrollY=\""); out.print(map.getScrollY()); out.write("\"\n\t shared=\""); out.print(map.isShared()); out.write("\" creator=\""); out.print(map.getCreator()); out.write("\" iconSize=\""); out.print(map.getIconSize()); out.write("\"\n\t labelsAlwaysOn=\""); out.print(map.isLabelsAlwaysOn()); out.write("\" readOnly=\""); out.print(readOnly); out.write("\" "); out.print(groupAttrs); out.write(" admin=\""); out.print(admin); out.write("\" isRcad=\""); out.print(isRcad); out.write("\">\n\t\n\t\t"); out.write("<entities>\n\t"); for (Iterator it = centities.iterator(); it.hasNext(); ) { CentityMap centityMap = (CentityMap) it.next(); StringBuffer hierarchyBuffer = new StringBuffer(); if (centityMap.getType().equals("category")) { WTCategory cat = (WTCategory) ManagersImpl.CategoryManager.getObject( Integer.valueOf(centityMap.getIdForType())); List sectionList = ManagersImpl.CategoryManager.getAllParentSections(cat); for (Iterator sectionIt = sectionList.iterator(); sectionIt.hasNext(); ) { WTSection section = (WTSection) sectionIt.next(); hierarchyBuffer.append(section.getName() + " / "); } } out.write("\n\t "); out.write("<entity centityId=\""); out.print(centityMap.getCentityId()); out.write("\" type=\""); out.print(centityMap.getType()); out.write("\" id=\""); out.print(centityMap.getXmlId()); out.write("\"\n\t icon=\""); out.print(centityMap.getIcon()); out.write("\" label=\""); out.print(centityMap.getLabel()); out.write("\" hierarchy=\""); out.print(hierarchyBuffer.toString()); out.write("\"\n\t x=\""); out.print(centityMap.getXPlacement()); out.write("\" y=\""); out.print(centityMap.getYPlacement()); out.write("\"/>\n\t "); } out.write("\n\t\t"); out.write("</entities>\n\t\t"); out.write("<connections>\n\t"); for (Iterator it = connections.iterator(); it.hasNext(); ) { CentityConnection cc = (CentityConnection) it.next(); String startType = null; String endType = null; int startId = -1; int endId = -1; if (cc.getParentNodeid() != null) { startType = "node"; startId = cc.getParentNodeid(); } else if (cc.getParentCategoryId() != null) { startType = "category"; startId = cc.getParentCategoryId(); } if (cc.getNodeid() != null) { endType = "node"; endId = cc.getNodeid(); } else if (cc.getCategoryId() != null) { endType = "category"; endId = cc.getCategoryId(); } out.write("\n\t\t\t"); out.write("<connection startType=\""); out.print(startType); out.write("\" startId=\""); out.print(startId); out.write("\" endType=\""); out.print(endType); out.write("\" endId=\""); out.print(endId); out.write("\" />\n\t"); } out.write("\n\t\t"); out.write("</connections>\n\t\t"); out.write("<bgimages>\n\t"); for (Iterator it = bgimages.iterator(); it.hasNext(); ) { MapBgimage bgimage = (MapBgimage) it.next(); out.write("\n\t\t\t\t"); out.write("<bgimage mapBgimageId=\""); out.print(bgimage.getMapBgimageId()); out.write("\" bgimageId=\""); out.print(bgimage.getBgimageId()); out.write("\"\n\t\t\t\t creator=\""); out.print(bgimage.getCreator()); out.write("\" src=\""); out.print(bgimage.getSrc()); out.write("\" x=\""); out.print(bgimage.getXPlacement()); out.write("\"\n\t\t\t\t y=\""); out.print(bgimage.getYPlacement()); out.write("\" zindex=\""); out.print(bgimage.getZIndex()); out.write("\" xscale=\""); out.print(bgimage.getXScale()); out.write("\"\n\t\t\t\t yscale=\""); out.print(bgimage.getYScale()); out.write("\" />\n\t"); } out.write("\n\t\t"); out.write("</bgimages>\n\t\t\n\t"); out.write("</topology-map>\n"); } else { out.write("\n"); out.write( "<topology-map mapId=\"99999\" name=\"Topology Sample\" zoomLevel=\"10\" paneScrollX=\"0\" paneScrollY=\"0\" shared=\"true\" creator=\"admin\" iconSize=\"32\" labelsAlwaysOn=\"true\" type=\"topology\">\n\t"); out.write("<entities>\n\t\t"); out.write( "<entity centityId=\"-90\" type=\"node\" id=\"node_603\" icon=\"OS_Win2003.swf\" label=\"CARROT\" x=\"300\" y=\"200\"/>\n\t\t"); out.write( "<entity centityId=\"-91\" type=\"node\" id=\"node_653\" icon=\"OS_Win2000.swf\" label=\"RAISIN\" x=\"200\" y=\"200\"/>\n\t\t"); out.write( "<entity centityId=\"-92\" type=\"node\" id=\"node_615\" icon=\"OS_Win2003.swf\" label=\"10.100.100.88\" x=\"300\" y=\"100\"/>\n\t\t"); out.write( "<entity centityId=\"-93\" type=\"node\" id=\"node_616\" icon=\"OS_WinXP.swf\" label=\"10.100.100.241\" x=\"100\" y=\"100\"/>\n\t\t"); out.write( "<entity centityId=\"-94\" type=\"node\" id=\"node_613\" icon=\"OS_FoundryIronWare.swf\" label=\"Foundry\" x=\"200\" y=\"125\"/>\n\t\t"); out.write( "<entity centityId=\"-95\" type=\"node\" id=\"node_656\" icon=\"OS_WinXP.swf\" label=\"10.100.100.239\" x=\"225\" y=\"70\"/>\n\t\t"); out.write( "<entity centityId=\"-96\" type=\"node\" id=\"node_610\" icon=\"OS_CiscoIOS.swf\" label=\"Cittio-2621\" x=\"125\" y=\"150\"/>\n\t\t"); out.write( "<entity centityId=\"-97\" type=\"node\" id=\"node_614\" icon=\"OS_Linux.swf\" label=\"Mango\" x=\"100\" y=\"200\"/>\n\n\t"); out.write("</entities>\n\t"); out.write("<connections>\n\t\t"); out.write( "<connection startType=\"node\" startId=\"603\" endType=\"node\" endId=\"613\"/>\n\t\t"); out.write( "<connection startType=\"node\" startId=\"653\" endType=\"node\" endId=\"613\"/>\n\t\t"); out.write( "<connection startType=\"node\" startId=\"615\" endType=\"node\" endId=\"613\"/>\n\t\t"); out.write( "<connection startType=\"node\" startId=\"616\" endType=\"node\" endId=\"613\"/>\n\t\t"); out.write( "<connection startType=\"node\" startId=\"656\" endType=\"node\" endId=\"613\"/>\n\t\t"); out.write( "<connection startType=\"node\" startId=\"610\" endType=\"node\" endId=\"613\"/>\n\t\t"); out.write( "<connection startType=\"node\" startId=\"614\" endType=\"node\" endId=\"610\"/>\n\t"); out.write("</connections>\n\t"); out.write("<bgimages />\n"); out.write("</topology-map>\n"); } out.write("\n\n\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=utf-8"); pageContext = _jspxFactory.getPageContext( this, request, response, "/jsp/GeneralError.jsp", true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n"); out.write("\n\n"); out.write("\n"); out.write("\n"); out.write("\n\n"); out.write("\n"); out.write("\n\n"); out.write("\n"); java.util.Date now = null; synchronized (pageContext) { now = (java.util.Date) pageContext.getAttribute("now", PageContext.PAGE_SCOPE); if (now == null) { try { now = (java.util.Date) java.beans.Beans.instantiate( this.getClass().getClassLoader(), "java.util.Date"); } catch (ClassNotFoundException exc) { throw new InstantiationException(exc.getMessage()); } catch (Exception exc) { throw new ServletException("Cannot create bean of class " + "java.util.Date", exc); } pageContext.setAttribute("now", now, PageContext.PAGE_SCOPE); } } out.write("\n\n"); out.write("\n"); out.write("<script type=\"text/javascript\" src=\""); if (_jspx_meth_c_url_0(pageContext)) return; out.write("\">"); out.write("</script>\n\n"); out.write("\n"); if (_jspx_meth_html_xhtml_0(pageContext)) return; out.write("\n"); out.write("\n\n"); if (_jspx_meth_html_html_0(pageContext)) return; } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } }