mirror of
https://seed.radicle.dev/rad:zwTxygwuz5LDGBq255RA2CbNGrz8.git
synced 2026-10-18 19:30:29 +08:00
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:
+10
-11
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user