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)