Subnet Utilization report
This commit is contained in:
25
Netdisco/share/views/ajax/report/subnets.tt
Normal file
25
Netdisco/share/views/ajax/report/subnets.tt
Normal file
@@ -0,0 +1,25 @@
|
||||
[% IF results.count == 0 %]
|
||||
<div class="span2 alert alert-info">No matching records.</div>
|
||||
[% ELSE %]
|
||||
<table class="table table-bordered table-condensed table-striped nd_floatinghead">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="nd_center-cell">Subnet</th>
|
||||
<th class="nd_center-cell">Size</th>
|
||||
<th class="nd_center-cell">Number of Active Nodes</th>
|
||||
<th class="nd_center-cell">Percent Utilization</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</tbody>
|
||||
[% FOREACH row IN results.all %]
|
||||
<tr>
|
||||
<td class="nd_center-cell">[% row.subnet | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.subnet_size | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.active | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.percent | html_entity %]</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
</table>
|
||||
[% END %]
|
||||
|
||||
14
Netdisco/share/views/ajax/report/subnets_csv.tt
Normal file
14
Netdisco/share/views/ajax/report/subnets_csv.tt
Normal file
@@ -0,0 +1,14 @@
|
||||
[% USE CSV %]
|
||||
[% CSV.dump([ 'Subnet' 'Size' 'Number of Active Nodes' 'Percent Utilization' ]) %]
|
||||
|
||||
[% FOREACH row IN results.all %]
|
||||
[% mylist = [] %]
|
||||
[% mylist.push(row.subnet) %]
|
||||
[% mylist.push(row.subnet_size) %]
|
||||
[% mylist.push(row.active) %]
|
||||
[% mylist.push(row.percent) %]
|
||||
[% CSV.dump(mylist) %]
|
||||
|
||||
[% END %]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user