版本库不同分支之间的统计

This commit is contained in:
huang 2016-04-13 16:03:59 +08:00
parent 426f5a76cc
commit f9c4c4b86f
2 changed files with 7 additions and 20 deletions

View File

@ -573,8 +573,8 @@ update
g = Gitlab.client g = Gitlab.client
begin begin
@static_total_per_user = g.rep_stats(project_id, :rev => rev, :creator => creator, :period => 1) @static_total_per_user = g.rep_stats(project_id, :rev => rev, :creator => creator, :period => 1)
@static_month__per_user = g.rep_stats(project_id, :rev => rev, :creator => creator, :period => 2) #@static_month__per_user = g.rep_stats(project_id, :rev => rev, :creator => creator, :period => 2)
@static_week_per_user = g.rep_stats(project_id, :rev => rev, :creator => creator, :period => 3) # @static_week_per_user = g.rep_stats(project_id, :rev => rev, :creator => creator, :period => 3)
rescue rescue
render_404 render_404
return return

View File

@ -4,6 +4,11 @@
<% if false %> <% if false %>
<div class="flash notice">请在版本库中提交代码,统计信息将更准确</div> <div class="flash notice">请在版本库中提交代码,统计信息将更准确</div>
<% else %> <% else %>
<div class="repository_con " style="line-height:1.9;">
<%= render :partial => 'navigation' %>
<div class="cl"></div>
</div>
<div class="riviseRed fl"></div><div class="fl">删除 是版本库的提交次数, 显示为橘红色。</div><br> <div class="riviseRed fl"></div><div class="fl">删除 是版本库的提交次数, 显示为橘红色。</div><br>
<div class="changeBlue fl"></div><div class="fl">变更 是对版本库中文件的修改次数, 显示为蓝色。</div> <div class="changeBlue fl"></div><div class="fl">变更 是对版本库中文件的修改次数, 显示为蓝色。</div>
@ -35,24 +40,6 @@
<% end %> <% end %>
</br> </br>
</br> </br>
<p class="color:red">月情况</p>
<% @static_month__per_user.each do |commit| %>
<p>总提交次数</p>
<%= commit.commits_num %>
<p>总提交代码量</p>
<%= commit.add %>
<%= commit.del %>
<% end %>
</br>
</br>
<p class="color:red">周情况</p>
<% @static_week_per_user.each do |commit| %>
<p>总提交次数</p>
<%= commit.commits_num %>
<p>总提交代码量</p>
<%= commit.add %>
<%= commit.del %>
<% end %>
</div> </div>
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p> <p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>