]> git.ipfire.org Git - pbs.git/commitdiff
builds: Redesign detail page
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 31 May 2022 15:42:25 +0000 (15:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 31 May 2022 15:42:25 +0000 (15:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/build-detail.html
src/templates/modules/commit-message.html
src/web/builds.py

index 1184cc52ae51aac00e93b38c1f81f0dd822df839..95203441f9e959c46db68e6c34d1c310e64bba1e 100644 (file)
@@ -1,21 +1,93 @@
 {% extends "base.html" %}
 
-{% block title %}{{ _("Build") }}: {{ build.name }}{% end block %}
+{% block title %}{{ _("Build") }}: {{ build }}{% end block %}
 
-{% block body %}
-       <div class="row">
-               <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
-                       <nav aria-label="breadcrumb" role="navigation">
-                               <ol class="breadcrumb">
-                                       <li class="breadcrumb-item"><a href="/">{{ _("Home") }}</a></li>
-                                       <li class="breadcrumb-item"><a href="/packages">{{ _("Packages") }}</a></li>
-                                       <li class="breadcrumb-item"><a href="/package/{{ build.pkg.name }}">{{ build.pkg.name }}</a></li>
-                                       <li class="breadcrumb-item active"><a href="/build/{{ build.uuid }}">{{ build.pkg.friendly_version }}</a></li>
-                               </ol>
-                       </nav>
+{% block container %}
+       <nav aria-label="{{ _("You are here:") }}" role="navigation">
+               <ul class="breadcrumbs">
+                       <li>
+                               <a href="/">{{ _("Home") }}</a>
+                       </li>
+                       <li>
+                               <a href="/packages">{{ _("Packages") }}</a>
+                       </li>
+                       <li>
+                               <a href="/packages/{{ build.pkg.name }}">{{ build.pkg.name }}</a>
+                       </li>
+                       <li>
+                               <span class="show-for-sr">{{ _("Current") }}: </span> {{ build.pkg.friendly_version }}
+                       </li>
+               </ul>
+       </nav>
+
+       <div class="callout large">
+               <div class="grid-x grid-padding-x">
+                       <div class="cell large-8">
+                               {% if build.commit %}
+                                       {% module CommitMessage(build.commit) %}
+
+                                       <p>
+                                               <ul class="menu simple">
+                                                       <li>
+                                                               {% module LinkToUser(build.commit.author) %}
+                                                       </li>
+
+                                                       <li>
+                                                               <a href="/distro/{{ build.distro.identifier }}/source/{{ build.pkg.commit.source.identifier }}/{{ build.pkg.commit.revision }}">
+                                                                       {{ build.pkg.commit.revision[:7] }}
+                                                               </a>
+                                                       </li>
+
+                                                       <li>
+                                                               {{ locale.format_date(build.pkg.commit.date, shorter=True) }}
+                                                       </li>
+                                               </ul>
+                                       </p>
+                               {% end %}
+
+                               {# List any fixed bugs #}
+                               {% if bugs %}
+                                       <h6>{{ _("Fixed Bugs") }}</h6>
+
+                                       <ul>
+                                               {% for bug in bugs %}
+                                                       <li>
+                                                               <a href="{{ bug.url }}">
+                                                                       #{{ bug.id }} - {{ bug.summary }}
+                                                               </a>
+                                                       </li>
+                                               {% end %}
+                                       </ul>
+                               {% end %}
+                       </div>
+
+                       <div class="cell large-4 text-center">
+                               {# Icon Bar #}
+                               <ul class="menu simple align-center">
+                                       <li>X</li>
+                                       <li>X</li>
+                                       <li>X</li>
+                                       {# XXX Add icons for critical path, security fixes,
+                                               broken/obsolete builds, scratch or other type of build #}
+                               </ul>
+
+                               {# Score #}
+                               <h1>{{ build.score }}</h1>
+                               <h5>{{ _("Score") }}</h5>
+                       </div>
                </div>
        </div>
 
+       <a class="small secondary button" href="/package/{{ build.pkg.uuid }}">
+               {{ _("Source Package") }}
+       </a>
+
+       {% if build.jobs %}
+               {% module JobsList(build.jobs) %}
+       {% end %}
+{% end block %}
+
+{% block bodyXX %}
        <div class="row">
                {% if current_user and build.has_perm(current_user) %}
                        <div class="col-12 col-sm-12 col-md-9 col-lg-10 col-xl-10">
index bd57e7dfebaa96605cab4f016dcd68f97096a38b..8b905a1952d3391eaa9ca327eac3d0d1a0649dcd 100644 (file)
@@ -1,3 +1,3 @@
-<h4>{{ commit.subject }}</h4>
+<h5>{{ commit.subject }}</h5>
 
-{% module Text(commit.message) %}
\ No newline at end of file
+{% module Text(commit.message) %}
index b1eba13f08aefca4d9882bd50a136452a9bae2ee..65d8ff035a8103bd65ee4d7ec2c4f9af90b3cd65 100644 (file)
@@ -39,16 +39,11 @@ class BuildDetailHandler(BuildBaseHandler):
                # Cache the log.
                log = build.get_log()
 
-               if build.repo:
-                       next_repo = build.repo.__next__
-               else:
-                       next_repo = None
-
                # Bugs.
                bugs = build.get_bugs()
 
                self.render("build-detail.html", build=build, log=log, pkg=build.pkg,
-                       distro=build.distro, bugs=bugs, repo=build.repo, next_repo=next_repo)
+                       distro=build.distro, bugs=bugs, repo=build.repo)
 
 
 class BuildDeleteHandler(BuildBaseHandler):