2016-06-15 09:54:31 -04:00
|
|
|
- @no_container = true
|
2018-11-14 11:16:04 -05:00
|
|
|
- page_title _("Contribution Charts")
|
2015-11-08 13:29:22 -05:00
|
|
|
|
2017-03-02 12:57:01 -05:00
|
|
|
.repo-charts{ class: container_class }
|
|
|
|
%h4.sub-header
|
2018-02-08 00:55:52 -05:00
|
|
|
= _("Programming languages used in this repository")
|
2014-09-26 13:32:44 -04:00
|
|
|
|
2017-03-02 12:57:01 -05:00
|
|
|
.row
|
|
|
|
.col-md-4
|
|
|
|
%ul.bordered-list
|
|
|
|
- @languages.each do |language|
|
|
|
|
%li
|
|
|
|
%span{ style: "color: #{language[:color]}" }
|
|
|
|
= icon('circle')
|
|
|
|
|
|
|
|
= language[:label]
|
2018-04-09 13:42:45 -04:00
|
|
|
.float-right
|
2017-03-02 12:57:01 -05:00
|
|
|
= language[:value]
|
|
|
|
\%
|
|
|
|
.col-md-8
|
|
|
|
%canvas#languages-chart{ height: 400 }
|
|
|
|
|
|
|
|
.repo-charts{ class: container_class }
|
|
|
|
.sub-header-block.border-top
|
|
|
|
|
|
|
|
.row.tree-ref-header
|
|
|
|
.col-md-6
|
|
|
|
%h4
|
2018-02-08 00:55:52 -05:00
|
|
|
- start_time = capture do
|
|
|
|
#{@commits_graph.start_date.strftime('%b %d')}
|
|
|
|
- end_time = capture do
|
|
|
|
#{@commits_graph.end_date.strftime('%b %d')}
|
2018-06-18 09:29:27 -04:00
|
|
|
= (_("Commit statistics for %{ref} %{start_time} - %{end_time}") % { ref: "<strong>#{h @ref}</strong>", start_time: start_time, end_time: end_time }).html_safe
|
2017-03-02 12:57:01 -05:00
|
|
|
|
|
|
|
.col-md-6
|
|
|
|
.tree-ref-container
|
|
|
|
.tree-ref-holder
|
|
|
|
= render 'shared/ref_switcher', destination: 'graphs_commits'
|
|
|
|
%ul.breadcrumb.repo-breadcrumb
|
|
|
|
= commits_breadcrumbs
|
2014-09-26 13:32:44 -04:00
|
|
|
|
2016-06-15 09:54:31 -04:00
|
|
|
.row
|
|
|
|
.col-md-6
|
2017-03-02 12:57:01 -05:00
|
|
|
%ul.commit-stats
|
2016-06-15 09:54:31 -04:00
|
|
|
%li
|
2018-02-08 00:55:52 -05:00
|
|
|
- total = capture do
|
|
|
|
#{@commits_graph.commits.size}
|
|
|
|
= (_("Total: %{total}") % { total: "<strong>#{total} commits</strong>" }).html_safe
|
2016-06-15 09:54:31 -04:00
|
|
|
%li
|
2018-02-08 00:55:52 -05:00
|
|
|
- average = capture do
|
|
|
|
#{@commits_graph.commit_per_day}
|
|
|
|
= (_("Average per day: %{average}") % { average: "<strong>#{average} commits</strong>" }).html_safe
|
2016-06-15 09:54:31 -04:00
|
|
|
%li
|
2018-02-08 00:55:52 -05:00
|
|
|
- authors = capture do
|
|
|
|
#{@commits_graph.authors}
|
|
|
|
= (_("Authors: %{authors}") % { authors: "<strong>#{authors}</strong>" }).html_safe
|
2016-06-15 09:54:31 -04:00
|
|
|
.col-md-6
|
2019-02-08 11:09:24 -05:00
|
|
|
%p.slead
|
|
|
|
= _("Commits per day of month")
|
2016-06-15 09:54:31 -04:00
|
|
|
%div
|
|
|
|
%canvas#month-chart
|
|
|
|
.row
|
|
|
|
.col-md-6
|
|
|
|
.col-md-6
|
2019-02-08 11:09:24 -05:00
|
|
|
%p.slead
|
|
|
|
= _("Commits per weekday")
|
2016-06-15 09:54:31 -04:00
|
|
|
%div
|
|
|
|
%canvas#weekday-chart
|
2017-03-02 12:57:01 -05:00
|
|
|
.row
|
|
|
|
.col-md-6
|
|
|
|
.col-md-6
|
2019-02-08 11:09:24 -05:00
|
|
|
%p.slead
|
|
|
|
= _("Commits per day hour (UTC)")
|
2017-03-02 12:57:01 -05:00
|
|
|
%div
|
|
|
|
%canvas#hour-chart
|
2014-09-26 13:32:44 -04:00
|
|
|
|
2018-02-28 17:59:50 -05:00
|
|
|
-# haml-lint:disable InlineJavaScript
|
2017-08-01 04:50:59 -04:00
|
|
|
%script#projectChartData{ type: "application/json" }
|
|
|
|
- projectChartData = {};
|
2017-08-08 08:02:13 -04:00
|
|
|
- projectChartData['hour'] = @commits_per_time
|
|
|
|
- projectChartData['weekDays'] = @commits_per_week_days
|
|
|
|
- projectChartData['month'] = @commits_per_month
|
2017-08-01 04:50:59 -04:00
|
|
|
- projectChartData['languages'] = @languages
|
|
|
|
= projectChartData.to_json.html_safe
|