debian-koji/www/kojiweb/templates/rpmsbyhost.html.j2
2025-05-07 14:07:04 +02:00

107 lines
4.2 KiB
Django/Jinja

#include "header.html.j2"
# from "macros.html.j2" import rowToggle
<h4>{{ rpmArch + ' ' if rpmArch else '' }}RPMs by Host{{ ' (%s)' % hostArch if hostArch else '' }}</h4>
<table class="data-list">
<tr>
<td class="archlist" colspan="3">
<strong>Host arch:</strong>
#for arch in hostArchList
#if arch == hostArch
<strong>{{ arch }}</strong> |
#else
<a href="rpmsbyhost?hostArch={{ arch }}{{ util.passthrough('order', 'rpmArch') }}">{{ arch }}</a> |
#endif
#endfor
#if hostArch
<a href="rpmsbyhost?{{ util.passthrough('order', 'rpmArch', prefix='') }}">all</a>
#else
<strong>all</strong>
#endif
</td>
</tr>
<tr>
<td class="archlist" colspan="3">
<strong>RPM arch:</strong>
#for arch in rpmArchList
#if arch == rpmArch
<strong>{{ arch }}</strong> |
#else
<a href="rpmsbyhost?rpmArch={{ arch }}{{ util.passthrough('order', 'hostArch') }}">{{ arch }}</a> |
#endif
#endfor
#if rpmArch
<a href="rpmsbyhost?{{ util.passthrough('order', 'hostArch', prefix='') }}">all</a>
#else
<strong>all</strong>
#endif
</td>
</tr>
<tr>
<td class="paginate" colspan="3">
#if (hostPages |length) > 1
<form class="pageJump" action="">
Page:
<select onchange="javascript: window.location = 'rpmsbyhost?start=' + this.value * {{ hostRange }} + '{{ util.passthrough('order', 'hostArch', 'rpmArch') }}';">
#for pageNum in hostPages
<option value="{{ pageNum }}"{{ ' selected' if pageNum == hostCurrentPage else '' }}>{{ pageNum + 1 }}</option>
#endfor
</select>
</form>
#endif
#if hostStart > 0
<a href="rpmsbyhost?start={{ hostStart - hostRange }}{{ util.passthrough('order', 'hostArch', 'rpmArch') }}">&lt;&lt;&lt;</a>
#endif
#if totalHosts != 0
<strong>Hosts {{ hostStart + 1 }} through {{ hostStart + hostCount }} of {{ totalHosts }}</strong>
#endif
#if hostStart + hostCount < totalHosts
<a href="rpmsbyhost?start={{ hostStart + hostRange }}{{ util.passthrough('order', 'hostArch', 'rpmArch') }}">&gt;&gt;&gt;</a>
#endif
</td>
</tr>
<tr class="list-header">
<th><a href="rpmsbyhost?order={{ util.toggleOrder('name') }}{{ util.passthrough('hostArch', 'rpmArch') }}">Name</a> {{ util.sortImage('name') }}</th>
<th><a href="rpmsbyhost?order={{ util.toggleOrder('rpms') }}{{ util.passthrough('hostArch', 'rpmArch') }}">RPMs</a> {{ util.sortImage('rpms') }}</th>
<th>&nbsp;</th>
</tr>
#if (hosts |length) > 0
#for host in hosts
<tr class="{{ rowToggle(loop) }}">
<td><a href="hostinfo?hostID={{ host.id }}">{{ host.name }}</a></td>
<td width="{{ graphWidth + 5 }}"><img src="{{ util.themePath('images/1px.gif') }}" width="{{ increment * host.rpms }}" height="15" class="graphrow" alt="graph row"/></td>
<td>{{ host.rpms }}</td>
</tr>
#endfor
#else
<tr class="row-odd">
<td colspan="3">No hosts</td>
</tr>
#endif
<tr>
<td class="paginate" colspan="3">
#if (hostPages |length) > 1
<form class="pageJump" action="">
Page:
<select onchange="javascript: window.location = 'rpmsbyhost?start=' + this.value * {{ hostRange }} + '{{ util.passthrough('order', 'hostArch', 'rpmArch') }}';">
#for pageNum in hostPages
<option value="{{ pageNum }}"{{ ' selected' if pageNum == hostCurrentPage else '' }}>{{ pageNum + 1 }}</option>
#endfor
</select>
</form>
#endif
#if hostStart > 0
<a href="rpmsbyhost?start={{ hostStart - hostRange }}{{ util.passthrough('order', 'hostArch', 'rpmArch') }}">&lt;&lt;&lt;</a>
#endif
#if totalHosts != 0
<strong>Hosts {{ hostStart + 1 }} through {{ hostStart + hostCount }} of {{ totalHosts }}</strong>
#endif
#if hostStart + hostCount < totalHosts
<a href="rpmsbyhost?start={{ hostStart + hostRange }}{{ util.passthrough('order', 'hostArch', 'rpmArch') }}">&gt;&gt;&gt;</a>
#endif
</td>
</tr>
</table>
#include "footer.html.j2"