[projects/pld-builder.new] queue.html: every batch in two lines, in columns as wide as needed
arekm
arekm at pld-linux.org
Thu Nov 12 11:31:47 CET 2026
commit 5ca3cda59ce5bfebefd2305353f6da6f9d374e48
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Nov 12 11:29:01 2026 +0100
queue.html: every batch in two lines, in columns as wide as needed
A long spec broke after the package, half beside it and half under it.
Now each batch takes two lines: the package over its spec, branch and
options, and beside them each builder with its status, duration and log
over its start and end, "OK (2m 12s, log)".
The whole page shares one grid: a column for what to build, up to
420px, and one per bin builder, each as wide as its widest content and
no wider, so the eye does not have to sweep a wide screen; the rest of
the width stays empty. Below 1300px the builders go one under another.
A command takes the whole width with its builders under it, whatever
its length, and its src builder goes where the package is in other
rows, so all four builders fit on one line.
PLD_Builder/queue_html.py | 46 ++++++++++-----------
PLD_Builder/style.css | 103 ++++++++++++++++++++++++++++------------------
2 files changed, 87 insertions(+), 62 deletions(-)
---
diff --git a/PLD_Builder/queue_html.py b/PLD_Builder/queue_html.py
index ce459f1..6898be2 100644
--- a/PLD_Builder/queue_html.py
+++ b/PLD_Builder/queue_html.py
@@ -66,7 +66,7 @@ def page(requests, files):
'<label><input type="checkbox" id="unfinished"> only failed or unfinished</label>\n'
'</header>\n'
+ builders_line(requests)
- + '<main>\n'
+ + f'<main style="--builders: {len(config.binary_builders)}">\n'
+ requests_by_day(newest_first)
+ LEGEND.format(zone=time.strftime("%Z"))
+ '</main>\n'
@@ -195,22 +195,19 @@ def batch_name(batch):
def batch_html(batch, request_id):
- wide = False
if batch.is_command():
flags = f" [{escape(' '.join(batch.command_flags))}]" if batch.command_flags else ""
- command = batch.command.strip()
- # a command of several lines takes the whole width, with its builders under it
- wide = "\n" in command
- what = f'<b>command</b>{flags}' + (f'<pre>{escape(command)}</pre>' if wide else f' <code>{escape(command)}</code>')
+ what = f'<b>command</b>{flags}<pre>{escape(batch.command.strip())}</pre>'
else:
package = batch.spec.removesuffix(".spec")
git_log = ("http://git.pld-linux.org/gitweb.cgi"
f"?p=packages/{quote(package)}.git;f={quote(batch.spec)};h={quote(batch.branch)};a=shortlog")
options = batch.bconds_string() + batch.kernel_string() + batch.target_string() + batch.defines_string()
what = (f'<b>{escape(batch_name(batch))}</b> '
- f'<a href="{escape(git_log)}">{escape(batch.spec)} -r {escape(batch.branch)}</a>{escape(options)}')
+ f'<span class=spec><a href="{escape(git_log)}">{escape(batch.spec)} -r {escape(batch.branch)}</a>'
+ f'{escape(options)}</span>')
return (
- f'<div class="batch{" wide" if wide else ""}">\n<div class=what>{what}</div>\n<div class=builders>\n'
+ f'<div class="batch{" command" if batch.is_command() else ""}">\n<div class=what>{what}</div>\n<div class=builders>\n'
+ "".join(builder_html(batch, name, request_id) for name in batch.builders)
+ '</div>\n</div>\n'
)
@@ -236,10 +233,15 @@ def builder_html(batch, name, request_id):
# a skipped batch was not built, so it has no log
if is_final(status) and not status.startswith("SKIP"):
- log = f'<a href="{escape(build_log(batch, name, status, request_id))}">log</a>'
+ log = f'<a class=log href="{escape(build_log(batch, name, status, request_id))}">log</a>'
+ # right after the status: "OK (2m 12s, log)"
+ more = ", ".join(([f"<b class=took>{took}</b>"] if took else []) + ([log] if log else []))
+ more = f" ({more})" if more else ""
title = f' title="{escape(about)}"' if about else ""
- return (f'<div class="builder {kind(status)}"{title}><span class=who>{escape(name)}</span>{plaque(status)}'
- f'<span class=span>{span}</span><span class=took>{took}</span><span class=log>{log}</span></div>\n')
+ # the src builder is not one of the columns of the bin builders
+ src = "" if name in config.binary_builders else " src"
+ return (f'<div class="builder {kind(status)}{src}"{title}><span class=who>{escape(name)}</span>'
+ f'<span class=state>{plaque(status)}{more}</span><span class=span>{span}</span></div>\n')
def build_log(batch, builder, status, request_id):
@@ -258,28 +260,26 @@ LEGEND = """<h2>How to read a request</h2>
<div class=batch>
<div class=what><b>package-version-release</b> spec and branch with their git log, build options</div>
<div class=builders>
-<div class=builder><span class=who>builder</span><b class="s ok">OK</b><span class=span>start → end</span>
-<span class=took>took</span><span class=log><a>log</a></span>
+<div class=builder><span class=who>builder</span><span class=state><b class="s ok">OK</b> (<b class=took>took</b>, <a class=log>log</a>)</span>
+<span class=span>start → end</span>
<p>Built, and its rpms have reached ftp. log: the build log.</p></div>
-<div class=builder><span class=who>builder</span><b class="s fail">FAIL_<wbr>BUILD</b><span class=span>start → end</span>
-<span class=took>took</span><span class=log><a>log</a></span>
+<div class=builder><span class=who>builder</span><span class=state><b class="s fail">FAIL_<wbr>BUILD</b> (<b class=took>took</b>, <a class=log>log</a>)</span>
+<span class=span>start → end</span>
<p>Failed, here in %build of the spec.</p></div>
-<div class=builder><span class=who>builder</span><b class="s skip">SKIP</b><span class=span>time</span>
-<span class=took></span><span class=log></span>
+<div class=builder><span class=who>builder</span><span class=state><b class="s skip">SKIP</b></span><span class=span>time</span>
<p>Not built: a package earlier in this request failed. UNSUPP: the spec excludes this architecture.</p></div>
</div>
</div>
<div class=batch>
<div class=what>The next package of the request: they are built one after another.</div>
<div class=builders>
-<div class="builder wait"><span class=who>builder</span><b class="s wait">waiting</b><span class=span></span>
-<span class=took></span><span class=log></span>
+<div class="builder wait"><span class=who>builder</span><span class=state><b class="s wait">waiting</b></span><span class=span></span>
<p>Not started yet.</p></div>
-<div class="builder run"><span class=who>builder</span><b class="s run">building</b><span class=span>start → …</span>
-<span class=took>so far</span><span class=log></span>
+<div class="builder run"><span class=who>builder</span><span class=state><b class="s run">building</b> (<b class=took>so far</b>)</span>
+<span class=span>start → …</span>
<p>Being built right now.</p></div>
-<div class="builder up"><span class=who>builder</span><b class="s up">uploading</b><span class=span>start → end</span>
-<span class=took>took</span><span class=log></span>
+<div class="builder up"><span class=who>builder</span><span class=state><b class="s up">uploading</b> (<b class=took>took</b>)</span>
+<span class=span>start → end</span>
<p>Built; its rpms are on the way to ftp. The times are of the build.</p></div>
</div>
</div>
diff --git a/PLD_Builder/style.css b/PLD_Builder/style.css
index 2da4a8d..67ae72d 100644
--- a/PLD_Builder/style.css
+++ b/PLD_Builder/style.css
@@ -66,10 +66,18 @@ select, input {
font-style: normal;
}
+/* one set of columns for the whole page, which every request shares: what to build, then one per bin
+ builder, each as wide as its widest content, the rest of the width left empty */
main {
+ display: grid;
+ grid-template-columns: fit-content(420px) repeat(var(--builders), max-content) 1fr;
padding: 0 16px 40px;
}
+main > *, .request > * {
+ grid-column: 1 / -1;
+}
+
h2 {
font-size: 15px;
margin: 14px 0 6px;
@@ -154,12 +162,14 @@ h2 {
text-decoration: none;
}
-/* a batch in one row: what to build in a column of its own, the builders beside it; where the row
- is too narrow, the builders go under it */
+.request, .batch, .builders {
+ display: grid;
+ grid-template-columns: subgrid;
+}
+
+/* a batch in one row: what to build, its builders beside it */
.batch {
align-items: baseline;
- display: flex;
- flex-wrap: wrap;
padding: 3px 12px;
}
@@ -168,23 +178,23 @@ h2 {
}
.what {
- box-sizing: border-box;
+ grid-column: 1;
overflow-wrap: anywhere;
padding-right: 12px;
- width: 360px;
}
.what b {
margin-right: 6px;
}
-.what code {
- font: 13px "DejaVu Sans Mono", monospace;
+/* the spec and its options on a line of their own, under the package */
+.what .spec {
+ display: block;
}
-/* a command of several lines takes the whole width, its builders go under it */
-.batch.wide .what {
- width: 100%;
+/* a command takes the whole width, its builders go under it */
+.batch.command .what {
+ grid-column: 1 / -1;
}
.what pre {
@@ -196,30 +206,39 @@ h2 {
word-break: break-word;
}
-/* stays beside what to build: builders that do not fit wrap inside it, in the same columns */
.builders {
- display: flex;
- flex: 1 1 0;
- flex-wrap: wrap;
- min-width: 470px;
+ grid-column: 2 / -2;
}
-/* a builder: name, status, start and end, duration, log, each in a column of its own and all builders
- the same width, so a glance down the page finds each thing in one place */
+/* a builder in the two lines of a batch: name, status with duration and log, under the status start and
+ end; all builders the same width, so a glance down the page finds each thing in one place */
.builder {
+ align-content: start;
align-items: baseline;
border-left: 1px solid #dde1e5;
- box-sizing: border-box;
column-gap: 8px;
display: grid;
- grid-template-columns: 76px 1fr 100px 66px 22px;
+ grid-template-columns: 80px 1fr;
padding: 0 12px;
- width: 470px;
}
-/* under a command of several lines the builders keep the columns of the rows around them */
-.batch.wide .builders {
- margin-left: 360px;
+.builder > .span {
+ grid-column: 2;
+}
+
+.batch.command .builders {
+ grid-column: 1 / -2;
+}
+
+/* the src builder of a command goes into the place the package takes in other rows, the bin builders
+ into their columns after it */
+.batch.command .builder.src {
+ grid-column: 1;
+ grid-row: 1;
+}
+
+.batch.command .builder:not(.src):first-child {
+ grid-column-start: 2;
}
/* a builder not done with the batch yet is hatched: unfinished work tells from results at a glance */
@@ -227,12 +246,15 @@ h2 {
background: repeating-linear-gradient(-45deg, #fff 0 6px, #eceef1 6px 12px);
}
-/* a plaque as wide as its word, not as its column */
-.builder > .s {
- justify-self: start;
-}
-
+/* the name on a label of its own beside both lines of its builder, in the middle of them */
.who {
+ align-items: center;
+ align-self: stretch;
+ background: #e6eaee;
+ display: flex;
+ grid-row: 1 / 3;
+ margin-left: -12px;
+ padding: 0 8px 0 12px;
color: #22303f;
font-size: 12px;
font-weight: bold;
@@ -246,8 +268,6 @@ h2 {
}
.took {
- font-weight: bold;
- text-align: right;
white-space: nowrap;
}
@@ -288,8 +308,10 @@ h2 {
background: #e7e3d6;
}
+/* an explanation as wide as its column, rather than widening it */
.legend .builder p {
color: #444;
+ contain: inline-size;
font-size: 13px;
grid-column: 1 / -1;
margin: 0 0 6px;
@@ -303,12 +325,12 @@ h2 {
padding: 6px 0;
}
- at media (max-width: 700px) {
- .rid {
- display: none;
+/* too narrow for the columns: the builders go one under another, each in the flow of a line */
+ at media (max-width: 1300px) {
+ main, .request, .batch, .builders {
+ display: block;
}
- /* the builders are one under another here, each in the flow of a line */
.builder {
border-left: 0;
display: flex;
@@ -318,12 +340,15 @@ h2 {
width: 100%;
}
- .what {
- width: 100%;
+ .who {
+ margin: 0;
+ padding: 0 6px;
}
+}
- .batch.wide .builders {
- margin-left: 0;
+ at media (max-width: 700px) {
+ .rid {
+ display: none;
}
}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/5ca3cda59ce5bfebefd2305353f6da6f9d374e48
More information about the pld-cvs-commit
mailing list