diff options
author | Lars Wirzenius <liw@liw.fi> | 2024-01-22 10:08:14 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2024-01-22 10:08:14 +0200 |
commit | 49f6711e2224f0c0e9a80154ed3a7b8b805beb54 (patch) | |
tree | de044ce77bc5fcdc5e8ec3cfbc87d7909499dd46 | |
parent | a41e347952e9c3b72f359e7effd09018f0a92ed8 (diff) | |
download | radicle-native-ci-49f6711e2224f0c0e9a80154ed3a7b8b805beb54.tar.gz |
feat: put last-updated time stamp to top
Signed-off-by: Lars Wirzenius <liw@liw.fi>
-rw-r--r-- | src/report.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/report.rs b/src/report.rs index 9020499..cc2ea2c 100644 --- a/src/report.rs +++ b/src/report.rs @@ -64,6 +64,12 @@ fn list_runs(repos: &[&str], run_infos: &[RunInfo]) -> Document { doc.push_to_head(&Element::new(Tag::Title).with_text("CI run logs")); doc.push_to_head(&Element::new(Tag::Style).with_text(CSS)); + let fmt = format_description!("[year]-[month]-[day] [hour]:[minute]:[second]Z"); + let now = OffsetDateTime::now_utc().format(fmt).expect("time format"); + + let timestamp = Element::new(Tag::Div).with_text(&format!("Last updated {}.", now)); + doc.push_to_body(×tamp); + for repo in repos { let section = Element::new(Tag::H1) .with_text("Repository ") @@ -119,12 +125,6 @@ fn list_runs(repos: &[&str], run_infos: &[RunInfo]) -> Document { doc.push_to_body(&list); } - let fmt = format_description!("[year]-[month]-[day] [hour]:[minute]:[second]Z"); - let now = OffsetDateTime::now_utc().format(fmt).expect("time format"); - - let timestamp = Element::new(Tag::Div).with_text(&format!("Last updated {}.", now)); - doc.push_to_body(×tamp); - doc } |