implement device search!

This commit is contained in:
Oliver Gorwits
2012-01-08 22:02:38 +00:00
parent ef9c6e8452
commit cd7b9dc18d
9 changed files with 231 additions and 13 deletions

View File

@@ -0,0 +1,29 @@
<table class="bordered-table condensed-table zebra-striped">
<thead>
<tr>
<th>Device</th>
<th>Contact</th>
<th>Location</th>
<th>System Name</th>
<th>Model</th>
<th>OS Version</th>
<th>Management IP</th>
<th>Serial</th>
</tr>
</thead>
</tbody>
[% WHILE (row = results.next) %]
<tr>
<td><a href="/device?q=[% row.ip %]">[% row.dns.remove(settings.domain_suffix) %]</a></td>
<td>[% row.contact %]</td>
<td>[% row.location %]</td>
<td>[% row.name %]</td>
<!-- <td>[% row.description.substr(0, 100) %][% ' &hellip;' IF row.description.length > 100 %]</td> -->
<td>[% row.model %]</td>
<td>[% row.os_ver %]</td>
<td>[% row.ip %]</td>
<td>[% row.serial %]</td>
</tr>
[% END %]
</tbody>
</table>

View File

@@ -2,20 +2,20 @@
<thead>
<tr>
<th>Name</th>
<th>Port</th>
<th>Description</th>
<th>Vlan</th>
<th>Port</th>
</tr>
</thead>
</tbody>
[% WHILE (row = results.next) %]
<tr>
<td>[% row.name %]</td>
<td>[% row.descr %]</td>
<td>[% row.vlan %]</td>
<td><a href="/device?q=[% row.ip %]&port=[% row.port %]">[% row.ip %] [ [% row.port %] ]</a>
[% ' (' _ row.device.dns.remove(settings.domain_suffix) _ ')' IF row.device.dns %]
</td>
</td>
<td>[% row.descr %]</td>
<td>[% row.vlan %]</td>
</tr>
[% END %]
</tbody>