|
@@ -6,7 +6,10 @@
[% 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} %]
- [% item.label | html_entity %] |
+
+ [% item.label | html_entity %]
+ |
[% END %]
@@ -25,87 +28,109 @@
[% END %]
+ [% FOREACH config IN settings._extra_device_port_cols %]
+ [% NEXT UNLESS config.position == 'left' AND params.${config.name} %]
+
+ [% TRY %]
+ [% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
+ [% CATCH %]
+
+ [% END %]
+ |
+ [% END %]
+
[% IF params.c_port %]
[% IF vars.user.port_control AND params.c_admin %]
[% IF row.up_admin == 'up' %]
-
-
+
[% ELSE %]
- |
-
+
[% END %]
[% ELSE %]
|
[% END %]
-
[% row.port | html_entity %]
|
[% END %]
+ [% FOREACH config IN settings._extra_device_port_cols %]
+ [% NEXT UNLESS config.position == 'mid' AND params.${config.name} %]
+
+ [% TRY %]
+ [% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
+ [% CATCH %]
+
+ [% END %]
+ |
+ [% END %]
+
[% IF params.c_descr %]
- [% row.descr | html_entity %] |
+ [% row.descr | html_entity %] |
[% END %]
[% IF params.c_type %]
- [% row.type | html_entity %] |
+ [% row.type | html_entity %] |
[% END %]
[% IF params.c_duplex %]
-
+ |
[% IF row.up == 'up' AND row.duplex %]
- [% row.duplex_admin | html_entity %] / [% row.duplex | html_entity %]
+ [% row.duplex_admin.ucfirst | html_entity %] / [% row.duplex.ucfirst | html_entity %]
[% END %]
|
[% END %]
[% IF params.c_lastchange %]
- [% row.lastchange_stamp | html_entity %] |
+ [% row.lastchange_stamp | html_entity %] |
[% END %]
[% IF params.c_name %]
[% IF vars.user.port_control AND params.c_admin %]
-
-
+ |
+
[% ELSE %]
- |
+ |
[% END %]
-
+
[% row.name | html_entity %]
|
[% END %]
[% IF params.c_speed %]
- [% row.speed | html_entity %] |
+ [% row.speed | html_entity %] |
[% END %]
[% IF params.c_mac %]
- [% row.mac | html_entity %] |
+ [% row.mac | html_entity %] |
[% END %]
[% IF params.c_mtu %]
- [% row.mtu | html_entity %] |
+ [% row.mtu | html_entity %] |
[% END %]
[% IF params.c_vlan %]
[% IF vars.user.port_control AND params.c_admin %]
-
-
-
+
+
+
[% IF row.vlan %][% row.vlan | html_entity %][% END %]
|
[% ELSE %]
-
+ |
[% row.vlan | html_entity %]
@@ -123,11 +148,10 @@
[% SET output = output _ ', ' IF NOT loop.last %]
[% END %]
[% IF row.tagged_vlans_count > 10 %] [%# TODO make this a settable variable %]
- [% SET output = ' (' _ row.tagged_vlans_count
- _ ')
-
- Show VLANs
- ' _ output %]
+ [% SET output = ' (' _ row.tagged_vlans_count
+ _ ')
+ Show VLANs
+ ' _ output %]
[% SET output = output _ ' ' %]
[% END %]
[% output %]
@@ -140,15 +164,15 @@
[% IF row.power.admin == 'true' %]
[% IF vars.user.port_control AND params.c_admin %]
-
[% ELSE %]
|
-
+
[% END %]
[% IF row.power.power > 0 %]
@@ -160,10 +184,10 @@
[% ELSE %]
[% IF vars.user.port_control AND params.c_admin %]
|
-
[% ELSE %]
@@ -179,22 +203,25 @@
[% IF params.c_nodes OR params.c_neighbors %]
|
- [% IF params.c_neighbors AND row.remote_ip %]
+ [% IF params.c_neighbors AND (row.remote_ip OR row.is_uplink) %]
[% IF row.neighbor %]
[% row.neighbor.dns.remove(settings.domain_suffix) || row.neighbor.ip | html_entity %]
([% row.remote_port | html_entity %])
- [% ELSE %]
+ [% ELSIF row.remote_ip AND row.remote_port %]
N
[% row.remote_ip | html_entity %] (port: [% row.remote_port | html_entity %]
- id: [% (row.remote_type _ ' / ') IF row.remote_type %][% row.remote_id | html_entity %])
+ [% ' id: '_ row.remote_type IF row.remote_type%]
+ [% ' type: '_ row.remote_id IF row.remote_id%])
+ [% ELSE %]
+ N (probable neighbor)
[% END %]
[% END %]
[% IF params.c_nodes %]
[% FOREACH node IN row.$nodes %]
- [% ' ' IF row.remote_ip OR NOT loop.first %]
+ [% ' ' IF (row.remote_ip OR row.is_uplink) OR NOT loop.first %]
[% 'A ' IF NOT node.active %]
[% node.net_mac.$mac_format_call | html_entity %]
@@ -216,14 +243,25 @@
[% END %]
[% IF params.c_stp %]
- | [% row.stp | html_entity %] |
+ [% row.stp | html_entity %] |
[% END %]
[% IF params.c_up %]
-
- [% row.up_admin | html_entity %] / [% row.up | html_entity %]
+ |
+ [% row.up_admin.ucfirst | html_entity %] / [% row.up.ucfirst | html_entity %]
|
[% END %]
+
+ [% FOREACH config IN settings._extra_device_port_cols %]
+ [% NEXT UNLESS config.position == 'right' AND params.${config.name} %]
+
+ [% TRY %]
+ [% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
+ [% CATCH %]
+
+ [% END %]
+ |
+ [% END %]
[% END %]
diff --git a/Netdisco/share/views/ajax/report/duplexmismatch.tt b/Netdisco/share/views/ajax/report/duplexmismatch.tt
index d0a67bb0..a13f40be 100644
--- a/Netdisco/share/views/ajax/report/duplexmismatch.tt
+++ b/Netdisco/share/views/ajax/report/duplexmismatch.tt
@@ -1,28 +1,28 @@
-
+
- | Left Device |
- Interface |
- Duplex |
- Right Device |
- Interface |
- Duplex |
+ Left Device |
+ Interface |
+ Duplex |
+ Right Device |
+ Interface |
+ Duplex |
[% WHILE (row = results.next) %]
- | [% row.left_dns || row.left_ip | html_entity %]
- | [% row.left_dns || row.left_ip | html_entity %]
+ |
[% row.left_port | html_entity %] |
- [% row.left_duplex.ucfirst | html_entity %] |
+ [% row.left_duplex.ucfirst | html_entity %] |
- [% row.right_dns || row.right_ip | html_entity %]
- | [% row.right_dns || row.right_ip | html_entity %]
+ |
[% row.right_port | html_entity %] |
- [% row.right_duplex.ucfirst | html_entity %] |
+ [% row.right_duplex.ucfirst | html_entity %] |
[% END %]
diff --git a/Netdisco/share/views/ajax/search/device.tt b/Netdisco/share/views/ajax/search/device.tt
index 10e3f560..dd24dc64 100644
--- a/Netdisco/share/views/ajax/search/device.tt
+++ b/Netdisco/share/views/ajax/search/device.tt
@@ -1,4 +1,4 @@
-
+
| Device |
diff --git a/Netdisco/share/views/ajax/search/node_by_ip.tt b/Netdisco/share/views/ajax/search/node_by_ip.tt
index 6a994705..28ba2680 100644
--- a/Netdisco/share/views/ajax/search/node_by_ip.tt
+++ b/Netdisco/share/views/ajax/search/node_by_ip.tt
@@ -1,4 +1,4 @@
-
+
| MAC |
diff --git a/Netdisco/share/views/ajax/search/node_by_mac.tt b/Netdisco/share/views/ajax/search/node_by_mac.tt
index 34e445b9..adefc4c8 100644
--- a/Netdisco/share/views/ajax/search/node_by_mac.tt
+++ b/Netdisco/share/views/ajax/search/node_by_mac.tt
@@ -1,4 +1,4 @@
-
+
| MAC |
diff --git a/Netdisco/share/views/ajax/search/port.tt b/Netdisco/share/views/ajax/search/port.tt
index 5d0acef7..4bded247 100644
--- a/Netdisco/share/views/ajax/search/port.tt
+++ b/Netdisco/share/views/ajax/search/port.tt
@@ -1,4 +1,4 @@
-
+
| Description |
diff --git a/Netdisco/share/views/ajax/search/vlan.tt b/Netdisco/share/views/ajax/search/vlan.tt
index 1e6e663a..38056085 100644
--- a/Netdisco/share/views/ajax/search/vlan.tt
+++ b/Netdisco/share/views/ajax/search/vlan.tt
@@ -1,4 +1,4 @@
- | |