diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index e3d089312..5c8d194b9 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -321,7 +321,7 @@ class ProjectsController < ApplicationController end g = Gitlab.client unless @project.gpid.nil? - @static_total_per_user = g.rep_stats(@project.gpid).map {|p| p.changes} + @static_total_per_user = g.rep_stats(@project.gpid) end # 根据对应的请求,返回对应的数据 respond_to do |format| diff --git a/app/views/projects/_rep_static.html.erb b/app/views/projects/_rep_static.html.erb new file mode 100644 index 000000000..0522fd34e --- /dev/null +++ b/app/views/projects/_rep_static.html.erb @@ -0,0 +1,111 @@ +<%= javascript_include_tag 'highcharts','highcharts-more' %> +
+
+
+
+ \ No newline at end of file diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 2adca9a41..63d7d583f 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -31,7 +31,7 @@
-

<%= @static_total_per_user %>



+ <%= render :partial => "rep_static" %>
diff --git a/app/views/repositories/stats.html.erb b/app/views/repositories/stats.html.erb index 9567f6a69..4a8bd9217 100644 --- a/app/views/repositories/stats.html.erb +++ b/app/views/repositories/stats.html.erb @@ -54,7 +54,7 @@ }, series: [{ name: '改动或增加', - + // data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6] data: <%= @static_total_per_user.map{|c| c.add.to_i} %> },