debian-koji/www/kojiweb/hosts.chtml
2007-02-14 11:25:01 -05:00

79 lines
3.4 KiB
Text

#from kojiweb import util
#include "includes/header.chtml"
<h4>Hosts</h4>
<table class="data-list">
<tr>
<td class="paginate" colspan="6">
#if $len($hostPages) > 1
<form class="pageJump">
Page:
<select onchange="javascript: window.location = 'hosts?start=' + this.value * $hostRange + '$util.passthrough($self, 'order')';">
#for $pageNum in $hostPages
<option value="$pageNum"#if $pageNum == $hostCurrentPage then ' selected' else ''#>#echo $pageNum + 1#</option>
#end for
</select>
</form>
#end if
#if $hostStart > 0
<a href="hosts?start=#echo $hostStart - $hostRange #$util.passthrough($self, 'order')">&lt;&lt;&lt;</a>
#end if
#if $totalHosts != 0
<strong>Hosts #echo $hostStart + 1 # through #echo $hostStart + $hostCount # of $totalHosts</strong>
#end if
#if $hostStart + $hostCount < $totalHosts
<a href="hosts?start=#echo $hostStart + $hostRange#$util.passthrough($self, 'order')">&gt;&gt;&gt;</a>
#end if
</td>
</tr>
<tr class="list-header">
<th><a href="hosts?order=$util.toggleOrder($self, 'id')">ID</a> $util.sortImage($self, 'id')</th>
<th><a href="hosts?order=$util.toggleOrder($self, 'name')">Name</a> $util.sortImage($self, 'name')</th>
<th>Arches</th>
<th><a href="hosts?order=$util.toggleOrder($self, 'enabled')">Enabled?</a> $util.sortImage($self, 'enabled')</th>
<th><a href="hosts?order=$util.toggleOrder($self, 'ready')">Ready?</a> $util.sortImage($self, 'ready')</th>
<th><a href="hosts?order=$util.toggleOrder($self, 'last_update')">Last Update</a> $util.sortImage($self, 'last_update')</th>
</tr>
#if $len($hosts) > 0
#for $host in $hosts
<tr class="$util.rowToggle($self)">
<td>$host.id</td>
<td><a href="hostinfo?hostID=$host.id">$host.name</a></td>
<td>$host.arches</td>
<td class="$str($bool($host.enabled)).lower()">#if $host.enabled then $util.imageTag('yes') else $util.imageTag('no')#</td>
<td class="$str($bool($host.ready)).lower()">#if $host.ready then $util.imageTag('yes') else $util.imageTag('no')#</td>
<td>$util.formatTime($host.last_update)</td>
</tr>
#end for
#else
<tr class="row-odd">
<td colspan="6">No hosts</td>
</tr>
#end if
<tr>
<td class="paginate" colspan="6">
#if $len($hostPages) > 1
<form class="pageJump">
Page:
<select onchange="javascript: window.location = 'hosts?start=' + this.value * $hostRange + '$util.passthrough($self, 'order')';">
#for $pageNum in $hostPages
<option value="$pageNum"#if $pageNum == $hostCurrentPage then ' selected' else ''#>#echo $pageNum + 1#</option>
#end for
</select>
</form>
#end if
#if $hostStart > 0
<a href="hosts?start=#echo $hostStart - $hostRange #$util.passthrough($self, 'order')">&lt;&lt;&lt;</a>
#end if
#if $totalHosts != 0
<strong>Hosts #echo $hostStart + 1 # through #echo $hostStart + $hostCount # of $totalHosts</strong>
#end if
#if $hostStart + $hostCount < $totalHosts
<a href="hosts?start=#echo $hostStart + $hostRange#$util.passthrough($self, 'order')">&gt;&gt;&gt;</a>
#end if
</td>
</tr>
</table>
#include "includes/footer.chtml"