aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-builds.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-19 19:39:21 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-19 19:39:21 +0300
commitc51ccc69ed4039fac8ebfbd7c2fcaf0abb8341d0 (patch)
tree66588196d841fb8174122c1ee61450ec5b4f841b /mod/mod-builds.cxx
parent90a6531951546ae88a695410013b908b50cd6fd0 (diff)
Allow to enforce rebuild for building state
Diffstat (limited to 'mod/mod-builds.cxx')
-rw-r--r--mod/mod-builds.cxx22
1 files changed, 12 insertions, 10 deletions
diff --git a/mod/mod-builds.cxx b/mod/mod-builds.cxx
index c831359..e62e1e5 100644
--- a/mod/mod-builds.cxx
+++ b/mod/mod-builds.cxx
@@ -162,7 +162,7 @@ build_query (const C& configs, const brep::params::builds& params)
if (rs != "*")
{
if (rs == "pending")
- q = q && query::forced;
+ q = q && query::force != "unforced";
else if (rs == "building")
q = q && query::state == "building";
else
@@ -382,7 +382,7 @@ handle (request& rq, response& rs)
<< SPAN(CLASS="value");
if (b.state == build_state::building)
- s << "building";
+ s << "building | ";
else
{
assert (b.state == build_state::built);
@@ -423,16 +423,18 @@ handle (request& rq, response& rs)
<< ~A
<< " | ";
}
-
- if (b.forced)
- s << "pending";
- else
- s << A
- << HREF << force_rebuild_url (host, root, b) << ~HREF
- << "rebuild"
- << ~A;
}
+ if (b.force == (b.state == build_state::building
+ ? force_state::forcing
+ : force_state::forced))
+ s << "pending";
+ else
+ s << A
+ << HREF << force_rebuild_url (host, root, b) << ~HREF
+ << "rebuild"
+ << ~A;
+
s << ~SPAN
<< ~TD
<< ~TR