gitlab-org--gitlab-foss/app/views/projects/graphs/commits.html.haml

93 lines
2.4 KiB
Plaintext
Raw Normal View History

- page_title "Commits", "Graphs"
= render "header_title"
.tree-ref-holder
= render 'shared/ref_switcher', destination: 'graphs_commits'
= render 'head'
%p.lead
2015-03-03 22:05:31 +00:00
Commit statistics for
%strong #{@ref}
#{@commits_graph.start_date.strftime('%b %d')} - #{@commits_graph.end_date.strftime('%b %d')}
.row
.col-md-6
%ul
%li
%p.lead
%strong #{@commits_graph.commits.size}
commits during
%strong #{@commits_graph.duration}
days
%li
%p.lead
Average
%strong #{@commits_graph.commit_per_day}
commits per day
%li
%p.lead
Contributed by
%strong #{@commits_graph.authors}
authors
.col-md-6
%div
%p.slead
Commits per day of month
%canvas#month-chart{width: 800, height: 400}
.row
.col-md-6
%div
%p.slead
Commits per day hour (UTC)
%canvas#hour-chart{width: 800, height: 400}
.col-md-6
%div
%p.slead
Commits per weekday
%canvas#weekday-chart{width: 800, height: 400}
:coffeescript
data = {
labels : #{@commits_per_time.keys.to_json},
datasets : [{
fillColor : "rgba(220,220,220,0.5)",
strokeColor : "rgba(220,220,220,1)",
2015-05-13 10:51:47 +00:00
barStrokeWidth: 1,
barValueSpacing: 1,
barDatasetSpacing: 1,
data : #{@commits_per_time.values.to_json}
}]
}
ctx = $("#hour-chart").get(0).getContext("2d");
2015-05-13 10:51:47 +00:00
new Chart(ctx).Bar(data,{"scaleOverlay": true, responsive: true, pointHitDetectionRadius: 2})
data = {
labels : #{@commits_per_week_days.keys.to_json},
datasets : [{
fillColor : "rgba(220,220,220,0.5)",
strokeColor : "rgba(220,220,220,1)",
2015-05-13 10:51:47 +00:00
barStrokeWidth: 1,
barValueSpacing: 1,
barDatasetSpacing: 1,
data : #{@commits_per_week_days.values.to_json}
}]
}
ctx = $("#weekday-chart").get(0).getContext("2d");
2015-05-13 10:51:47 +00:00
new Chart(ctx).Bar(data,{"scaleOverlay": true, responsive: true, pointHitDetectionRadius: 2})
data = {
labels : #{@commits_per_month.keys.to_json},
datasets : [{
fillColor : "rgba(220,220,220,0.5)",
strokeColor : "rgba(220,220,220,1)",
2015-05-13 10:51:47 +00:00
barStrokeWidth: 1,
barValueSpacing: 1,
barDatasetSpacing: 1,
data : #{@commits_per_month.values.to_json}
}]
}
ctx = $("#month-chart").get(0).getContext("2d");
2015-05-13 10:51:47 +00:00
new Chart(ctx).Bar(data, {"scaleOverlay": true, responsive: true, pointHitDetectionRadius: 2})