gitlab-org--gitlab-foss/app/controllers/graphs_controller.rb
2013-06-18 18:58:33 +03:00

17 lines
450 B
Ruby

class GraphsController < ProjectResourceController
# 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.js do
@repo = @project.repository
@stats = Gitlab::Git::GitStats.new(@repo.raw, @repo.root_ref)
@log = @stats.parsed_log.to_json rescue []
end
end
end
end