Files
netdisco/Netdisco/share/views/ajax/report/subnets.tt
2014-02-25 21:54:00 -05:00

33 lines
1.1 KiB
Plaintext

[% IF NOT results.has_rows %]
<div class="span2 alert alert-info">No matching records.</div>
[% ELSE %]
[% USE Number.Format %]
<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
<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"><a href="[% uri_for('/report/ipinventory') %]?subnet=[% row.subnet | uri %]&daterange=[% daterange | uri %]&limit=[% row.subnet_size | uri %]">
[% row.subnet | html_entity %]</a></td>
<td class="nd_center-cell">[% row.subnet_size | format_number %]</td>
<td class="nd_center-cell">[% row.active | format_number %]</td>
<td class="nd_center-cell">[% row.percent | html_entity %]</td>
</tr>
[% END %]
</tbody>
</table>
[% END %]
<script type="text/javascript">
$(document).ready(function() {
$('#data-table').dataTable();
} );
</script>