detail.jsp

来自「opennms得相关源码 请大家看看」· JSP 代码 · 共 195 行

JSP
195
字号
<!--//// This file is part of the OpenNMS(R) Application.//// OpenNMS(R) is Copyright (C) 2002-2003 The OpenNMS Group, Inc.  All rights reserved.// OpenNMS(R) is a derivative work, containing both original code, included code and modified// code that was published under the GNU General Public License. Copyrights for modified // and included code are below.//// OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.//// Modifications://// 2003 Feb 07: Fixed URLEncoder issues.// 2002 Nov 26: Fixed breadcrumbs issue.// // Original code base Copyright (C) 1999-2001 Oculan Corp.  All rights reserved.//// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.//// For more information contact://      OpenNMS Licensing       <license@opennms.org>//      http://www.opennms.org///      http://www.opennms.com///--><%@page language="java" contentType="text/html" session="true" import="org.opennms.web.vulnerability.*,java.text.DateFormat" %><%!    public static DateFormat DATE_FORMAT = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);%><%    String vulIdString = request.getParameter("id");    if( vulIdString == null ) {        throw new org.opennms.web.MissingParameterException( "id" );    }    int vulId = -1;    try {        vulId = Integer.parseInt( vulIdString );    }    catch( NumberFormatException e ) {        throw new VulnerabilityIdNotFoundException( "The vulnerability identifier must be an integer.", vulIdString );    }    Vulnerability vul = VulnerabilityFactory.getVulnerability( vulId );    if( vul == null ) {        throw new VulnerabilityIdNotFoundException( "A vulnerability with this id was not found.", String.valueOf(vulId) );    }  %><html><head>  <title>Detail | Vulnerabilities | OpenNMS Web Console</title>  <base href="<%=org.opennms.web.Util.calculateUrlBase( request )%>" />  <link rel="stylesheet" type="text/css" href="includes/styles.css" /></head><body marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0"><% String breadcrumb1 = "<a href='vulnerability/index.jsp'>Vulnerabilities</a>"; %><% String breadcrumb2 = "Detail"; %><jsp:include page="/includes/header.jsp" flush="false" >  <jsp:param name="title" value="Vulnerability Detail" />  <jsp:param name="breadcrumb" value="<%=breadcrumb1%>" />  <jsp:param name="breadcrumb" value="<%=breadcrumb2%>" /></jsp:include><br /><!-- Body --><table width="100%" border="0" cellspacing="0" cellpadding="2" >  <tr>    <td>&nbsp;</td>      <td valign="top">      <h3>Vulnerability: <%=vul.getId()%></h3>          <!-- details -->      <table width="100%" cellspacing="0" cellpadding="2" class="widget-box" border="1" bordercolor="black">        <tr>          <td width="10%" class="widget-box-fieldname" valign="top">Severity</td>          <td valign="top" bgcolor="<%=VulnerabilityUtil.getSeverityColor(vul.getSeverity())%>"><%=VulnerabilityUtil.getSeverityLabel(vul.getSeverity())%></td>          <td width="10%" class="widget-box-fieldname" valign="top">Node:</td>          <td valign="top">            <% if( vul.getNodeId() != null ) { %>              <a href="element/node.jsp?node=<%=vul.getNodeId()%>"><%=vul.getNodeLabel()%></a>            <% } else {%>              &nbsp;            <% } %>          </td>          <td width="10%" class="widget-box-fieldname" valign="top">Protocol:</td>          <td valign="top">            <% if( vul.getProtocol() != null ) { %>              <%=vul.getProtocol()%>            <% } else {%>              &nbsp;            <% } %>          </td>                           </tr>        <tr>          <td class="widget-box-fieldname" valign="top">Discovered:</td>          <td valign="top"><%=DATE_FORMAT.format(vul.getCreateTime())%></td>          <td class="widget-box-fieldname" valign="top">Interface:</td>          <td valign="top">            <% if( vul.getIpAddress() != null ) { %>              <% if( vul.getNodeId() != null ) { %>                <a href="element/interface.jsp?node=<%=vul.getNodeId()%>&intf=<%=vul.getIpAddress()%>"><%=vul.getIpAddress()%></a>              <% } else { %>                <%=vul.getIpAddress()%>              <% } %>            <% } else {%>              &nbsp;            <% } %>          </td>          <td class="widget-box-fieldname" valign="top">Port:</td>          <td valign="top">            <% if( vul.getPort() != null ) { %>              <%=vul.getPort()%>            <% } else {%>              &nbsp;            <% } %>          </td>        </tr>        <tr>          <td class="widget-box-fieldname" valign="top">Resolved:</td>          <td valign="top">            <% if(vul.getResolvedTime() != null ) { %>              <%=DATE_FORMAT.format(vul.getResolvedTime())%>            <% } else { %>              OPEN            <% } %>          </td>          <td class="widget-box-fieldname" valign="top">Last Scan:</td>          <td valign="top"><%=DATE_FORMAT.format(vul.getLastScanTime())%></td>          <td class="widget-box-fieldname" valign="top">Last Scan Attempt:</td>          <td valign="top"><%=DATE_FORMAT.format(vul.getLastAttemptTime())%></td>        </tr>      </table>      <br />          <!-- log message -->        <table width="100%" cellpadding="2" cellspacing="0" class="widget-box" border="1" bordercolor="black">        <tr bgcolor="#999999"><td>Log Message</td></tr>                    <tr><td><%=vul.getLogMessage()%></td></tr>      </table>            <br />      <!-- log message -->        <table width="100%" cellpadding="2" cellspacing="0" class="widget-box" border="1" bordercolor="black">        <tr bgcolor="#999999"><td>Description</td></tr>                       <tr><td><%=vul.getDescription()%></td></tr>      </table>                 </td>        <td>&nbsp;</td>  </tr></table><br /><jsp:include page="/includes/footer.jsp" flush="false" /></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?