gitlab-org--gitlab-foss/app/views/projects/repositories/stats.html.haml

34 lines
821 B
Text
Raw Normal View History

= render "projects/commits/head"
2012-11-10 16:08:47 -05:00
.row
.col-md-6
%div#activity-chart.chart
%hr
2012-11-10 16:08:47 -05:00
%p
%b Total commits:
%span= @repository.commit_count
2012-11-10 16:08:47 -05:00
%p
2013-01-03 14:09:18 -05:00
%b Total files in #{@repository.root_ref}:
2012-11-10 16:08:47 -05:00
%span= @stats.files_count
%p
%b Authors:
%span= @stats.authors_count
.col-md-6
2012-11-10 16:33:10 -05:00
%h4 Top 50 Committers:
2012-11-10 16:08:47 -05:00
%ol.styled
2012-11-10 16:33:10 -05:00
- @stats.authors[0...50].each do |author|
2012-11-10 16:08:47 -05:00
%li
2013-10-06 14:13:56 -04:00
= image_tag avatar_icon(author.email, 16), class: 'avatar s16', alt: ''
2012-11-10 16:08:47 -05:00
= author.name
%small.light= author.email
2013-01-30 09:40:43 -05:00
.pull-right
2012-11-10 16:08:47 -05:00
= author.commits
:javascript
var labels = [#{@graph.labels.to_json}];
var commits = [#{@graph.commits.join(', ')}];
var title = "Commit activity for last #{@graph.weeks} weeks";
Chart.init(labels, commits, title);