This commit is contained in:
huang 2015-07-26 14:15:25 +08:00
parent d89cba7a1f
commit 46272a28cf
1 changed files with 1 additions and 5 deletions

View File

@ -705,7 +705,7 @@ update
@date_from = @date_to << 6 @date_from = @date_to << 6
@date_from = Date.civil(@date_from.year, @date_from.month, @date_from.day) @date_from = Date.civil(@date_from.year, @date_from.month, @date_from.day)
commits_by_author = Changeset.count(:group => :committer, :conditions => ["#{Changeset.table_name}.repository_id = ? AND #{Changeset.table_name}.commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to]) commits_by_author = Changeset.count(:group => :committer, :conditions => ["#{Changeset.table_name}.repository_id = ? AND #{Changeset.table_name}.commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to])
commits_by_author = commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}.last(25) commits_by_author = commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}.last(40)
all_author = [] all_author = []
commits_by_author.each do |cba| commits_by_author.each do |cba|
all_author << cba.first all_author << cba.first
@ -734,10 +734,6 @@ update
:graph_title => l(:label_author_code_six_month), :graph_title => l(:label_author_code_six_month),
:show_graph_title => true :show_graph_title => true
) )
commits_data1 = [0]*12
graph.add_data(
:data => commits_data1,
)
graph.add_data( graph.add_data(
:data => commits_data, :data => commits_data,
:title => l(:lable_revision_code_count) :title => l(:lable_revision_code_count)