From 5163436b00711318baea4fc0ad43a4de8222354a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 14 May 2017 00:37:16 +0300 Subject: Implement builds page --- mod/mod-repository-root.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'mod/mod-repository-root.cxx') 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 #include +#include #include #include #include @@ -61,7 +62,8 @@ namespace brep build_task_ (make_shared ()), build_result_ (make_shared ()), build_force_ (make_shared ()), - build_log_ (make_shared ()) + build_log_ (make_shared ()), + builds_ (make_shared ()) { } @@ -105,6 +107,10 @@ namespace brep r.initialized_ ? r.build_log_ : make_shared (*r.build_log_)), + builds_ ( + r.initialized_ + ? r.builds_ + : make_shared (*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"); } -- cgit v1.1