85 lines
2.4 KiB
Text
85 lines
2.4 KiB
Text
- @no_container = true
|
|
- page_title "Charts"
|
|
- if show_new_nav?
|
|
- add_to_breadcrumbs("Repository", project_tree_path(@project))
|
|
- content_for :page_specific_javascripts do
|
|
= webpack_bundle_tag('common_d3')
|
|
= webpack_bundle_tag('graphs')
|
|
= webpack_bundle_tag('graphs_charts')
|
|
= render "projects/commits/head"
|
|
|
|
.repo-charts{ class: container_class }
|
|
%h4.sub-header
|
|
Programming languages used in this repository
|
|
|
|
.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
|
|
|
|
.row
|
|
.col-md-6
|
|
%ul.commit-stats
|
|
%li
|
|
Total:
|
|
%strong #{@commits_graph.commits.size} commits
|
|
%li
|
|
Average per day:
|
|
%strong #{@commits_graph.commit_per_day} commits
|
|
%li
|
|
Authors:
|
|
%strong= @commits_graph.authors
|
|
.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
|
|
.row
|
|
.col-md-6
|
|
.col-md-6
|
|
%div
|
|
%p.slead
|
|
Commits per day hour (UTC)
|
|
%canvas#hour-chart
|
|
|
|
%script#projectChartData{ type: "application/json" }
|
|
- projectChartData = {};
|
|
- projectChartData['hour'] = { 'keys' => @commits_per_time.keys, 'values' => @commits_per_time.values }
|
|
- projectChartData['weekDays'] = { 'keys' => @commits_per_week_days.keys, 'values' => @commits_per_week_days.values }
|
|
- projectChartData['month'] = { 'keys' => @commits_per_month.keys, 'values' => @commits_per_month.values }
|
|
- projectChartData['languages'] = @languages
|
|
= projectChartData.to_json.html_safe
|