📄 l2tracetemplate.tmpl
字号:
#encoding UTF-8## $Id: MachineTrackerTemplate.tmpl 3106 2005-01-20 10:47:13Z mortenv $#### Copyright 2003, 2004 Norwegian University of Science and Technology#### This file is part of Network Administration Visualized (NAV)#### NAV 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.#### NAV 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 NAV; if not, write to the Free Software## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA###### Author: Kristian Eide <kreide@gmail.com>###extends MainTemplate#attr $path = [("Home", "/"), ("Layer 2 Traceroute", "/l2trace/")]#block content<h2>Layer 2 Traceroute</h2><div id="l2trace"><div id="forms"><form id="l2traceform" action="" method="get"><table style="font-size: 13px;"> <tr> <td><label>From </label></td> <td><input type=text name=host_from value=$form.host_from></td> <td><label>To </label></td> <td><input type=text name=host_to value=$form.host_to></td> </tr> <tr> <td></td> <td colspan=2> <input type=submit name=send value="Trace"> </td> <td align="center">(optional)</td> </tr></table></form></div> <!-- forms -->#def tableTitle($title, $hits, $columnCount) #set $columnCount += 1<br /><table class="horiztable"> <caption> <span class="cornerkludge"></span> $title<br /> <span class="subtitle">$hits rows</span> </caption>#end def#def tableHeader($rowCount, $columns) #set $rowCount = $rowCount + 1 <tr class="header"> <td class="leftkludge" rowspan="$rowCount"></td> #for $column in $columns <th>$column</th> #end for <td class="rightkludge" rowspan="$rowCount"></td> </tr>#end def#def l2traceTable($table) #set $columns = ('#', 'Level', 'Vlan', 'Port In', 'IP', 'Sysname', 'Port Out') #set $columnCount = len($columns) $tableTitle("L2 Trace results", len($table), $columnCount) $tableHeader(len($table), $columns) #for $row in $table <tr class="$rowcycler"> <td style="text-align: right;">$row.idx</td> <td style="text-align: center;">$row.level</td> #if $row.vlan == "trunk" <td style="text-align: right;">$row.vlan</td> #else <td style="text-align: right;"><a href="/report/prefix?vlan=$row.vlan" title="Vlan report">$row.vlan</a></td> #end if #if $row.netboxid <td><a href="/report/swport?b1.netboxid=$row.netboxid" title="Switch ports">$row.portIn</a></td> #else <td>$row.portIn</td> #end if #if $row.hostOk <td><a href="/ipinfo/?ip=$row.ipaddr" title="IP info">$row.ipaddr</a></td> #else <td>$row.ipaddr</td> #end if #if $row.netboxid <td><a href="/browse/?netbox=$row.ipaddr" title="Device browser">$row.sysname</a></td> #else <td>$row.sysname</td> #end if #if $row.netboxid <td><a href="/report/swport?b1.netboxid=$row.netboxid" title="Switch ports">$row.portOut</a></td> #else <td>$row.portOut</td> #end if </tr> #end for</table>#end def<div id="results">#if $l2tracer $l2traceTable($l2tracer.table)#end if#if not $l2tracer #set $noresults = 0 #if $noresults<p>Your search did not return any results</p> #else<div class="infobox"><h5>L2 Trace usage</h5><ul> <li>Enter a hostname or IP address and trace up to its router. </li> <li>Optionally enter a destination hostname or IP address and trace between the two. </li> <li>Press the Trace button to start. </li></ul></div> #end if#end if</div> <!-- results --></div> <!-- l2trace -->#end block content#block additionalCSS$default_table_CSS<link rel="stylesheet" type="text/css" href="/style/l2trace.css" />#end block additionalCSS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -