mirror of
https://github.com/tomgi/git_stats.git
synced 2025-01-03 11:12:11 +01:00
using author name instead of email in charts
This commit is contained in:
parent
5b3b15f238
commit
dc4d2a08e9
3 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ module GitStats
|
||||||
def commits_sum_by_author_by_date(limit = 4)
|
def commits_sum_by_author_by_date(limit = 4)
|
||||||
Chart.new do |f|
|
Chart.new do |f|
|
||||||
f.multi_date_chart(
|
f.multi_date_chart(
|
||||||
data: @authors.sort_by { |author| -author.commits.size }[0..limit].map { |author| {name: author.email, data: author.commits_sum_by_date} },
|
data: @authors.sort_by { |author| -author.commits.size }[0..limit].map { |author| {name: author.name, data: author.commits_sum_by_date} },
|
||||||
title: :lines_by_date.t,
|
title: :lines_by_date.t,
|
||||||
y_text: :lines.t
|
y_text: :lines.t
|
||||||
)
|
)
|
||||||
|
@ -21,7 +21,7 @@ module GitStats
|
||||||
define_method "#{method}_by_author_by_date" do |limit = 4|
|
define_method "#{method}_by_author_by_date" do |limit = 4|
|
||||||
Chart.new do |f|
|
Chart.new do |f|
|
||||||
f.multi_date_chart(
|
f.multi_date_chart(
|
||||||
data: @authors.sort_by { |author| -author.send(method) }[0..limit].map { |author| {name: author.email, data: author.send("#{method}_by_date")} },
|
data: @authors.sort_by { |author| -author.send(method) }[0..limit].map { |author| {name: author.name, data: author.send("#{method}_by_date")} },
|
||||||
title: :lines_by_date.t,
|
title: :lines_by_date.t,
|
||||||
y_text: :lines.t
|
y_text: :lines.t
|
||||||
)
|
)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
.tab-pane.active
|
.tab-pane.active
|
||||||
.page-header.pagination-centered
|
.page-header.pagination-centered
|
||||||
%h1= page.t
|
%h1= page.t
|
||||||
%h3= author.respond_to?(:name) ? author.name : ""
|
%h3= "#{author.respond_to?(:name) ? author.name : ""} #{author.respond_to?(:email) ? "<#{author.email}>" : ""}"
|
||||||
- if page == :activity_by_date
|
- if page == :activity_by_date
|
||||||
= high_stock("charts.activity_by_date", charts.activity_by_date(author))
|
= high_stock("charts.activity_by_date", charts.activity_by_date(author))
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
- sorted_authors.each_with_index do |author, i|
|
- sorted_authors.each_with_index do |author, i|
|
||||||
%tr
|
%tr
|
||||||
%th= i+1
|
%th= i+1
|
||||||
%th= author.name
|
%th= "#{author.name} <#{author.email}>"
|
||||||
%td= author.commits.size
|
%td= author.commits.size
|
||||||
%td= author.insertions
|
%td= author.insertions
|
||||||
%td= author.deletions
|
%td= author.deletions
|
||||||
|
|
Loading…
Reference in a new issue