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 %] - +
@@ -19,14 +19,13 @@ [% WHILE (row = macs.next) %] [% IF row.nbname %] - [% IF params.show_vendor %] [% END %] - [% IF params.stamps %] @@ -36,14 +35,14 @@ [% ELSE %] - [% IF params.show_vendor %] [% END %] - @@ -55,12 +54,15 @@ [% END %] [% FOREACH nbt IN row.netbios %] - + [% IF params.show_vendor %] - + [% END %] - [% IF params.stamps %] @@ -71,12 +73,16 @@ [% END %] [% FOREACH ni IN row.nodeips %] - + [% IF params.show_vendor %] - + [% END %] - @@ -88,12 +94,15 @@ [% END %] [% FOREACH node IN row.node_sightings(archive_filter) %] - + [% IF params.show_vendor %] - + [% END %] - [% FOREACH wlan IN node.wireless %] - + [% IF params.show_vendor %] - + [% END %] - + [% IF params.show_vendor %] - + [% END %] - @@ -146,3 +162,55 @@ [% END %]
MAC
+ [% row.net_mac.$mac_format_call | html_entity %][% row.oui.company | html_entity %]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 %]
+ [% row.net_mac.$mac_format_call | html_entity %][% row.oui.company | html_entity %]IP → MAC[% row.ip | html_entity %] + + [% row.ip | html_entity %] [% '  ' IF NOT row.active %] [% ' (' _ row.dns.remove(settings.domain_suffix) _ ')' IF row.dns %]
  + [% nbt.net_mac.$mac_format_call | html_entity %]  + [% nbt.oui.company | html_entity %] + 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 %]
  + [% ni.net_mac.$mac_format_call | html_entity %]  + [% ni.oui.company | html_entity %] + IP → MAC[% ni.ip | html_entity %] + + [% ni.ip | html_entity %] [% '  ' IF NOT ni.active %] [% ' (' _ ni.dns.remove(settings.domain_suffix) _ ')' IF ni.dns %]
  + [% node.net_mac.$mac_format_call | html_entity %]  + [% node.oui.company | html_entity %] + 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 %]  + [% wlan.oui.company | html_entity %] + 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 %]  + [% nodeip.oui.company | html_entity %] + MAC → IP[% nodeip.ip | html_entity %] + + [% nodeip.ip | html_entity %] [% '  ' IF NOT nodeip.active %] [% ' (' _ nodeip.dns.remove(settings.domain_suffix) _ ')' IF nodeip.dns %]
+ + + + diff --git a/Netdisco/share/views/ajax/search/node_by_mac.tt b/Netdisco/share/views/ajax/search/node_by_mac.tt index 7921de86..aa4275e2 100644 --- a/Netdisco/share/views/ajax/search/node_by_mac.tt +++ b/Netdisco/share/views/ajax/search/node_by_mac.tt @@ -1,5 +1,5 @@ [% USE Number.Format %] - +
@@ -7,7 +7,7 @@ [% END %] - + [% IF params.stamps %] @@ -15,29 +15,18 @@ - [% SET first_row = 1 %] [% WHILE (row = ips.next) %] [% END %] - @@ -46,31 +35,21 @@ [% END %] - [% SET first_row = 0 %] [% END %] [% WHILE (node = sightings.next) %] [% IF params.show_vendor %] [% END %] - [% END %] - [% SET first_row = 0 %] [% END %] [% WHILE (port = ports.next) %] [% IF params.show_vendor %] [% END %] - [% END %] - [% SET first_row = 0 %] [% END %] [% WHILE (nbt = netbios.next) %] [% IF params.show_vendor %] [% END %] - [% IF params.stamps %] @@ -142,21 +105,15 @@ [% END %] - [% SET first_row = 0 %] [% END %] [% WHILE (wlan = wireless.next) %] [% IF params.show_vendor %] [% END %] @@ -171,7 +128,58 @@ [% END %] - [% SET first_row = 0 %] [% END %]
MACVendorMatchDevice or NodeDevice or NodeFirst Seen Last Seen
- [% 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 %] MAC → IP[% row.ip | html_entity %] + [% row.ip | html_entity %] [% '  ' IF NOT row.active %] [% ' (' _ row.dns.remove(settings.domain_suffix) _ ')' IF row.dns %] [% row.time_last_stamp | html_entity %]
- [% IF first_row %] - + [% node.net_mac.$mac_format_call | html_entity %] - [% ELSE %] -   - [% END %] - [% IF first_row %] [% node.oui.company | html_entity %] - [% ELSE %] -   - [% 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 %]
- [% IF first_row %] - [% port.mac | html_entity %] - [% ELSE %] -   - [% END %] + [% port.net_mac.$mac_format_call | html_entity %] - [% IF first_row %] [% port.oui.company | html_entity %] - [% ELSE %] -   - [% 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 %]
- [% IF first_row %] - [% nbt.mac | html_entity %] - [% ELSE %] -   - [% END %] + [% nbt.net_mac.$mac_format_call | html_entity %] -   + [% nbt.oui.company | html_entity %] 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 %]
[% nbt.time_last_stamp | html_entity %]
- [% IF first_row %] - [% wireless.mac | html_entity %] - [% ELSE %] -   - [% END %] + [% wlan.net_mac.$mac_format_call | html_entity %] -   + [% wlan.oui.company | html_entity %] Wireless Info[% wlan.get_column('time_last_stamp') | html_entity %]
+ + + +