Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : master
---------------------------------------------------------------
commit 421dca2a8ab235601c818f172add71580deb1dad
Author: Adam Samalik <asamalik(a)redhat.com>
Date: Fri Jul 4 10:37:16 2014 +0200
[frontend] pkg version on the Monitor page
---------------------------------------------------------------
.../coprs/templates/coprs/detail/monitor.html | 12 ++++++++++--
.../coprs/views/coprs_ns/coprs_general.py | 8 +++++---
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/monitor.html
b/frontend/coprs_frontend/coprs/templates/coprs/detail/monitor.html
index d0bbac1..238e257 100644
--- a/frontend/coprs_frontend/coprs/templates/coprs/detail/monitor.html
+++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/monitor.html
@@ -11,7 +11,8 @@
<table class="status-table">
<tr></tr>
<tr>
- <th rowspan="2">Packages</th>
+ <th rowspan="2">Package</th>
+ <th rowspan="2">Version</th>
{% for i, chroot in oses %}
<th colspan="{{i}}">
{{ chroot|capitalize }}
@@ -25,9 +26,16 @@
</th>
{% endfor %}
</tr>
- {% for package, states in packages %}
+ {% for package, version, states in packages %}
<tr>
<td>{{ package }}</td>
+ <td>
+ {% if version: %}
+ {{ version }}
+ {% else %}
+ -
+ {% endif %}
+ </td>
{% for build_id, state in states %}
<td class="centered build-{{ state }}">
{% if state %}
diff --git a/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
b/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
index 556177f..01e14da 100644
--- a/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
+++ b/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
@@ -535,7 +535,7 @@ def copr_build_monitor(username, coprname):
# - it can"t determine build results if build contains
# more than one package as this data is not available
- out = {}
+ packages = []
build = None
chroots = set([chroot.name for chroot in copr.active_chroots])
oses = [chroot.os for chroot in copr.active_chroots]
@@ -549,6 +549,7 @@ def copr_build_monitor(username, coprname):
chroots = sorted(chroots)
+ out = []
for build in builds:
chroot_results = {chroot.name: chroot.state
for chroot in build.build_chroots}
@@ -567,11 +568,12 @@ def copr_build_monitor(username, coprname):
if pkg_name in out:
continue
- out[pkg_name] = build_results
+ packages.append((pkg_name, build.pkg_version, build_results))
+ out.append(pkg_name)
return flask.render_template("coprs/detail/monitor.html",
copr=copr,
build=latest_build,
chroots=chroots, oses=oses_grouped, archs=archs,
- packages=sorted(out.iteritems()),
+ packages=packages,
form=form)