188 lines
7.8 KiB
Django/Jinja
188 lines
7.8 KiB
Django/Jinja
|
|
#set _PASSTHROUGH = ['userID', 'tagID', 'packageID', 'order', 'prefix', 'state', 'inherited', 'latest', 'type']
|
|
|
|
#include "header.html.j2"
|
|
# from "macros.html.j2" import rowToggle
|
|
|
|
#macro getDescription()
|
|
#if latest
|
|
Latest
|
|
#elif state != None
|
|
{{ util.stateName(state)|capitalize }}
|
|
#endif
|
|
#if type
|
|
{{ type|capitalize }}
|
|
#endif
|
|
Builds
|
|
#if package
|
|
of <a href="packageinfo?packageID={{ package.id }}">{{ package.name }}</a>
|
|
#endif
|
|
#if user
|
|
by <a href="userinfo?userID={{ user.id }}">{{ user.name }}</a>
|
|
#endif
|
|
#if prefix
|
|
starting with "{{ prefix }}"
|
|
#endif
|
|
#if tag
|
|
in tag <a href="taginfo?tagID={{ tag.id }}">{{ tag.name }}</a>
|
|
#endif
|
|
#endmacro
|
|
|
|
<h4>{{ getDescription() }}</h4>
|
|
|
|
<table class="data-list">
|
|
<tr>
|
|
<td colspan="{{ '6' if tag else '5' }}">
|
|
<table class="nested">
|
|
<tr><td>
|
|
#if tag
|
|
<strong>Latest</strong>:
|
|
</td><td>
|
|
<select name="latest" class="filterlist" onchange="javascript: window.location = 'builds?latest=' + this.value + '{{ util.passthrough_except('latest') }}';">
|
|
<option value="1" {{ 'selected' if latest else '' }}>yes</option>
|
|
<option value="0" {{ 'selected' if not latest else '' }}>no</option>
|
|
</select>
|
|
#else
|
|
<strong>State</strong>:
|
|
</td><td>
|
|
<select name="state" class="filterlist" onchange="javascript: window.location = 'builds?state=' + this.value + '{{ util.passthrough_except('state') }}';">
|
|
<option value="all">all</option>
|
|
#for stateOpt in ['BUILDING', 'COMPLETE', 'FAILED', 'CANCELED']
|
|
<option value="{{ koji.BUILD_STATES[stateOpt] }}"{{ ' selected' if state == koji.BUILD_STATES[stateOpt] else '' }}>{{ stateOpt|lower }}</option>
|
|
#endfor
|
|
</select>
|
|
#endif
|
|
</td><td>
|
|
<strong>Built by</strong>:
|
|
</td><td>
|
|
<select name="userID" class="filterlist" onchange="javascript: window.location = 'builds?userID=' + this.value + '{{ util.passthrough_except('userID') }}';">
|
|
<option value="" {{ 'selected' if not user else '' }}>everyone</option>
|
|
#if loggedInUser
|
|
<option value="{{ loggedInUser.name }}">me</option>
|
|
#endif
|
|
#for userOption in users
|
|
<option value="{{ userOption.name }}" {{ 'selected' if userOption.name == (user and user.name or None) else '' }}>{{ userOption.name }}</option>
|
|
#endfor
|
|
</select>
|
|
</td></tr>
|
|
<tr>
|
|
<td>
|
|
<strong>Type</strong>:
|
|
</td>
|
|
<td>
|
|
<select name="type" class="filterlist" onchange="javascript: window.location='builds?type=' + this.value + '{{ util.passthrough_except('type') }}';">
|
|
<option value="all" {{ 'selected' if not type else '' }}>all</option>
|
|
#for btype in btypes
|
|
<option value="{{ btype }}" {{ 'selected' if type == btype else '' }}>{{ btype }}</option>
|
|
#endfor
|
|
</select>
|
|
</td>
|
|
#if tag
|
|
<td>
|
|
<strong>Inherited</strong>:
|
|
</td><td>
|
|
<select name="inherited" class="filterlist" onchange="javascript: window.location = 'builds?inherited=' + this.value + '{{ util.passthrough_except('inherited') }}';">
|
|
<option value="1" {{ 'selected' if inherited else '' }}>yes</option>
|
|
<option value="0" {{ 'selected' if not inherited else '' }}>no</option>
|
|
</select>
|
|
</td>
|
|
#endif
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="charlist" colspan="{{ '6' if tag else '5' }}">
|
|
#for char in chars
|
|
#if prefix == char
|
|
<strong>{{ char }}</strong>
|
|
#else
|
|
<a href="builds?prefix={{ char }}{{ util.passthrough_except('prefix') }}">{{ char }}</a>
|
|
#endif
|
|
|
|
|
#endfor
|
|
#if prefix
|
|
<a href="builds?{{ util.passthrough_except('prefix', prefix='') }}">all</a>
|
|
#else
|
|
<strong>all</strong>
|
|
#endif
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paginate" colspan="{{ '6' if tag else '5' }}">
|
|
#if (buildPages |length) > 1
|
|
<form class="pageJump" action="">
|
|
Page:
|
|
<select onchange="javascript: window.location = 'builds?start=' + this.value * {{ buildRange }} + '{{ util.passthrough_except() }}';">
|
|
#for pageNum in buildPages
|
|
<option value="{{ pageNum }}"{{ ' selected' if pageNum == buildCurrentPage else '' }}>{{ pageNum + 1 }}</option>
|
|
#endfor
|
|
</select>
|
|
</form>
|
|
#endif
|
|
#if buildStart > 0
|
|
<a href="builds?start={{ buildStart - buildRange }}{{ util.passthrough_except() }}"><<<</a>
|
|
#endif
|
|
#if totalBuilds != 0
|
|
<strong>Builds {{ buildStart + 1 }} through {{ buildStart + buildCount }} of {{ totalBuilds }}</strong>
|
|
#endif
|
|
#if buildStart + buildCount < totalBuilds
|
|
<a href="builds?start={{ buildStart + buildRange }}{{ util.passthrough_except() }}">>>></a>
|
|
#endif
|
|
</td>
|
|
</tr>
|
|
<tr class="list-header">
|
|
<th><a href="builds?order={{ util.toggleOrder('build_id') }}{{ util.passthrough_except('order') }}">ID</a> {{ util.sortImage('build_id') }}</th>
|
|
<th><a href="builds?order={{ util.toggleOrder('nvr') }}{{ util.passthrough_except('order') }}">NVR</a> {{ util.sortImage('nvr') }}</th>
|
|
#if tag
|
|
<th><a href="builds?order={{ util.toggleOrder('tag_name') }}{{ util.passthrough_except('order') }}">Tag</a> {{ util.sortImage('tag_name') }}</th>
|
|
#endif
|
|
<th><a href="builds?order={{ util.toggleOrder('owner_name') }}{{ util.passthrough_except('order') }}">Built by</a> {{ util.sortImage('owner_name') }}</th>
|
|
<th><a href="builds?order={{ util.toggleOrder('completion_time') }}{{ util.passthrough_except('order') }}">Finished</a> {{ util.sortImage('completion_time') }}</th>
|
|
<th><a href="builds?order={{ util.toggleOrder('state') }}{{ util.passthrough_except('order') }}">State</a> {{ util.sortImage('state') }}</th>
|
|
</tr>
|
|
#if (builds |length) > 0
|
|
#for build in builds
|
|
<tr class="{{ rowToggle(loop) }}">
|
|
<td>{{ build.build_id }}</td>
|
|
<td><a href="buildinfo?buildID={{ build.build_id }}">{{ koji.buildLabel(build) }}</a></td>
|
|
#if tag
|
|
<td><a href="taginfo?tagID={{ build.tag_id }}">{{ build.tag_name }}</a></td>
|
|
#endif
|
|
<td class="user-{{ build.owner_name }}"><a href="userinfo?userID={{ build.owner_id }}">{{ build.owner_name }}</a></td>
|
|
<td>{{ util.formatTime(build.completion_time) }}</td>
|
|
#set stateName = util.stateName(build.state)
|
|
<td class="{{ stateName }}">{{ util.stateImage(build.state) }}</td>
|
|
</tr>
|
|
#endfor
|
|
#else
|
|
<tr class="row-odd">
|
|
<td colspan="{{ '6' if tag else '5' }}">No builds</td>
|
|
</tr>
|
|
#endif
|
|
<tr>
|
|
<td class="paginate" colspan="{{ '6' if tag else '5' }}">
|
|
#if (buildPages |length) > 1
|
|
<form class="pageJump" action="">
|
|
Page:
|
|
<select onchange="javascript: window.location = 'builds?start=' + this.value * {{ buildRange }} + '{{ util.passthrough_except() }}';">
|
|
#for pageNum in buildPages
|
|
<option value="{{ pageNum }}"{{ ' selected' if pageNum == buildCurrentPage else '' }}>{{ pageNum + 1 }}</option>
|
|
#endfor
|
|
</select>
|
|
</form>
|
|
#endif
|
|
#if buildStart > 0
|
|
<a href="builds?start={{ buildStart - buildRange }}{{ util.passthrough_except() }}"><<<</a>
|
|
#endif
|
|
#if totalBuilds != 0
|
|
<strong>Builds {{ buildStart + 1 }} through {{ buildStart + buildCount }} of {{ totalBuilds }}</strong>
|
|
#endif
|
|
#if buildStart + buildCount < totalBuilds
|
|
<a href="builds?start={{ buildStart + buildRange }}{{ util.passthrough_except() }}">>>></a>
|
|
#endif
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
#include "footer.html.j2"
|