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

📄 ipinfo.tmpl

📁 监控大型网络的软件。能够自动发现拓扑结构
💻 TMPL
字号:
#encoding UTF-8## $Id: IPInfo.tmpl 4170 2007-08-23 11:41:18Z jodal $#### Extends the MainTemplate## Defines the IP information page#### Copyright 2005 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###### Authors: Morten Vold <morten.vold@ntnu.no>###extends nav.web.templates.MainTemplate.MainTemplate#attr $path = [("Home", "/"), ("IP Info", None)]## Don't know how to break lines in Cheetah, so this gets ugly long:#attr $sortorder = ('navreg', 'ip', 'dns', 'subnet', 'usage', 'description', 'org', 'opt1', 'opt2', 'opt3', 'arp', 'mac', 'switch', 'module', 'port')#def linked($key, $value)  #set $link = ''  #if $key == 'navreg'    #set $link = '/browse/' + $value  #elif $key == 'arp'    #set $link = '/machinetracker/?from_ip=' + str($info['ip']) + '&to_ip=&aip=on&days=7&send=Search'  #elif $key == 'email'    #set $link = 'mailto:' + $value  #end if  #slurp  #if $link<a href="$link">$value</a> #slurp  #else$value #slurp  #end if#end def#def infotable($table)    #set $firstkeys = [key for key in $sortorder if key in $table.keys()]    #set $lastkeys = [key for key in $table.keys() if key not in $firstkeys]    #silent $lastkeys.sort()    #set $keys = $firstkeys + $lastkeys<table class="vertitable">    #filter WebSafe    <caption>$target</caption>    #end filter    #for $key in $keys    <tr class="$rowcycler">        <th>$info.describe($key)</th>        <td>$linked($key, $table[$key])</td>    </tr>    #end for</table>#end def#block content<h2>IP Info</h2>#set $value = $getVar('target', '')<form action="" method="get">    <label for="ipinput">IP/hostname:</label>    <input id="ipinput" type="text" name="ip" size="30" value="$value" />    <button type="submit">Search</button></form>#if $varExists('target') and $target  #if $varExists('invalidIP') and $invalidIP    <p>&quot;<em>$target</em>&quot; is not a valid IP address!</p>  #elif $varExists('info') and $info    $infotable($info)    #if $varExists('localsiteinfo')    <div id="localsiteinfo">$localsiteinfo<div>    #end if  #else    #filter WebSafe    <p>No information available for <em>$target</em>.</p>    #end filter  #end if#end if</div>#if $varExists('debug')  <div style="font-size: small; border: 1px dashed red;">  Debug:<br>  <pre>$debug</pre>  </div>#end if#end block content#block additionalCSS$default_table_CSS#end block additionalCSS

⌨️ 快捷键说明

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