Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
feat(src/pages.rs): tweak per-repo html report with both run ids
Lars Wirzenius committed 1 year ago
commit 9a4a39f73b9a6d05913b3f5a98158ac26f91a3c2
parent 2317a19fd0d1cd89add95ac7de240485d7413c3f
1 file changed +18 -13
modified src/pages.rs
@@ -376,16 +376,6 @@ impl PageData {
                }
            };

-
            let link = if let Some(id) = run.adapter_run_id() {
-
                Element::new(Tag::A)
-
                    .with_attribute("href", &format!("{}/log.html", id))
-
                    .with_text("log")
-
            } else {
-
                Element::new(Tag::Span)
-
                    .with_class("missing_log")
-
                    .with_text("no log yet")
-
            };
-

            let info_url = if let Some(url) = run.adapter_info_url() {
                Element::new(Tag::Span).with_child(
                    Element::new(Tag::A)
@@ -399,14 +389,29 @@ impl PageData {

            list.push_child(
                Element::new(Tag::Li)
+
                    .with_text("at ")
                    .with_text(run.timestamp())
-
                    .with_text(" ")
+
                    .with_text("; currently ")
                    .with_child(current)
-
                    .with_text(" ")
-
                    .with_child(link)
                    .with_text("; ")
                    .with_child(info_url)
                    .with_child(Element::new(Tag::Br))
+
                    .with_text("broker run ID: ")
+
                    .with_child(
+
                        Element::new(Tag::Code)
+
                            .with_class("broker_run_id")
+
                            .with_text(run.broker_run_id().as_str()),
+
                    )
+
                    .with_child(Element::new(Tag::Br))
+
                    .with_text("adapter run ID: ")
+
                    .with_child(if let Some(id) = run.adapter_run_id() {
+
                        Element::new(Tag::Code)
+
                            .with_class("adapter_run_id")
+
                            .with_text(id.as_str())
+
                    } else {
+
                        Element::new(Tag::Span).with_text("unknown")
+
                    })
+
                    .with_child(Element::new(Tag::Br))
                    .with_child(Self::whence_as_html(run.whence())),
            );
        }