fix to IP Inventory for nodes with archive records.

also change column Device to be named Node.
This commit is contained in:
Oliver Gorwits
2014-02-22 11:24:18 +00:00
parent 6eb88bc443
commit bb38f40816
4 changed files with 6 additions and 3 deletions

View File

@@ -20,6 +20,7 @@
* Fix for crash when selecting Last Change column in device ports view * Fix for crash when selecting Last Change column in device ports view
* Fix IP Inventory Report to work without daterange * Fix IP Inventory Report to work without daterange
* Fix "list IPs never seen" to work without daterange in IP Inventory Report * Fix "list IPs never seen" to work without daterange in IP Inventory Report
* Correct "Archive" status of nodes in IP Inventory Report
2.023002 - 2014-02-17 2.023002 - 2014-02-17

View File

@@ -109,6 +109,7 @@ get '/ajax/content/report/ipinventory' => require_login sub {
'ip', 'dns', 'time_last', 'time_first', 'ip', 'dns', 'time_last', 'time_first',
'active', 'node', 'age' 'active', 'node', 'age'
], ],
order_by => [{-asc => 'ip'}, {-desc => 'active'}],
} }
)->as_query; )->as_query;

View File

@@ -1,7 +1,7 @@
<table class="table table-bordered table-condensed table-striped nd_floatinghead"> <table class="table table-bordered table-condensed table-striped nd_floatinghead">
<thead> <thead>
<tr> <tr>
<th>Device</th> <th>Node</th>
<th class="nd_center-cell">DNS</th> <th class="nd_center-cell">DNS</th>
<th class="nd_center-cell">Last Used</th> <th class="nd_center-cell">Last Used</th>
<th class="nd_center-cell">First Discovered</th> <th class="nd_center-cell">First Discovered</th>
@@ -11,7 +11,8 @@
[% FOREACH row IN results %] [% FOREACH row IN results %]
<tr> <tr>
[% IF row.time_last && row.node %] [% IF row.time_last && row.node %]
<td><a href="[% search_node %]&q=[% row.ip | uri %]">[% row.ip | html_entity %]</a> <td><a href="[% search_node %]&q=[% row.ip | uri %][% '&archived=on' IF NOT row.active %]">
[% row.ip | html_entity %]</a>
[% '&nbsp;<i class="icon-book text-warning"></i>&nbsp;' IF NOT row.active %] [% '&nbsp;<i class="icon-book text-warning"></i>&nbsp;' IF NOT row.active %]
</td> </td>
[% ELSIF row.time_last %] [% ELSIF row.time_last %]

View File

@@ -1,5 +1,5 @@
[% USE CSV %] [% USE CSV %]
[% CSV.dump([ 'Device' 'DNS' 'Time Last' 'Time First' ]) %] [% CSV.dump([ 'Node' 'DNS' 'Time Last' 'Time First' ]) %]
[% FOREACH row IN results %] [% FOREACH row IN results %]
[% mylist = [] %] [% mylist = [] %]