diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/Search/Node.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/Search/Node.pm index a6648a6d..7e20aae2 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin/Search/Node.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/Search/Node.pm @@ -90,9 +90,11 @@ ajax '/ajax/content/search/node' => require_login sub { { -and => [@where_mac] }, { order_by => { '-desc' => 'time_last' }, '+columns' => [ + 'oui.company', { time_last_stamp => \"to_char(time_last, 'YYYY-MM-DD HH24:MI')" - }] + }], + join => 'oui' } ); diff --git a/Netdisco/share/views/ajax/search/node_by_ip.tt b/Netdisco/share/views/ajax/search/node_by_ip.tt index 83a1230d..f8b2c9af 100644 --- a/Netdisco/share/views/ajax/search/node_by_ip.tt +++ b/Netdisco/share/views/ajax/search/node_by_ip.tt @@ -1,6 +1,6 @@ [% USE date(format = '%Y-%m-%d %H:%M') %] [% USE Number.Format %] -
| MAC | @@ -19,14 +19,13 @@ [% WHILE (row = macs.next) %] [% IF row.nbname %]||||||
|---|---|---|---|---|---|---|
| + | [% row.net_mac.$mac_format_call | html_entity %] | [% IF params.show_vendor %][% row.oui.company | html_entity %] | [% END %]NetBIOS | -\\[% row.domain | html_entity %]\[% row.nbname | html_entity %] + | \\[% row.domain | html_entity %]\[% row.nbname | html_entity %]
[% row.nbuser || '[No User]' | html_entity %]@[% row.ip | html_entity %] |
[% IF params.stamps %]
@@ -36,14 +35,14 @@
|
| + | [% row.net_mac.$mac_format_call | html_entity %] | [% IF params.show_vendor %][% row.oui.company | html_entity %] | [% END %]IP → MAC | -[% row.ip | html_entity %] + | + [% row.ip | html_entity %] [% ' ' IF NOT row.active %] [% ' (' _ row.dns.remove(settings.domain_suffix) _ ')' IF row.dns %] | @@ -55,12 +54,15 @@ [% END %] [% FOREACH nbt IN row.netbios %]|
| + | + [% nbt.net_mac.$mac_format_call | html_entity %] | [% IF params.show_vendor %] -+ | + [% nbt.oui.company | html_entity %] + | [% END %]NetBIOS | -\\[% nbt.domain | html_entity %]\[% nbt.nbname | html_entity %] + | \\[% nbt.domain | html_entity %]\[% nbt.nbname | html_entity %]
[% nbt.nbuser || '[No User]' | html_entity %]@[% nbt.ip | html_entity %] |
[% IF params.stamps %]
@@ -71,12 +73,16 @@
[% END %]
[% FOREACH ni IN row.nodeips %]
| + | + [% ni.net_mac.$mac_format_call | html_entity %] | [% IF params.show_vendor %] -+ | + [% ni.oui.company | html_entity %] + | [% END %]IP → MAC | -[% ni.ip | html_entity %] + | + [% ni.ip | html_entity %] [% ' ' IF NOT ni.active %] [% ' (' _ ni.dns.remove(settings.domain_suffix) _ ')' IF ni.dns %] | @@ -88,12 +94,15 @@ [% END %] [% FOREACH node IN row.node_sightings(archive_filter) %]
| + | + [% node.net_mac.$mac_format_call | html_entity %] | [% IF params.show_vendor %] -+ | + [% node.oui.company | html_entity %] + | [% END %]Switch Port | -[% node.switch | html_entity %] - [% node.port | html_entity %] [% ' ' IF NOT node.active %] @@ -108,9 +117,12 @@ | |
| + | + [% wlan.net_mac.$mac_format_call | html_entity %] | [% IF params.show_vendor %] -+ | + [% wlan.oui.company | html_entity %] + | [% END %]Wireless Info | SSID: [% wlan.ssid | html_entity %] @@ -128,12 +140,16 @@ [% END %] [% FOREACH nodeip IN row.ip_aliases(archive_filter) %] | |
| + | + [% nodeip.net_mac.$mac_format_call | html_entity %] | [% IF params.show_vendor %] -+ | + [% nodeip.oui.company | html_entity %] + | [% END %]MAC → IP | -[% nodeip.ip | html_entity %] + | + [% nodeip.ip | html_entity %] [% ' ' IF NOT nodeip.active %] [% ' (' _ nodeip.dns.remove(settings.domain_suffix) _ ')' IF nodeip.dns %] | @@ -146,3 +162,55 @@ [% END %]
| MAC | @@ -7,7 +7,7 @@Vendor | [% END %]Match | -Device or Node | +Device or Node | [% IF params.stamps %]First Seen | Last Seen | @@ -15,29 +15,18 @@
|---|---|---|---|---|---|---|
| - [% IF first_row %] - + [% row.net_mac.$mac_format_call | html_entity %] - [% ELSE %] - - [% END %] - [% IF params.show_vendor %] | - [% IF first_row %] [% row.oui.company | html_entity %] - [% ELSE %] - - [% END %] | [% END %]MAC → IP | -[% row.ip | html_entity %] + | [% row.ip | html_entity %] [% ' ' IF NOT row.active %] [% ' (' _ row.dns.remove(settings.domain_suffix) _ ')' IF row.dns %] | @@ -46,31 +35,21 @@[% row.time_last_stamp | html_entity %] | [% END %]|
| - [% IF first_row %] - + [% node.net_mac.$mac_format_call | html_entity %] - [% ELSE %] - - [% END %] | [% IF params.show_vendor %]- [% IF first_row %] [% node.oui.company | html_entity %] - [% ELSE %] - - [% END %] | [% END %]Switch Port | -+ | + [% node.switch | html_entity %] - [% node.port | html_entity %] [% ' ' IF NOT node.active %] [% IF node.device.dns AND node.device_port AND node.device_port.name %] @@ -82,30 +61,20 @@ | [% node.time_last_stamp | html_entity %] | [% END %]|
| - [% IF first_row %] - [% port.mac | html_entity %] - [% ELSE %] - - [% END %] + [% port.net_mac.$mac_format_call | html_entity %] | [% IF params.show_vendor %]- [% IF first_row %] [% port.oui.company | html_entity %] - [% ELSE %] - - [% END %] | [% END %]Switch Port | -+ | + [% port.ip | html_entity %] - [% port.descr | html_entity %] [% IF port.device.dns AND port.name %] ([% port.device.dns | html_entity %] - [% port.name | html_entity %]) @@ -116,25 +85,19 @@ | [% port.creation | html_entity %] | [% END %]|
| - [% IF first_row %] - [% nbt.mac | html_entity %] - [% ELSE %] - - [% END %] + [% nbt.net_mac.$mac_format_call | html_entity %] | [% IF params.show_vendor %]- + [% nbt.oui.company | html_entity %] | [% END %]NetBIOS | -\\[% nbt.domain | html_entity %]\[% nbt.nbname | html_entity %] + | \\[% nbt.domain | html_entity %]\[% nbt.nbname | html_entity %]
[% nbt.nbuser || '[No User]' | html_entity %]@[% nbt.ip | html_entity %] |
[% IF params.stamps %]
@@ -142,21 +105,15 @@
[% nbt.time_last_stamp | html_entity %] | [% END %]|
| - [% IF first_row %] - [% wireless.mac | html_entity %] - [% ELSE %] - - [% END %] + [% wlan.net_mac.$mac_format_call | html_entity %] | [% IF params.show_vendor %]- + [% wlan.oui.company | html_entity %] | [% END %]Wireless Info | @@ -171,7 +128,58 @@[% wlan.get_column('time_last_stamp') | html_entity %] | [% END %]