This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push: new 4aa9324 frontend: better link to builder-live.log 4aa9324 is described below
commit 4aa9324f41adf6de9cd2a00eab1e2fdb142d0bae Author: Tomas Hrnciar thrnciar@reedhat.com AuthorDate: Mon Aug 26 13:26:49 2019 +0200
frontend: better link to builder-live.log
show builder-log.gz instead of builder-log on build page when build has finished and hide if it is still running
Fixes: #941 Merges: #945 --- frontend/coprs_frontend/coprs/models.py | 4 +++- .../coprs_frontend/coprs/templates/coprs/detail/build.html | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/models.py b/frontend/coprs_frontend/coprs/models.py index b61510d..cc600c0 100644 --- a/frontend/coprs_frontend/coprs/models.py +++ b/frontend/coprs_frontend/coprs/models.py @@ -905,7 +905,9 @@ class Build(db.Model, helpers.Serializer): @property def import_log_url_backend(self): parts = ["results", self.copr.owner_name, self.copr_dirname, - "srpm-builds", self.id_fixed_width, "builder-live.log"] + "srpm-builds", self.id_fixed_width, + "builder-live.log" if self.source_status == StatusEnum("running") + else "builder-live.log.gz"] path = os.path.normpath(os.path.join(*parts)) return urljoin(app.config["BACKEND_BASE_URL"], path)
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html index e71e678..70df0d7 100644 --- a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html +++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html @@ -164,12 +164,15 @@ <dl class="dl-horizontal"> {{ describe_failure(build) }} <dt>SRPM build log:</dt> - <dd> + {% if build.source_status | state_from_num in ['pending', 'starting'] %} + <dd> Build has not started yet </dd> + {% endif %} {% for url in build.get_import_log_urls(g.user.admin) %} - <a href="{{ url }}">{{ url |basename }}</a> - {{ "," if not loop.last }} + <dd> + <a href="{{ url }}">{{ url | basename }}</a> + {{ "," if not loop.last }} + </dd> {% endfor %} - </dd> <dt> Built Packages:</dt> {% if build.built_packages %} {% for pkg in build.built_packages.split("\n"): %}
copr-commits@lists.fedorahosted.org