From 81cc1cb87b2056b11640c9887bd40674c9d7925e Mon Sep 17 00:00:00 2001 From: Sato Hiroyuki Date: Tue, 5 Feb 2013 12:42:30 +0900 Subject: Enable to display the commit older than 650th commit. --- app/controllers/graph_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/graph_controller.rb') diff --git a/app/controllers/graph_controller.rb b/app/controllers/graph_controller.rb index 30ec5e89db2..c4d745e9ccd 100644 --- a/app/controllers/graph_controller.rb +++ b/app/controllers/graph_controller.rb @@ -10,7 +10,7 @@ class GraphController < ProjectResourceController respond_to do |format| format.html format.json do - graph = Gitlab::Graph::JsonBuilder.new(project, @ref) + graph = Gitlab::Graph::JsonBuilder.new(project, @ref, @commit) render :json => graph.to_json end end -- cgit v1.2.1 From 8ff5cf9cd5193b7135f53de3b62dd50bcbbfc2dc Mon Sep 17 00:00:00 2001 From: Sato Hiroyuki Date: Tue, 5 Feb 2013 12:46:31 +0900 Subject: Add search box for the commit. --- app/controllers/graph_controller.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/controllers/graph_controller.rb') diff --git a/app/controllers/graph_controller.rb b/app/controllers/graph_controller.rb index c4d745e9ccd..c370433e500 100644 --- a/app/controllers/graph_controller.rb +++ b/app/controllers/graph_controller.rb @@ -7,6 +7,16 @@ class GraphController < ProjectResourceController before_filter :require_non_empty_project def show + if params.has_key?(:q) && params[:q].blank? + redirect_to project_graph_path(@project, params[:id]) + return + end + + if params.has_key?(:q) + @q = params[:q] + @commit = @project.repository.commit(@q) || @commit + end + respond_to do |format| format.html format.json do -- cgit v1.2.1