From 525a8cd3e96b7bae0acda8b6e94df529fa06ff6a Mon Sep 17 00:00:00 2001 From: Sato Hiroyuki Date: Tue, 29 Jan 2013 17:25:17 +0900 Subject: Switchable the main branch on network graph --- app/controllers/graph_controller.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 app/controllers/graph_controller.rb (limited to 'app/controllers/graph_controller.rb') diff --git a/app/controllers/graph_controller.rb b/app/controllers/graph_controller.rb new file mode 100644 index 00000000000..30ec5e89db2 --- /dev/null +++ b/app/controllers/graph_controller.rb @@ -0,0 +1,18 @@ +class GraphController < ProjectResourceController + include ExtractsPath + + # Authorize + before_filter :authorize_read_project! + before_filter :authorize_code_access! + before_filter :require_non_empty_project + + def show + respond_to do |format| + format.html + format.json do + graph = Gitlab::Graph::JsonBuilder.new(project, @ref) + render :json => graph.to_json + end + end + end +end -- cgit v1.2.1