debian-mirror-gitlab/app/views/projects/graphs/charts.html.haml

85 lines
2.5 KiB
Text
Raw Normal View History

2016-06-22 15:30:34 +05:30
- @no_container = true
2017-08-17 22:00:37 +05:30
- page_title "Charts"
2015-04-26 12:48:37 +05:30
2017-08-17 22:00:37 +05:30
.repo-charts{ class: container_class }
%h4.sub-header
2018-03-17 18:26:18 +05:30
= _("Programming languages used in this repository")
2015-11-26 14:37:03 +05:30
2017-08-17 22:00:37 +05:30
.row
.col-md-4
%ul.bordered-list
- @languages.each do |language|
%li
%span{ style: "color: #{language[:color]}" }
= icon('circle')
 
= language[:label]
2018-11-08 19:23:39 +05:30
.float-right
2017-08-17 22:00:37 +05:30
= 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-03-17 18:26:18 +05:30
- start_time = capture do
#{@commits_graph.start_date.strftime('%b %d')}
- end_time = capture do
#{@commits_graph.end_date.strftime('%b %d')}
2018-06-27 16:04:02 +05:30
= (_("Commit statistics for %{ref} %{start_time} - %{end_time}") % { ref: "<strong>#{h @ref}</strong>", start_time: start_time, end_time: end_time }).html_safe
2017-08-17 22:00:37 +05:30
.col-md-6
.tree-ref-container
.tree-ref-holder
= render 'shared/ref_switcher', destination: 'graphs_commits'
%ul.breadcrumb.repo-breadcrumb
= commits_breadcrumbs
2015-04-26 12:48:37 +05:30
2016-06-22 15:30:34 +05:30
.row
.col-md-6
2017-08-17 22:00:37 +05:30
%ul.commit-stats
2016-06-22 15:30:34 +05:30
%li
2018-03-17 18:26:18 +05:30
- total = capture do
#{@commits_graph.commits.size}
= (_("Total: %{total}") % { total: "<strong>#{total} commits</strong>" }).html_safe
2016-06-22 15:30:34 +05:30
%li
2018-03-17 18:26:18 +05:30
- average = capture do
#{@commits_graph.commit_per_day}
= (_("Average per day: %{average}") % { average: "<strong>#{average} commits</strong>" }).html_safe
2016-06-22 15:30:34 +05:30
%li
2018-03-17 18:26:18 +05:30
- authors = capture do
#{@commits_graph.authors}
= (_("Authors: %{authors}") % { authors: "<strong>#{authors}</strong>" }).html_safe
2016-06-22 15:30:34 +05:30
.col-md-6
%div
%p.slead
2018-03-17 18:26:18 +05:30
= _("Commits per day of month")
2016-06-22 15:30:34 +05:30
%canvas#month-chart
.row
.col-md-6
.col-md-6
%div
%p.slead
2018-03-17 18:26:18 +05:30
= _("Commits per weekday")
2016-06-22 15:30:34 +05:30
%canvas#weekday-chart
2017-08-17 22:00:37 +05:30
.row
.col-md-6
.col-md-6
%div
%p.slead
2018-03-17 18:26:18 +05:30
= _("Commits per day hour (UTC)")
2017-08-17 22:00:37 +05:30
%canvas#hour-chart
2015-04-26 12:48:37 +05:30
2018-03-27 19:54:05 +05:30
-# haml-lint:disable InlineJavaScript
2017-09-10 17:25:29 +05:30
%script#projectChartData{ type: "application/json" }
- projectChartData = {};
- projectChartData['hour'] = @commits_per_time
- projectChartData['weekDays'] = @commits_per_week_days
- projectChartData['month'] = @commits_per_month
- projectChartData['languages'] = @languages
= projectChartData.to_json.html_safe