Merge pull request #3109 from hiroponz/improve-network-graph

Improve network graph
This commit is contained in:
Dmitriy Zaporozhets 2013-03-04 23:02:27 -08:00
commit 3a09f02e11
10 changed files with 441 additions and 343 deletions

View file

@ -1,5 +1,6 @@
class GraphController < ProjectResourceController
include ExtractsPath
include ApplicationHelper
# Authorize
before_filter :authorize_read_project!
@ -20,7 +21,10 @@ class GraphController < ProjectResourceController
respond_to do |format|
format.html
format.json do
graph = Gitlab::Graph::JsonBuilder.new(project, @ref, @commit)
graph = Graph::JsonBuilder.new(project, @ref, @commit)
graph.commits.each do |c|
c.icon = gravatar_icon(c.author.email)
end
render :json => graph.to_json
end
end

View file

@ -1,5 +1,3 @@
require Rails.root.join('lib', 'gitlab', 'graph', 'json_builder')
class ProjectsController < ProjectResourceController
skip_before_filter :project, only: [:new, :create]
skip_before_filter :repository, only: [:new, :create]