#875 Node Search - swap IP and DNS, add system name, highlight most recent, in the Switch Port rows
This commit is contained in:
@@ -182,7 +182,7 @@ get '/ajax/content/search/node' => require_login sub {
|
||||
my $rs_dp = schema('netdisco')->resultset('DevicePort');
|
||||
if ($sightings->has_rows or $ips->has_rows or $netbios->has_rows) {
|
||||
my $ports = param('deviceports')
|
||||
? $rs_dp->search({ -and => [@where_mac] }) : undef;
|
||||
? $rs_dp->search({ -and => [@where_mac] }, { order_by => { '-desc' => 'creation' }}) : undef;
|
||||
|
||||
return template 'ajax/search/node_by_mac.tt', {
|
||||
ips => $ips,
|
||||
@@ -194,7 +194,7 @@ get '/ajax/content/search/node' => require_login sub {
|
||||
}
|
||||
else {
|
||||
my $ports = param('deviceports')
|
||||
? $rs_dp->search({ -and => [@where_mac, @porttimes] }) : undef;
|
||||
? $rs_dp->search({ -and => [@where_mac, @porttimes] }, { order_by => { '-desc' => 'creation' }}) : undef;
|
||||
|
||||
if (defined $ports and $ports->has_rows) {
|
||||
return template 'ajax/search/node_by_mac.tt', {
|
||||
|
||||
Reference in New Issue
Block a user