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

86 lines
2.2 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"
2017-09-10 17:25:29 +05:30
- if show_new_nav?
- add_to_breadcrumbs("Repository", project_tree_path(@project))
2017-08-17 22:00:37 +05:30
- content_for :page_specific_javascripts do
2017-09-10 17:25:29 +05:30
= webpack_bundle_tag('common_d3')
= webpack_bundle_tag('graphs')
= webpack_bundle_tag('graphs_charts')
2017-08-17 22:00:37 +05:30
= render "projects/commits/head"
2015-04-26 12:48:37 +05:30
2017-08-17 22:00:37 +05:30
.repo-charts{ class: container_class }
%h4.sub-header
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]
.pull-right
= 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
Commit statistics for
%strong= @ref
#{@commits_graph.start_date.strftime('%b %d')} - #{@commits_graph.end_date.strftime('%b %d')}
.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
2017-08-17 22:00:37 +05:30
Total:
%strong #{@commits_graph.commits.size} commits
2016-06-22 15:30:34 +05:30
%li
2017-08-17 22:00:37 +05:30
Average per day:
%strong #{@commits_graph.commit_per_day} commits
2016-06-22 15:30:34 +05:30
%li
2017-08-17 22:00:37 +05:30
Authors:
%strong= @commits_graph.authors
2016-06-22 15:30:34 +05:30
.col-md-6
%div
%p.slead
Commits per day of month
%canvas#month-chart
.row
.col-md-6
.col-md-6
%div
%p.slead
Commits per weekday
%canvas#weekday-chart
2017-08-17 22:00:37 +05:30
.row
.col-md-6
.col-md-6
%div
%p.slead
Commits per day hour (UTC)
%canvas#hour-chart
2015-04-26 12:48:37 +05:30
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