From 42cd9fda83c9c4995cc9105f8940f9c962a6af8f Mon Sep 17 00:00:00 2001 From: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Date: Fri, 4 Jul 2025 17:55:22 +0200 Subject: [PATCH] Add filtering for failures --- .gitignore | 2 +- src/web.rs | 22 ++++++++++++++++++++++ static/build.html | 9 +++++++-- templates/nightly.html | 11 ++++++++++- templates/target.html | 17 +++++++++++++---- 5 files changed, 53 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 173b3ff..54e7505 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ /target /targets /results -/db.sqlite +/db.sqlite* diff --git a/src/web.rs b/src/web.rs index 4bb4221..777c5c0 100644 --- a/src/web.rs +++ b/src/web.rs @@ -72,6 +72,7 @@ async fn web_build(State(state): State, Query(query): Query, } async fn web_target(State(state): State, Query(query): Query) -> Response { @@ -83,8 +84,11 @@ async fn web_target(State(state): State, Query(query): Query, Option)>, + showing_failures: bool, } + let filter_failures = query.failures.unwrap_or(false); + match state.db.history_for_target(&query.target).await { Ok(builds) => { let latest_core = builds @@ -122,6 +126,12 @@ async fn web_target(State(state): State, Query(query): Query>(); builds.sort_by_cached_key(|build| Reverse(build.0.clone())); @@ -130,6 +140,7 @@ async fn web_target(State(state): State, Query(query): Query, Query(query): Query, } async fn web_nightly(State(state): State, Query(query): Query) -> Response { @@ -158,8 +170,11 @@ async fn web_nightly(State(state): State, Query(query): Query, std_broken: Option, + showing_failures: bool, } + let filter_failures = query.failures.unwrap_or(false); + match state.db.history_for_nightly(&query.nightly).await { Ok(builds) => match state.db.nightly_info(&query.nightly).await { Ok(info) => { @@ -187,6 +202,12 @@ async fn web_nightly(State(state): State, Query(query): Query>(); builds.sort_by_cached_key(|build| build.0.clone()); @@ -207,6 +228,7 @@ async fn web_nightly(State(state): State, Query(query): Query

Build results for nightly-{{nightly}} target {{target}} {{mode}}

+ Home
{{status}}
@@ -20,10 +21,14 @@ {{stderr}}

- Build history for target {{target}} + Build history for target {{target}}

- Build state for nightly {{nightly}} + Build state for nightly {{nightly}}