diff options
-rw-r--r-- | mod/mod-builds.cxx | 22 | ||||
-rw-r--r-- | mod/options.cli | 6 |
2 files changed, 19 insertions, 9 deletions
diff --git a/mod/mod-builds.cxx b/mod/mod-builds.cxx index 70ef605..adbd9bf 100644 --- a/mod/mod-builds.cxx +++ b/mod/mod-builds.cxx @@ -159,7 +159,7 @@ build_query (const C& configs, const brep::params::builds& params) // const string& rs (params.result ()); - if (!rs.empty () && rs != "*") + if (rs != "*") { if (rs == "pending") q = q && query::forced; @@ -197,6 +197,16 @@ build_query (const C& configs, const brep::params::builds& params) return q; } +static const vector<pair<string, string>> build_results ({ + {"*", "*"}, + {"pending", "pending"}, + {"building", "building"}, + {"success", "success"}, + {"warning", "warning"}, + {"error", "error"}, + {"abort", "abort"}, + {"abnormal", "abnormal"}}); + bool brep::builds:: handle (request& rq, response& rs) { @@ -269,7 +279,7 @@ handle (request& rq, response& rs) // the * wildcard selection. // string tc ("*"); - vector<pair<string,string>> toolchains ({{"*", "*"}}); + vector<pair<string, string>> toolchains ({{"*", "*"}}); { using query = query<toolchain>; @@ -317,9 +327,9 @@ handle (request& rq, response& rs) << ~TD << ~TR - << TR_INPUT ("machine", "mn", params.machine (), "*") - << TR_INPUT ("target", "tg", params.target (), "<default>") - << TR_INPUT ("result", "rs", params.result (), "*") + << TR_INPUT ("machine", "mn", params.machine (), "*") + << TR_INPUT ("target", "tg", params.target (), "<default>") + << TR_SELECT ("result", "rs", params.result (), build_results) << ~TBODY << ~TABLE << TABLE(CLASS="form-table") @@ -454,7 +464,7 @@ handle (request& rq, response& rs) add_filter ("cf", params.configuration ()); add_filter ("mn", params.machine ()); add_filter ("tg", params.target (), "*"); - add_filter ("rs", params.result ()); + add_filter ("rs", params.result (), "*"); s << DIV_PAGER (page, count, page_configs, options_->build_pages (), u) << ~DIV diff --git a/mod/options.cli b/mod/options.cli index ced3de2..65f5549 100644 --- a/mod/options.cli +++ b/mod/options.cli @@ -456,13 +456,13 @@ namespace brep // string target | tg = "*"; - // Package build result. If empty or *, then no build result constraint - // is applied. Otherwise the value is supposed to be the one of the + // Package build result. If *, then no build result constraint is + // applied. Otherwise the value is supposed to be the one of the // following (ordered) statuses: pending, building, success, warning, // error, abort, abnormal. The first 3 statuses are checked for equality, // the rest - for being greater or equal. // - string result | rs; + string result | rs = "*"; }; } } |