summaryrefslogtreecommitdiffstats
path: root/src/http/routes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/routes.rs')
-rw-r--r--src/http/routes.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/http/routes.rs b/src/http/routes.rs
index d3b184b..926d2a8 100644
--- a/src/http/routes.rs
+++ b/src/http/routes.rs
@@ -720,7 +720,7 @@ fn package_detail(state: &State, req: &Req, name: &str) -> Res {
id_short: short(&b.id),
id: b.id,
kind: b.kind,
- state: b.state,
+ state: b.state.to_string(),
step: b.current_step.unwrap_or_default(),
})
.collect();
@@ -828,7 +828,7 @@ fn build_version(db: &Db, b: &builds::BuildRow) -> String {
fn build_rows(state: &State) -> Vec<BuildRow> {
builds::list(
&state.db,
- &[build_state::QUEUED, build_state::RUNNING, build_state::LEASED, build_state::BLOCKED_MISSING_DEP],
+ BuildState::active(),
100,
)
.unwrap_or_default()
@@ -846,7 +846,7 @@ fn build_rows(state: &State) -> Vec<BuildRow> {
pkgbase,
version,
kind: b.kind,
- state: b.state,
+ state: b.state.to_string(),
step: b.current_step.unwrap_or_default(),
lease: b.lease_expires_at.unwrap_or_else(|| "—".into()),
cancel: b.cancel_requested,
@@ -870,7 +870,7 @@ fn builds_page(state: &State, req: &Req) -> Res {
}
fn recent_rows(state: &State) -> Vec<BuildRow> {
- builds::list(&state.db, &[build_state::FAILED, build_state::SUCCEEDED], 10)
+ builds::list(&state.db, &[BuildState::Failed, BuildState::Succeeded], 10)
.unwrap_or_default()
.into_iter()
.map(|b| {
@@ -882,7 +882,7 @@ fn recent_rows(state: &State) -> Vec<BuildRow> {
pkgbase,
version,
kind: b.kind,
- state: b.state,
+ state: b.state.to_string(),
step: b.current_step.unwrap_or_default(),
lease: String::new(),
cancel: b.cancel_requested,
@@ -931,7 +931,7 @@ fn build_detail(state: &State, req: &Req, id: &str) -> Res {
pkgbase,
version: build_version(db, &b),
kind: b.kind,
- state: b.state,
+ state: b.state.to_string(),
error: b.error.clone().unwrap_or_default(),
blocked_on,
steps,