⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 l2tracetemplate.tmpl

📁 监控大型网络的软件。能够自动发现拓扑结构
💻 TMPL
字号:
#encoding UTF-8## $Id: MachineTrackerTemplate.tmpl 3106 2005-01-20 10:47:13Z mortenv $#### Copyright 2003, 2004 Norwegian University of Science and Technology## Copyright 2006-2007 UNINETT AS#### 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>##         Stein Magnus Jodal <stein.magnus.jodal@uninett.no>###extends MainTemplate#attr $title = 'Layer 2 Traceroute'#attr $path =  [("Home", "/"), ("Layer 2 Traceroute", "/l2trace/")]#block content<h2>Layer 2 Traceroute</h2><div id="l2trace"><form id="l2traceform" action="" method="get"><label for="host_from">From </label><input type="text" name="host_from" value="$form.host_from" /><label for="host_to">To </label><input type="text" name="host_to" value="$form.host_to" /> (optional)<button type="submit" name="send">Trace</button></form>#def tableTitle($title, $hits, $columnCount)  #set $columnCount += 1<br /><table class="listtable">    <caption>        $title<br />        <span class="subtitle">$hits rows</span>    </caption>#end def#def tableHeader($rowCount, $columns)  #set $rowCount = $rowCount + 1    <thead>        <tr>  #for $column in $columns            <th>$column</th>  #end for        </tr>    </thead>#end def#def l2traceTable($table)  #set $columns = ('#', 'Level', 'Vlan', 'Module/Interface In', 'IP', 'Sysname', 'Module/Interface Out')  #set $columnCount = len($columns)  $tableTitle("Layer 2 Trace Results", len($table), $columnCount)  $tableHeader(len($table), $columns)    <tbody>  #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    </tbody>    <tbody class="footer">    <tr>        <th colspan="0">            #set $rows = len($table)            $rows rows        </th>    </tr>    </tbody></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"><h4>L2 Trace usage</h4><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 + -