gitlabhq/app/views/repositories/stats.html.haml

42 lines
976 B
Text
Raw Normal View History

2012-11-10 22:08:47 +01:00
= render "commits/head"
.row
.span5
%h4
2012-11-13 20:26:36 +01:00
Stats:
2012-11-10 22:08:47 +01:00
%p
%b Total commits:
%span= @stats.commits_count
%p
2012-11-13 20:26:36 +01:00
%b Total files in #{@project.root_ref}:
2012-11-10 22:08:47 +01:00
%span= @stats.files_count
%p
%b Authors:
%span= @stats.authors_count
%br
%div#activity-chart
.span7
2012-11-10 22:33:10 +01:00
%h4 Top 50 Committers:
2012-11-10 22:08:47 +01:00
%ol.styled
2012-11-10 22:33:10 +01:00
- @stats.authors[0...50].each do |author|
2012-11-10 22:08:47 +01:00
%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}];
2012-11-13 20:26:36 +01:00
var commits = [#{@graph.commits.join(', ')}];
2012-11-10 22:08:47 +01:00
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,
2012-11-13 20:26:36 +01:00
[commits],
{colors:["#456"]}
2012-11-10 22:08:47 +01:00
).label(labels, true);
})