2013-06-11 06:54:01 +00:00
|
|
|
class GraphsController < ProjectResourceController
|
2013-05-09 05:00:56 +00:00
|
|
|
# Authorize
|
|
|
|
before_filter :authorize_read_project!
|
|
|
|
before_filter :authorize_code_access!
|
|
|
|
before_filter :require_non_empty_project
|
2013-06-05 12:50:11 +00:00
|
|
|
|
2013-05-09 05:00:56 +00:00
|
|
|
def show
|
2013-06-05 12:50:11 +00:00
|
|
|
respond_to do |format|
|
|
|
|
format.html
|
|
|
|
format.js do
|
|
|
|
@repo = @project.repository
|
|
|
|
@stats = Gitlab::Git::GitStats.new(@repo.raw, @repo.root_ref)
|
2013-06-18 15:58:33 +00:00
|
|
|
@log = @stats.parsed_log.to_json rescue []
|
2013-06-05 12:50:11 +00:00
|
|
|
end
|
|
|
|
end
|
2013-05-09 05:00:56 +00:00
|
|
|
end
|
2013-06-05 12:50:11 +00:00
|
|
|
end
|