add ifindex column for show
This commit is contained in:
@@ -379,6 +379,14 @@ Returns true if the remote LLDP neighbor has reported Telephone capability.
|
|||||||
|
|
||||||
sub remote_is_phone { return (shift)->get_column('remote_is_phone') }
|
sub remote_is_phone { return (shift)->get_column('remote_is_phone') }
|
||||||
|
|
||||||
|
=head2 ifindex
|
||||||
|
|
||||||
|
Returns the interface index (C<ifIndex>) of the port.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub ifindex { return (shift)->get_column('ifindex') }
|
||||||
|
|
||||||
=head2 remote_inventory
|
=head2 remote_inventory
|
||||||
|
|
||||||
Returns a synthesized description of the remote LLDP device if inventory
|
Returns a synthesized description of the remote LLDP device if inventory
|
||||||
|
|||||||
@@ -136,6 +136,8 @@ will add the following additional synthesized columns to the result set:
|
|||||||
|
|
||||||
=item remote_is_phone (boolean)
|
=item remote_is_phone (boolean)
|
||||||
|
|
||||||
|
=item ifindex
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
@@ -152,10 +154,12 @@ sub with_properties {
|
|||||||
properties.remote_is_discoverable
|
properties.remote_is_discoverable
|
||||||
properties.remote_is_wap
|
properties.remote_is_wap
|
||||||
properties.remote_is_phone
|
properties.remote_is_phone
|
||||||
|
properties.ifindex
|
||||||
/],
|
/],
|
||||||
'+as' => [qw/
|
'+as' => [qw/
|
||||||
error_disable_cause
|
error_disable_cause
|
||||||
remote_is_discoverable remote_is_wap remote_is_phone
|
remote_is_discoverable remote_is_wap remote_is_phone
|
||||||
|
ifindex
|
||||||
/],
|
/],
|
||||||
join => 'properties',
|
join => 'properties',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -116,16 +116,17 @@ sidebar_defaults:
|
|||||||
c_descr: { label: 'Description', default: null, idx: 2 }
|
c_descr: { label: 'Description', default: null, idx: 2 }
|
||||||
c_comment: { label: 'Last Comment', default: null, idx: 3 }
|
c_comment: { label: 'Last Comment', default: null, idx: 3 }
|
||||||
c_type: { label: 'Type', default: null, idx: 4 }
|
c_type: { label: 'Type', default: null, idx: 4 }
|
||||||
c_lastchange: { label: 'Last Change', default: null, idx: 5 }
|
c_ifindex: { label: 'Interface Index', default: null, idx: 5 }
|
||||||
c_name: { label: 'Name', default: checked, idx: 6 }
|
c_lastchange: { label: 'Last Change', default: null, idx: 6 }
|
||||||
c_speed_admin: { label: 'Speed (configured)', default: null, idx: 7 }
|
c_name: { label: 'Name', default: checked, idx: 7 }
|
||||||
c_speed: { label: 'Speed (running)', default: null, idx: 8 }
|
c_speed_admin: { label: 'Speed (configured)', default: null, idx: 8 }
|
||||||
c_duplex: { label: 'Duplex', default: null, idx: 9 }
|
c_speed: { label: 'Speed (running)', default: null, idx: 9 }
|
||||||
c_error: { label: 'Error Message', default: null, idx: 10 }
|
c_duplex: { label: 'Duplex', default: null, idx: 10 }
|
||||||
c_mac: { label: 'Port MAC', default: null, idx: 11 }
|
c_error: { label: 'Error Message', default: null, idx: 11 }
|
||||||
c_mtu: { label: 'MTU', default: null, idx: 12 }
|
c_mac: { label: 'Port MAC', default: null, idx: 12 }
|
||||||
c_pvid: { label: 'Native VLAN', default: checked, idx: 13 }
|
c_mtu: { label: 'MTU', default: null, idx: 13 }
|
||||||
c_vmember: { label: 'VLAN Membership', default: checked, idx: 14 }
|
c_pvid: { label: 'Native VLAN', default: checked, idx: 14 }
|
||||||
|
c_vmember: { label: 'VLAN Membership', default: checked, idx: 15 }
|
||||||
c_power: { label: 'PoE', default: null, idx: 16 }
|
c_power: { label: 'PoE', default: null, idx: 16 }
|
||||||
c_ssid: { label: 'SSID', default: null, idx: 17 }
|
c_ssid: { label: 'SSID', default: null, idx: 17 }
|
||||||
c_nodes: { label: 'Connected Nodes', default: null, idx: 18 }
|
c_nodes: { label: 'Connected Nodes', default: null, idx: 18 }
|
||||||
|
|||||||
@@ -153,6 +153,10 @@
|
|||||||
</td>
|
</td>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
[% IF params.c_ifindex %]
|
||||||
|
<td>[% row.ifindex | html_entity %]</td>
|
||||||
|
[% END %]
|
||||||
|
|
||||||
[% IF params.c_lastchange %]
|
[% IF params.c_lastchange %]
|
||||||
<td>[% row.lastchange_stamp | html_entity %]</td>
|
<td>[% row.lastchange_stamp | html_entity %]</td>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|||||||
@@ -79,6 +79,10 @@
|
|||||||
[% END %]
|
[% END %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
[% IF params.c_ifindex %]
|
||||||
|
[% myport.push(row.ifindex) %]
|
||||||
|
[% END %]
|
||||||
|
|
||||||
[% IF params.c_lastchange %]
|
[% IF params.c_lastchange %]
|
||||||
[% myport.push(row.lastchange_stamp) %]
|
[% myport.push(row.lastchange_stamp) %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|||||||
Reference in New Issue
Block a user