also link to manual topology from device ports fix tooltip reinit on datatables paging Squashed commit of the following: commit85d52ed174Merge:66e3536607446ed7Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 31 08:59:19 2017 +0000 Merge branch 'master' into og-newnetmap commit66e353669dAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 31 00:16:49 2017 +0000 add docs link commit809f1ede76Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 31 00:11:29 2017 +0000 node links to other devices commit187e1ea803Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 30 23:58:56 2017 +0000 add node infostring commit6453f99b28Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 30 23:41:19 2017 +0000 link infostrings! commitf3ba260142Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 30 22:42:09 2017 +0000 maxnoderadius is now based on dynamic size calc commit0af415e391Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 30 22:33:22 2017 +0000 fix to get aggregate ports in matching order on left and right side commit3f36121a4cAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 30 22:07:28 2017 +0000 initial aggregate link summing commite5b96b0781Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 30 14:55:00 2017 +0000 tidy and refactor commit79f22a47b3Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 30 13:42:58 2017 +0000 get rid of d3 v3/v4 and only have v3 commit18c3f16c8fAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 30 12:54:45 2017 +0000 fullscreen exit now works commit93f8181fc8Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 30 08:58:04 2017 +0000 implement show link speeds on links commit72961f172dAuthor: Oliver Gorwits <oliver@cpan.org> Date: Thu Dec 28 23:51:26 2017 +0000 add speed to retrieved devicelinks commitae5496310eAuthor: Oliver Gorwits <oliver@cpan.org> Date: Tue Dec 26 11:21:12 2017 +0000 remove annealing on label change commit885cb92bd3Author: Oliver Gorwits <oliver@cpan.org> Date: Tue Dec 26 11:15:21 2017 +0000 reorder options commit015a1debe0Author: Oliver Gorwits <oliver@cpan.org> Date: Tue Dec 26 11:11:01 2017 +0000 fix d3-force debug link messing up svg text elements commit10ccaa78b1Author: Oliver Gorwits <oliver@cpan.org> Date: Tue Dec 26 10:52:47 2017 +0000 show ips functionality; improvement to maximise icon; bugfix d3-force label wrap commit71a1a20909Author: Oliver Gorwits <oliver@cpan.org> Date: Mon Dec 25 13:21:23 2017 +0000 move labels on neighbor view commit9578215349Author: Oliver Gorwits <oliver@cpan.org> Date: Mon Dec 25 13:13:13 2017 +0000 force running spinner commit6618fba548Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 24 23:13:33 2017 +0000 fix neighbors pinning commit938848551eAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 24 18:12:04 2017 +0000 implement dynamic sizing option commite4b19be5d7Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 24 13:25:00 2017 +0000 zoom to device on neighbor show; do not save positions on neighbor show commit58b576b464Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 24 13:10:48 2017 +0000 better neighbors/save interaction commit2c77660f2fAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 24 13:03:46 2017 +0000 fix labels on checkboxes to be clickable commit2c2dc62cdaAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 24 12:50:26 2017 +0000 prevent save positions when in neighbor view mode commit78c558b5beAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 24 12:37:51 2017 +0000 add tooltip to show why host groups radio is disabled commit7000d4b0ebAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 24 12:12:29 2017 +0000 allow port control role to edit manual topology commit547d2934cbAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 24 12:09:40 2017 +0000 working save/restore node positions with groups commitbf7e231ffeAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 24 10:09:26 2017 +0000 node colors! commite23594b041Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 23 23:42:17 2017 +0000 wooo device group selection is working commitb1b22c9811Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 23 22:31:23 2017 +0000 send full query str from netmap for json commit9a13bb7f9bAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 23 22:06:24 2017 +0000 implement host_group_displaynames and fix vlan save bug commit35ed34ed2fAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 23 17:52:14 2017 +0000 when neighbors only can restrict the links search commitf9e5ec02abAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 23 17:44:41 2017 +0000 tweak mapshow commit9f9971ff4eAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 23 00:47:17 2017 +0000 better sidebar look and layout commit1def41da67Author: Oliver Gorwits <oliver@cpan.org> Date: Thu Dec 21 23:54:44 2017 +0000 sidebar with many options!! commit4203cbb225Merge:7c12df6b7db65932Author: Oliver Gorwits <oliver@cpan.org> Date: Thu Dec 21 20:14:55 2017 +0000 Merge branch 'master' into og-newnetmap commit7c12df6b83Author: Oliver Gorwits <oliver@cpan.org> Date: Thu Dec 21 00:13:03 2017 +0000 refresh tooltips when the datatables table is updated commit081b89d5dcAuthor: Oliver Gorwits <oliver@cpan.org> Date: Wed Dec 20 23:59:15 2017 +0000 shortcut from device port to manual topology commit9520438960Author: Oliver Gorwits <oliver@cpan.org> Date: Wed Dec 20 23:34:44 2017 +0000 tighten the sql for neighbor links commitd6b0275931Author: Oliver Gorwits <oliver@cpan.org> Date: Wed Dec 20 23:26:22 2017 +0000 tweak layout again commit9e5e2f0ed5Author: Oliver Gorwits <oliver@cpan.org> Date: Wed Dec 20 23:18:57 2017 +0000 fullscreen mode for netmap commitaba359d2a9Author: Oliver Gorwits <oliver@cpan.org> Date: Wed Dec 20 22:05:51 2017 +0000 save and load netmap positions for same device groups commitb7cd0251ffAuthor: Oliver Gorwits <oliver@cpan.org> Date: Tue Dec 19 23:24:47 2017 +0000 basic positions upload commit786115ebdaAuthor: Oliver Gorwits <oliver@cpan.org> Date: Tue Dec 19 22:13:16 2017 +0000 working group drag commit91f98d4f33Author: Oliver Gorwits <oliver@cpan.org> Date: Mon Dec 18 23:00:16 2017 +0000 drag all selected nodes commitba48eee5f7Merge:60412cd67f8e3edfAuthor: Oliver Gorwits <oliver@cpan.org> Date: Mon Dec 18 20:14:20 2017 +0000 Merge branch 'master' into og-newnetmap commit60412cd6e6Merge:39ca14917dc79f72Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 17 20:23:41 2017 +0000 Merge branch 'master' into og-newnetmap commit39ca1491b0Merge:69622582c8806beaAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 17 19:52:49 2017 +0000 Merge branch 'master' into og-newnetmap commit6962258223Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 17 19:52:26 2017 +0000 bleed versions commit444e82b8a3Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 16 15:33:41 2017 +0000 use d3 v4 only commit01cd7a908dAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Dec 16 15:22:08 2017 +0000 two d3 connected commit854f37fc94Author: Oliver Gorwits <oliver@cpan.org> Date: Thu Dec 14 21:34:49 2017 +0000 more fiddling with d3 commit61a3a9e06dAuthor: Oliver Gorwits <oliver@cpan.org> Date: Thu Dec 14 19:15:21 2017 +0000 working worker commitebadebe69aAuthor: Oliver Gorwits <oliver@cpan.org> Date: Thu Dec 14 07:57:55 2017 +0000 borken worker commitc327b28513Author: Oliver Gorwits <oliver@cpan.org> Date: Wed Dec 13 13:45:03 2017 +0000 fix node center commit33bd9d39daAuthor: Oliver Gorwits <oliver@cpan.org> Date: Wed Dec 13 01:14:50 2017 +0000 improvements to graphing commit6178bf2298Merge:1c627eaf925940c9Author: Oliver Gorwits <oliver@cpan.org> Date: Tue Dec 12 23:44:48 2017 +0000 Merge branch 'master' into og-newnetmap commit1c627eaf3cMerge:77ca8f96000cbaa1Author: Oliver Gorwits <oliver@cpan.org> Date: Tue Dec 12 23:38:00 2017 +0000 Merge branch 'master' into og-newnetmap commit77ca8f96e1Author: Oliver Gorwits <oliver@cpan.org> Date: Mon Dec 11 00:09:08 2017 +0000 working rendering using d3-force plugin commit187265fc03Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Dec 10 23:19:23 2017 +0000 initial work on moving to d3-force-apex-plugin - json data
420 lines
17 KiB
Plaintext
420 lines
17 KiB
Plaintext
[% SET user_can_port_control = user_has_role('port_control') %]
|
|
<table id="dp-data-table" class="table table-bordered table-striped" width="100%" cellspacing="0">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
[% FOREACH item IN settings.port_columns %]
|
|
[% NEXT IF item.name == 'c_admin' %]
|
|
[% NEXT IF item.name == 'c_nodes' AND params.c_nodes AND params.c_neighbors %]
|
|
[% NEXT UNLESS params.${item.name} %]
|
|
[% SET th_class = '' %]
|
|
[% IF (item.name == 'c_port' OR item.name == 'c_descr' OR item.name == 'c_name') %]
|
|
[% th_class = ' class="portsort"' %]
|
|
[% END %]
|
|
<th[% th_class %]>
|
|
[% item.label | html_entity %]
|
|
</th>
|
|
[% END %]
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH row IN results %]
|
|
[% SET portname = row.port %]
|
|
<tr>
|
|
<td class="nd_center-cell nd_devport-icon">
|
|
[% IF row.up_admin != 'up' %]
|
|
<i class="icon-remove"></i>
|
|
[% ELSIF row.up == 'up' AND row.stp == 'blocking' AND vlans.$portname.vlan_count < 2 %]
|
|
<i class="icon-fullscreen text-info"></i>
|
|
[% ELSIF row.has_column_loaded('is_free') AND row.is_free %]
|
|
<i class="icon-arrow-down text-success"></i>
|
|
[% ELSIF row.up_admin == 'up' AND (row.up != 'up' AND row.up != 'dormant') %]
|
|
<i class="icon-arrow-down text-error"></i>
|
|
[% ELSE %]
|
|
<i class="icon-angle-up text-success"></i>
|
|
[% END %]
|
|
[% IF row.slave_of %]<br/>
|
|
[% IF row.get_column('agg_master_up_admin') != 'up' %]
|
|
<small><i class="icon-group muted"></i></small>
|
|
[% ELSIF row.get_column('agg_master_up') == 'up' %]
|
|
<small><i class="icon-group text-success"></i></small>
|
|
[% ELSE %]
|
|
<small><i class="icon-group text-error"></i></small>
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
|
|
[% FOREACH config IN settings._extra_device_port_cols %]
|
|
[% NEXT UNLESS config.position == 'left' AND params.${config.name} %]
|
|
<td>
|
|
[% TRY %]
|
|
[% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
|
|
[% CATCH %]
|
|
<!-- dummy content required by Template Toolkit TRY -->
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_port %]
|
|
[% IF user_can_port_control AND params.c_admin %]
|
|
[% IF row.up_admin == 'up' %]
|
|
<td nowrap class="nd_editable-cell" data-action="down"
|
|
data-order="[% row.port | html_entity %]" data-filter="[% row.port | html_entity %]"
|
|
data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
|
[% ELSE %]
|
|
<td nowrap class="nd_editable-cell" data-action="up"
|
|
data-order="[% row.port | html_entity %]" data-filter="[% row.port | html_entity %]"
|
|
data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
|
[% END %]
|
|
[% ELSE %]
|
|
<td nowrap data-order="[% row.port | html_entity %]" data-filter="[% row.port | html_entity %]">
|
|
[% END %]
|
|
<a class="nd_log-icon"
|
|
href="[% uri_for('/report/portlog') %]?q=[% device.ip | uri %]&f=[% row.port | uri %]">
|
|
<i class="icon-file-text-alt"
|
|
rel="tooltip" data-placement="top" data-offset="3"
|
|
data-animation="" data-title="View Port Log"></i>
|
|
</a>
|
|
[% IF user_can_port_control AND params.c_admin %]
|
|
[% IF row.up_admin == 'up' %]
|
|
<span class="nd_hand-icon">
|
|
<i class="icon-bullseye" data-action="bounce"
|
|
rel="tooltip" data-placement="top" data-offset="3"
|
|
data-animation="" data-title="Bounce Port"></i>
|
|
<i class="icon-hand-down"
|
|
rel="tooltip" data-placement="top" data-offset="3"
|
|
data-animation="" data-title="Disable Port"></i>
|
|
</span>
|
|
[% ELSE %]
|
|
<span class="nd_hand-icon">
|
|
<i class="icon-bullseye" data-action="bounce" style="display: none"
|
|
rel="tooltip" data-placement="top" data-offset="3"
|
|
data-animation="" data-title="Bounce Port"></i>
|
|
<i class="icon-hand-up"
|
|
rel="tooltip" data-placement="top" data-offset="3"
|
|
data-animation="" data-title="Enable Port"></i>
|
|
</span>
|
|
[% END %]
|
|
[% END %]
|
|
<a class="nd_this-port-only nd_port-only-first" href="[% device_ports %]&q=[% params.q | uri %]&f=[% row.port | uri %]&prefer=port">
|
|
[% IF row.is_master %]
|
|
<small><i class="icon-group muted"></i></small>
|
|
[% END %]
|
|
[% row.port | html_entity %]</a>
|
|
[% IF row.slave_of %]<br/>
|
|
<a class="nd_this-port-only" href="[% device_ports %]&q=[% params.q | uri %]&f=[% row.slave_of | uri %]&prefer=port">
|
|
[% row.slave_of | html_entity %]</a>
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
|
|
[% FOREACH config IN settings._extra_device_port_cols %]
|
|
[% NEXT UNLESS config.position == 'mid' AND params.${config.name} %]
|
|
<td>
|
|
[% TRY %]
|
|
[% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
|
|
[% CATCH %]
|
|
<!-- dummy content required by Template Toolkit TRY -->
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_descr %]
|
|
<td nowrap>[% row.descr | html_entity %]</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_comment %]
|
|
<td nowrap>[% row.last_comment | html_entity %]</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_type %]
|
|
<td>[% row.type | html_entity %]</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_duplex %]
|
|
<td>
|
|
[% IF row.up == 'up' AND row.duplex %]
|
|
[% (row.duplex_admin.ucfirst || 'Auto') | html_entity %] / [% row.duplex.ucfirst | html_entity %]
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_lastchange %]
|
|
<td>[% row.lastchange_stamp | html_entity %]</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_name %]
|
|
[% IF user_can_port_control AND params.c_admin %]
|
|
<td nowrap class="nd_editable-cell" contenteditable="true"
|
|
data-field="c_name" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
|
<i class="icon-edit nd_edit-icon"></i>
|
|
[% ELSE %]
|
|
<td nowrap class="nd_editable-cell">
|
|
[% END %]
|
|
<div class="nd_editable-cell-content">
|
|
[% row.name | html_entity %]
|
|
</div>
|
|
</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_speed %]
|
|
<td>[% row.speed | html_entity %]</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_mac %]
|
|
<td>[% row.mac | html_entity %]</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_mtu %]
|
|
<td>[% row.mtu | html_entity %]</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_pvid %]
|
|
[% IF user_can_port_control AND params.c_admin %]
|
|
<td class="nd_editable-cell" contenteditable="true" data-default="[% row.vlan | html_entity %]"
|
|
data-field="c_pvid" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
|
<i class="icon-edit nd_edit-icon"></i>
|
|
<div class="nd_editable-cell-content">
|
|
[% IF row.vlan %][% row.vlan | html_entity %][% END %]
|
|
</div>
|
|
</td>
|
|
[% ELSE %]
|
|
<td>
|
|
<a class="nd_linkcell"
|
|
href="[% uri_for('/search') %]?tab=vlan&q=[% row.vlan | uri %]">
|
|
[% row.vlan | html_entity %]</a>
|
|
</td>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF params.c_vmember %]
|
|
<td>
|
|
[% IF vlans.$portname.vlan_count <= settings.devport_vlan_limit %]
|
|
[% SET output = '' %]
|
|
[% FOREACH vlan IN vlans.$portname.vlan_set.nsort %]
|
|
[% SET output = output _
|
|
'<a href="' _ uri_for('/search') _ '?tab=vlan&q=' _ vlan _ '">' _ vlan _ '</a>' %]
|
|
[% SET output = output _ ', ' IF NOT loop.last %]
|
|
[% END %]
|
|
[% IF vlans.$portname.vlan_count > 10 %] [%# TODO make this a settable variable %]
|
|
[% SET output = '<div class="nd_vlan-total">(' _ vlans.$portname.vlan_count
|
|
_ ')</div><span class="nd_linkcell nd_collapse-vlans">
|
|
<div class="nd_arrow-up-down-left icon-chevron-up icon-large"></div>Show VLANs</span>
|
|
<div class="nd_collapsing nd_collapse-pre-hidden">' _ output %]
|
|
[% SET output = output _ '</div>' %]
|
|
[% END %]
|
|
[% output %]
|
|
[% ELSE %]
|
|
<i class="icon-asterisk text-warning"></i> ([% vlans.$portname.vlan_count %] is too many to list)
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_power %]
|
|
[% IF row.power %]
|
|
[% IF row.power.admin == 'true' %]
|
|
[% IF user_can_port_control AND params.c_admin %]
|
|
<td nowrap data-action="false"
|
|
data-field="c_power" data-for-device="[% device.ip | html_entity %]"
|
|
data-for-port="[% row.port | html_entity %]">
|
|
|
|
<i class="icon-off nd_power-icon nd_power-on"
|
|
rel="tooltip" data-placement="top" data-offset="3"
|
|
data-animation="" data-title="Disable Power"></i>
|
|
[% ELSE %]
|
|
<td nowrap>
|
|
<i class="icon-off nd_power-on"></i>
|
|
[% END %]
|
|
<span>
|
|
[% IF row.power.power > 0 %]
|
|
[% row.power.power | html_entity %] mW
|
|
[% ELSE %]
|
|
([% row.power.status | html_entity %])
|
|
[% END %]
|
|
</span>
|
|
[% ELSE %]
|
|
[% IF user_can_port_control AND params.c_admin %]
|
|
<td nowrap data-action="true"
|
|
data-field="c_power" data-for-device="[% device.ip | html_entity %]"
|
|
data-for-port="[% row.port | html_entity %]">
|
|
|
|
<i class="icon-off nd_power-icon"
|
|
rel="tooltip" data-placement="top" data-offset="3"
|
|
data-animation="" data-title="Enable Power"></i>
|
|
[% ELSE %]
|
|
<td>
|
|
<i class="icon-off"></i>
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
[% ELSE %]
|
|
<td></td>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF params.c_ssid %]
|
|
<td>[% row.ssid.ssid | html_entity %]</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_nodes OR params.c_neighbors %]
|
|
<td>
|
|
[% IF params.c_neighbors AND (row.remote_ip OR row.is_uplink) %]
|
|
[% IF row.get_column('neighbor_ip') %]
|
|
<i class="icon-link[% ' text-warning' IF row.manual_topo %]"></i>
|
|
[% IF row.remote_type AND row.remote_type.match('(?i)ip.phone') %]
|
|
<i class="icon-phone"></i>
|
|
[% ELSIF row.remote_type AND row.remote_type.match('^AP:\s') %]
|
|
<i class="icon-signal"></i>
|
|
[% END %]
|
|
<a href="[% device_ports %]&q=[% row.get_column('neighbor_ip') | uri %]">
|
|
[% row.get_column('neighbor_dns').remove(settings.domain_suffix) || row.get_column('neighbor_ip') | html_entity %]</a>
|
|
[% IF row.remote_port %]
|
|
-
|
|
<a href="[% device_ports %]&q=[% row.get_column('neighbor_ip') | uri %]&f=[% row.remote_port | uri %]&prefer=port">
|
|
[% row.remote_port | html_entity %]</a>
|
|
[% END %]
|
|
<br/>
|
|
[% IF params.neigh_id and (row.remote_id or row.remote_type) %]
|
|
([% 'id: '_ row.remote_id IF row.remote_id %]
|
|
[% ' type: '_ row.remote_type IF row.remote_type %])<br/>
|
|
[% END %]
|
|
[% ELSIF row.remote_ip %]
|
|
<i class="icon-unlink text-error"></i>
|
|
[% IF row.remote_type AND row.remote_type.match('(?i)ip.phone') %]
|
|
<i class="icon-phone"></i>
|
|
[% ELSIF row.remote_type AND row.remote_type.match('^AP:\s') %]
|
|
<i class="icon-signal"></i>
|
|
[% END %]
|
|
<a href="[% search_node %]&q=[% row.remote_ip | uri %]">
|
|
[% row.remote_ip | html_entity %]
|
|
[% ' - ' IF row.remote_port %][% row.remote_port | html_entity %]</a><br/>
|
|
[% IF params.neigh_id and (row.remote_id or row.remote_type) %]
|
|
([% 'id: '_ row.remote_id IF row.remote_id %]
|
|
[% ' type: '_ row.remote_type IF row.remote_type %])<br/>
|
|
[% END %]
|
|
[% ELSE %]
|
|
<i class="icon-unlink text-error"></i> (possible uplink)
|
|
[% END %]
|
|
[% END %]
|
|
[% IF params.c_nodes %]
|
|
[% FOREACH node IN row.$nodes %]
|
|
[% '<br/>' IF (row.remote_ip OR row.is_uplink) OR NOT loop.first %]
|
|
[% '<i class="icon-book"></i> ' IF NOT node.active %]
|
|
[% IF row.remote_type AND row.remote_type.match('(?i)ip.phone') %]
|
|
<i class="icon-phone"></i>
|
|
[% ELSIF node.wireless.defined
|
|
OR (row.remote_type AND row.remote_type.match('^AP:\s')) %]
|
|
<i class="icon-signal"></i>
|
|
[% END %]
|
|
<a href="[% search_node %]&q=[% node.net_mac.$mac_format_call | uri %]">
|
|
[% node.net_mac.$mac_format_call | html_entity %]</a>
|
|
[% IF (node.vlan > 0) && (node.vlan != row.vlan) %]
|
|
(on vlan [% node.vlan | html_entity %])
|
|
[% END %]
|
|
[% IF params.n_ssid AND node.wireless.defined %]
|
|
(SSID:
|
|
[% FOREACH wlan IN node.wireless %]
|
|
<a href="[%+ uri_for('/report/portssid') %]?ssid=[% wlan.ssid | uri %]">[% wlan.ssid | html_entity %]</a>
|
|
[% END %]
|
|
)
|
|
[% END %]
|
|
[% IF params.n_vendor AND node.oui.defined %]
|
|
(Vendor:
|
|
[% FOREACH oui IN node.oui %]
|
|
<a href="[%+ uri_for('/report/nodevendor') %]?vendor=[% oui.abbrev | uri %]">[% oui.abbrev | html_entity %]</a>
|
|
[% END %]
|
|
)
|
|
[% END %]
|
|
[% ' (' _ node.time_last_age _ ')' IF params.n_age %]
|
|
[% IF params.n_ip4 OR params.n_ip6 %]
|
|
[% FOREACH ip IN node.$ips %]
|
|
<br/> [% '<i class="icon-book"></i> ' IF NOT ip.active %]
|
|
[% SET dns = ip.dns %]
|
|
[% IF dns %]
|
|
<a href="[% search_node %]&q=[% ip.ip | uri %]">[% dns %] ([% ip.ip | html_entity %])</a>
|
|
[% ELSE %]
|
|
<a href="[% search_node %]&q=[% ip.ip | uri %]">[% ip.ip | html_entity %]</a>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% IF params.n_netbios %]
|
|
[% FOREACH nbt IN node.netbios %]
|
|
<br/> \\<a href="[% uri_for('/report/netbios') %]?domain=[% nbt.domain | uri %]" title="Nodes in this Domain">[% nbt.domain | html_entity %]</a>\<a href="[% search_node %]&q=[% nbt.nbname | uri %]">[% nbt.nbname | html_entity %]</a>
|
|
<br/> [% nbt.nbuser || '[No User]' | html_entity %]@<a href="[% search_node %]&q=[% nbt.ip | uri %]">[% nbt.ip | html_entity %]</a>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% IF user_can_port_control AND params.c_admin %]
|
|
<a class="nd_log-icon"
|
|
href="[% uri_for('/admin/topology') %]?dev1=[% device.ip | uri %]&port1=[% row.port | uri %]">
|
|
<i class="icon-bolt"
|
|
rel="tooltip" data-placement="top" data-offset="3"
|
|
data-animation="" data-title="Manual Topology"></i>
|
|
[% END %]
|
|
</a>
|
|
</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_stp %]
|
|
<td>[% row.stp | html_entity %]</td>
|
|
[% END %]
|
|
|
|
[% IF params.c_up %]
|
|
<td>
|
|
[% row.up_admin.ucfirst | html_entity %] / [% row.up.ucfirst | html_entity %]
|
|
</td>
|
|
[% END %]
|
|
|
|
[% FOREACH config IN settings._extra_device_port_cols %]
|
|
[% NEXT UNLESS config.position == 'right' AND params.${config.name} %]
|
|
<td>
|
|
[% TRY %]
|
|
[% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
|
|
[% CATCH %]
|
|
<!-- dummy content required by Template Toolkit TRY -->
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
|
|
[% IF user_can_port_control %]
|
|
<div id="nd_portlog" class="nd_modal nd_deep-horizon modal hide fade" tabindex="-1"
|
|
role="dialog" aria-hidden="true">
|
|
<div class="modal-body">
|
|
<blockquote>
|
|
<ul><li><p>Please provide a reason for changing the Port Configuration</p></li></ul>
|
|
</blockquote>
|
|
<select id="nd_portlog-reason" class="input-block-level" name="reason">
|
|
[% FOREACH pair IN settings.port_control_reasons.pairs %]
|
|
<option[% ' selected="selected"' IF pair.key == 'other' %] value="[% pair.key | html_entity %]">
|
|
[% pair.value | html_entity %]</option>
|
|
[% END %]
|
|
</select>
|
|
<textarea id="nd_portlog-log" class="input-block-level" rows="2" name="log"
|
|
placeholder="Enter a log message"></textarea>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
|
|
<button id="nd_portlog-submit" class="btn btn-info" data-dismiss="modal">Continue</button>
|
|
</div>
|
|
</div>
|
|
[% END %]
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#dp-data-table').dataTable({
|
|
"columnDefs": [
|
|
{ "sortable": false, "targets": 0 },
|
|
{ "searchable": false, "targets": 0 },
|
|
{ "type": 'portsort', "targets": [ 'portsort' ] }
|
|
],
|
|
"order": [[ 1, 'asc' ]],
|
|
[% INCLUDE 'ajax/datatabledefaults.tt' -%]
|
|
} );
|
|
} );
|
|
</script>
|