feat: move run count to status list

More up-front, less space-taking than a paragraph before the repository
list.
This commit is contained in:
Lars Wirzenius
2026-08-26 09:20:10 +03:00
parent d1da8c5823
commit 33df49b75d
+10 -11
View File
@@ -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)