diff options
Diffstat (limited to 'app/views/repositories/stats.html.haml')
-rw-r--r-- | app/views/repositories/stats.html.haml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/app/views/repositories/stats.html.haml b/app/views/repositories/stats.html.haml new file mode 100644 index 00000000000..bf68dc28a17 --- /dev/null +++ b/app/views/repositories/stats.html.haml @@ -0,0 +1,39 @@ += render "commits/head" +.row + .span5 + %h4 + Stats for #{@project.root_ref}: + %p + %b Total commits: + %span= @stats.commits_count + %p + %b Total files: + %span= @stats.files_count + %p + %b Authors: + %span= @stats.authors_count + + %br + %div#activity-chart + .span7 + %h4 Top 100 Committers: + %ol.styled + - @stats.authors[0...100].each do |author| + %li + = image_tag gravatar_icon(author.email, 16), class: 'avatar s16' + = author.name + %small.light= author.email + .right + = author.commits + + +:javascript + $(function(){ + var labels = [#{@graph.labels.to_json}]; + var r = Raphael('activity-chart'); + r.text(160, 10, "Commit activity for last #{@graph.weeks} weeks").attr({ font: "13px sans-serif" }); + r.barchart( + 10, 10, 400, 160, + [[#{@graph.commits.join(', ')}]] + ).label(labels, true); + }) |