Add vendor to IP Inventory report (#714)
* request on mailing list by Adrian Sevcenco, 08.04.20, "[Netdisco] how to modify report: add column to ip inventory"
This commit is contained in:
committed by
GitHub
parent
b155be832d
commit
48996661ce
@@ -3,6 +3,7 @@
|
||||
<tr>
|
||||
<th>IP Address</th>
|
||||
<th>MAC Address</th>
|
||||
<th>Vendor</th>
|
||||
<th class="nd_center-cell">DNS</th>
|
||||
<th>Last Used</th>
|
||||
</tr>
|
||||
@@ -42,6 +43,12 @@ $(document).ready(function() {
|
||||
}
|
||||
return cell_str;
|
||||
}
|
||||
}, {
|
||||
"data": 'vendor',
|
||||
"className": "nd_nowrap nd_center-cell",
|
||||
"render": function(data, type, row, meta) {
|
||||
return he.encode(data || '');
|
||||
}
|
||||
}, {
|
||||
"data": 'dns',
|
||||
"className": "nd_nowrap nd_center-cell",
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
[% USE CSV %]
|
||||
[% CSV.dump([ 'Node' 'MAC Address' 'DNS' 'Last Used' ]) %]
|
||||
[% CSV.dump([ 'Node' 'MAC Address' 'Vendor' 'DNS' 'Last Used' ]) %]
|
||||
|
||||
[% FOREACH row IN results %]
|
||||
[% mylist = [] %]
|
||||
[% mylist.push(row.ip) %]
|
||||
[% mylist.push(row.mac) %]
|
||||
[% mylist.push(row.vendor) %]
|
||||
[% mylist.push(row.dns) %]
|
||||
[% mylist.push(row.time_last) %]
|
||||
[% CSV.dump(mylist) %]
|
||||
|
||||
Reference in New Issue
Block a user