aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-repository-root.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-14 00:37:16 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-15 20:37:43 +0300
commit5163436b00711318baea4fc0ad43a4de8222354a (patch)
treea05c06693bda84dd9a9b365a50c227126a5ec05f /mod/mod-repository-root.cxx
parent2ebf9de408f3fd629126a20b21221e186195813c (diff)
Implement builds page
Diffstat (limited to 'mod/mod-repository-root.cxx')
-rw-r--r--mod/mod-repository-root.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/mod/mod-repository-root.cxx b/mod/mod-repository-root.cxx
index 00cdea4..cb0b82f 100644
--- a/mod/mod-repository-root.cxx
+++ b/mod/mod-repository-root.cxx
@@ -10,6 +10,7 @@
#include <mod/module.hxx>
#include <mod/options.hxx>
+#include <mod/mod-builds.hxx>
#include <mod/mod-build-log.hxx>
#include <mod/mod-build-task.hxx>
#include <mod/mod-build-force.hxx>
@@ -61,7 +62,8 @@ namespace brep
build_task_ (make_shared<build_task> ()),
build_result_ (make_shared<build_result> ()),
build_force_ (make_shared<build_force> ()),
- build_log_ (make_shared<build_log> ())
+ build_log_ (make_shared<build_log> ()),
+ builds_ (make_shared<builds> ())
{
}
@@ -105,6 +107,10 @@ namespace brep
r.initialized_
? r.build_log_
: make_shared<build_log> (*r.build_log_)),
+ builds_ (
+ r.initialized_
+ ? r.builds_
+ : make_shared<builds> (*r.builds_)),
options_ (
r.initialized_
? r.options_
@@ -127,6 +133,7 @@ namespace brep
append (r, build_result_->options ());
append (r, build_force_->options ());
append (r, build_log_->options ());
+ append (r, builds_->options ());
return r;
}
@@ -168,6 +175,7 @@ namespace brep
sub_init (*build_result_, "build_result");
sub_init (*build_force_, "build_force");
sub_init (*build_log_, "build_log");
+ sub_init (*builds_, "builds");
// Parse own configuration options.
//
@@ -286,6 +294,13 @@ namespace brep
return handle (rp, "build_force");
}
+ else if (fn == "builds")
+ {
+ if (handler_ == nullptr)
+ handler_.reset (new builds (*builds_));
+
+ return handle (rp, "builds");
+ }
else
throw invalid_request (400, "unknown function");
}