Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
ac0cc37fe4
|
@ -248,12 +248,10 @@ class QualityAnalysisController < ApplicationController
|
|||
author_infos.each do |author_info|
|
||||
email = author_info.email
|
||||
changes = author_info.changes.to_i
|
||||
unresolved_issues = open(@sonar_address + "/api/issues/search?projectKeys=#{@resource_id}&authors=#{email}&resolved=false").read
|
||||
unresolved_issue_count = JSON.parse(unresolved_issues)["total"].to_i
|
||||
all_issues = open(@sonar_address + "/api/issues/search?projectKeys=#{@resource_id}&authors=#{email}").read
|
||||
all_issue_count = JSON.parse(all_issues)["total"].to_i
|
||||
user_issues = open(@sonar_address + "/api/issues/search?projectKeys=#{@resource_id}&authors=#{email}&resolved=false").read
|
||||
issue_count = JSON.parse(user_issues)["total"].to_i
|
||||
ratio = (changes == 0 ? 0 : format("%0.4f",issue_count.to_f/changes.to_f))
|
||||
@user_quality_infos << {:email => email, :changes => changes, :unresolved_issue_count => unresolved_issue_count, :ratio => ratio, :all_issue_count => all_issue_count}
|
||||
@user_quality_infos << {:email => email, :changes => changes, :issue_count => issue_count, :ratio => ratio}
|
||||
end
|
||||
|
||||
# 按名称转换成hash键值对
|
||||
|
|
|
@ -36,7 +36,13 @@
|
|||
<div class="homepagePostReply">
|
||||
<div class="topBorder" style="display: <%= @issue.journals.count>0 ? 'none': '' %>"></div>
|
||||
<div class="homepagePostReplyBanner" >
|
||||
<div class="homepagePostReplyBannerCount" >回复(<%= @issue.journals.count %>)</div>
|
||||
<% count = @issue.journals.count %>
|
||||
<div class="homepagePostReplyBannerCount" >回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=@issue.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@issue, :user_activity_id=>@issue.id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
</div>
|
||||
<div class="" id="reply_div_<%= @issue.id %>" >
|
||||
|
|
|
@ -131,10 +131,13 @@
|
|||
<%= render :partial => 'courses/course_activity_users', :locals => {:course => @course} %>
|
||||
<%# 课程英雄榜 %>
|
||||
<%= render :partial => 'courses/course_heroes', :locals => {:course => @course} %>
|
||||
<div class="sy_class_leftbox mb15" >
|
||||
<div class="sy_class_leftbox" >
|
||||
<h3 class="fontGrey7">班级推荐</h3>
|
||||
<%= render :partial => 'courses/recommendation', :locals => {:course => @course} %>
|
||||
</div>
|
||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||
<% update_visiti_count @course %>
|
||||
<div class="fontGrey5 mt10 ml20">访问计数 <%= @course.visits.to_i %> (自2016年5月)</div>
|
||||
</div><!--sy_class_l end-->
|
||||
<div class="fl">
|
||||
<%= yield %>
|
||||
|
|
|
@ -110,8 +110,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<a href="javascript:void(0)" class="user_leftinfo_img"><%=image_tag(url_to_avatar(@user),width:"74", height: "74")%></a>
|
||||
<% end %>
|
||||
<a href="javascript:void(0)" class="user_leftinfo_img" style="cursor: default">
|
||||
<%=image_tag(url_to_avatar(@user),width:"74", height: "74", :id=>'nh_source_tx') %>
|
||||
</a>
|
||||
<% end %>
|
||||
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
|
||||
<span class="<%= @user.user_extensions.gender == 1 ? 'user_leftinfo_female' : 'user_leftinfo_male' %> "></span>
|
||||
<% end %>
|
||||
|
@ -214,6 +216,8 @@
|
|||
</ul>
|
||||
</div><!--sy_class_leftnav end-->
|
||||
|
||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||
<% update_visiti_count @user %>
|
||||
<div class="fontGrey5 mt10 ml20">访问计数 <%= @user.visits.to_i %> (自2016年5月)</div>
|
||||
</div>
|
||||
<div class="homepageRight">
|
||||
|
|
|
@ -133,8 +133,7 @@
|
|||
<ul class="contribute-list">
|
||||
<li class="fl fontGrey2 contribute-list-avatar"> </li>
|
||||
<li class="fl fontGrey2 contribute-list-code">代码行数</li>
|
||||
<li class="fl fontGrey2 contribute-list-problem">引入质量问题总数</li>
|
||||
<li class="fl fontGrey2 contribute-list-problem">未解决质量问题数</li>
|
||||
<li class="fl fontGrey2 contribute-list-problem">引入质量问题数</li>
|
||||
<li class="fl fontGrey2 contribute-list-rate">引入质量问题数/代码行数</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
|
@ -150,8 +149,7 @@
|
|||
</div>
|
||||
</li>
|
||||
<li class="fl fontGrey2 contribute-list-code contribute-list-height contribute-list-line-height"><%= author_info[:changes] %></li>
|
||||
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height"><%= author_info[:all_issue_count] %></li>
|
||||
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height"><%= author_info[:unresolved_issue_count] %></li>
|
||||
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height"><%= author_info[:issue_count] %></li>
|
||||
<li class="fl contribute-list-rate fontBlue2 contribute-list-height contribute-list-line-height"><%= author_info[:ratio] %></li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
|
|
|
@ -398,7 +398,7 @@ a:hover.c_grey{ color:#333;}
|
|||
.fontGrey2 {color:#888888;}
|
||||
.fontGrey3 {color:#484848;}
|
||||
.fontGrey4{color:#999999;}
|
||||
.fontGrey5 {color:#a1a1a1;}
|
||||
.fontGrey5 {color:#ddd;}
|
||||
.fontGrey6 {color:#7a7a7a;}
|
||||
.fontGrey7 {color:#555;}
|
||||
.fontBlue {color:#3498db;}
|
||||
|
|
|
@ -498,9 +498,9 @@ a:hover.upload_btn_grey{background:#8a8a8a;}
|
|||
.image-cir {border-radius:50%;}
|
||||
.analysis-genral-icon {position:absolute; padding:1px 5px; display:inline-block; top:5px;}
|
||||
.contribute-list-avatar {width:80px; vertical-align:middle; text-align:center;}
|
||||
.contribute-list-code {width:130px; vertical-align:middle; text-align:center;}
|
||||
.contribute-list-problem {width:130px; vertical-align:middle; text-align:center;}
|
||||
.contribute-list-rate {width:168px; vertical-align:middle; text-align:center;}
|
||||
.contribute-list-code {width:160px; vertical-align:middle; text-align:center;}
|
||||
.contribute-list-problem {width:170px; vertical-align:middle; text-align:center;}
|
||||
.contribute-list-rate {width:228px; vertical-align:middle; text-align:center;}
|
||||
.contribute-list-height {height:80px;}
|
||||
.contribute-list-line-height {line-height:80px;}
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ a.postTypeGrey:hover {color:#269ac9;}
|
|||
.homepagePostBrief {width:720px; margin:0px auto; position:relative;}
|
||||
.homepagePostPortrait {float:left; width:50px;}
|
||||
.homepagePostDes {float:left; width:655px; margin-left:15px; overflow:hidden;}
|
||||
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
|
||||
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px; margin-right: 20px;}
|
||||
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
|
||||
.homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;}
|
||||
.homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;}
|
||||
|
|
Loading…
Reference in New Issue