From 33df49b75d07ad5d9b004b14b1d98ad76e266fc0 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 26 Aug 2026 09:20:10 +0300 Subject: [PATCH] feat: move run count to status list More up-front, less space-taking than a paragraph before the repository list. --- src/pages.rs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/pages.rs b/src/pages.rs index 5887b5ba..e52f42ed 100644 --- a/src/pages.rs +++ b/src/pages.rs @@ -121,8 +121,18 @@ impl PageData { } fn broker_status(&self, doc: &mut ReportPage) { + let total = self.runs.len(); + let failed = self + .runs + .values() + .filter(|run| run.result() == Some(&RunResult::Failure)) + .count(); + doc.push( Element::new(Tag::Ul) + .with_child(Element::new(Tag::Li).with_text(format!( + "Total {total} CI runs recorded, of which {failed} failed." + ))) .with_child( Element::new(Tag::Li) .with_text("This page last updated: ") @@ -141,17 +151,6 @@ impl PageData { fn repo_table(&self, doc: &mut ReportPage) { doc.h2("Repositories"); - doc.push(Element::new(Tag::P).with_text("Latest CI run for each repository.")); - - let total = self.runs.len(); - let failed = self - .runs - .values() - .filter(|run| run.result() == Some(&RunResult::Failure)) - .count(); - doc.push(Element::new(Tag::P).with_text(format!( - "Total {total} CI runs recorded, of which {failed} failed." - ))); let mut table = Element::new(Tag::Table).with_class("repolist").with_child( Element::new(Tag::Tr)