summaryrefslogtreecommitdiff
path: root/app/controllers/graphs_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/graphs_controller.rb')
-rw-r--r--app/controllers/graphs_controller.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/graphs_controller.rb b/app/controllers/graphs_controller.rb
new file mode 100644
index 00000000000..5ae9c15c0f7
--- /dev/null
+++ b/app/controllers/graphs_controller.rb
@@ -0,0 +1,17 @@
+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
+ end
+ end
+ end
+end