diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-03-07 16:55:03 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-03-07 16:55:03 +0800 |
commit | fb167787f2c470649195a5d623f489ec2c3a9117 (patch) | |
tree | ad60222b53a11ee2b29131f57e24ba66dd823c3d /app/views/projects/graphs/commits.html.haml | |
parent | 7c9cff3a744a64848207bfde1aedcfe652f07dce (diff) | |
parent | 24f1ee5e9b1f4d9bc8cff581419b091756da8deb (diff) | |
download | gitlab-ce-fb167787f2c470649195a5d623f489ec2c3a9117.tar.gz |
Merge remote-tracking branch 'upstream/master' into set-default-cache-key-for-jobs
* upstream/master: (289 commits)
re-add Assign to Me link on new MR/Issue forms
thinner bottom header border
make header match old 16px padding of body contents
Update font-awesome-rails to 4.7.0.1
Relax font-awesome-rails dependency to ~> 4.7
Restore keyboard shortcuts for "Activity" and "Charts"
fix border radius bottom for header
match padding for mr-widget sections
Update changelog
Fix project-last-commit alignment
Docs: update GL Pages IP on GL.com
Fix up @DouweM review
Remove readme-only project view preference
Add `uploads` to known models for Import/Export spec
Add `has_many` associations for models that can have Upload records
Handle relative and absolute Upload paths in the Uploaders
Change the default CarrierWave root path for tests
Fix Projects::UploadService spec
Add a Project::UploadsController spec to ensure an Upload is created
Add `RecordsUploads` module to record Upload records via callbacks
...
Diffstat (limited to 'app/views/projects/graphs/commits.html.haml')
-rw-r--r-- | app/views/projects/graphs/commits.html.haml | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/app/views/projects/graphs/commits.html.haml b/app/views/projects/graphs/commits.html.haml deleted file mode 100644 index c8a82f7bca3..00000000000 --- a/app/views/projects/graphs/commits.html.haml +++ /dev/null @@ -1,95 +0,0 @@ -- @no_container = true -- page_title "Commits", "Graphs" -= render 'head' - -%div{ class: container_class } - .sub-header-block - .tree-ref-holder - = render 'shared/ref_switcher', destination: 'graphs_commits' - %ul.breadcrumb.repo-breadcrumb - = commits_breadcrumbs - - %p.lead - 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 - .row - .col-md-6 - %div - %p.slead - Commits per day hour (UTC) - %canvas#hour-chart - .col-md-6 - %div - %p.slead - Commits per weekday - %canvas#weekday-chart - -:javascript - var responsiveChart = function (selector, data) { - var options = { "scaleOverlay": true, responsive: true, pointHitDetectionRadius: 2, maintainAspectRatio: false }; - // get selector by context - var ctx = selector.get(0).getContext("2d"); - // pointing parent container to make chart.js inherit its width - var container = $(selector).parent(); - var generateChart = function() { - selector.attr('width', $(container).width()); - if (window.innerWidth < 768) { - // Scale fonts if window width lower than 768px (iPad portrait) - options.scaleFontSize = 8 - } - return new Chart(ctx).Bar(data, options); - }; - // enabling auto-resizing - $(window).resize(generateChart); - return generateChart(); - }; - - var chartData = function (keys, values) { - var data = { - labels : keys, - datasets : [{ - fillColor : "rgba(220,220,220,0.5)", - strokeColor : "rgba(220,220,220,1)", - barStrokeWidth: 1, - barValueSpacing: 1, - barDatasetSpacing: 1, - data : values - }] - }; - return data; - }; - - var hourData = chartData(#{@commits_per_time.keys.to_json}, #{@commits_per_time.values.to_json}); - responsiveChart($('#hour-chart'), hourData); - - var dayData = chartData(#{@commits_per_week_days.keys.to_json}, #{@commits_per_week_days.values.to_json}); - responsiveChart($('#weekday-chart'), dayData); - - var monthData = chartData(#{@commits_per_month.keys.to_json}, #{@commits_per_month.values.to_json}); - responsiveChart($('#month-chart'), monthData); |