Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
feat: add run counts for all repositories together to report
Lars Wirzenius committed 1 year ago
commit d5f6520486a4bc853964ed1540034f01b85898d5
parent 331caf78ff38db072a38a75d78944dbe697b9c18
1 file changed +11 -0
modified src/pages.rs
@@ -136,6 +136,17 @@ impl PageData {
        Self::h1(&mut doc, "Repositories");
        Self::p_text(&mut doc, "Latest CI run for each repository.");

+
        let total = self.runs.len();
+
        let failed = self
+
            .runs
+
            .values()
+
            .filter(|run| run.result() == Some(&RunResult::Failure))
+
            .count();
+
        Self::p_text(
+
            &mut doc,
+
            &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)
                .with_child(Element::new(Tag::Th).with_text("Repository"))