diff --git a/app/controllers/quality_analysis_controller.rb b/app/controllers/quality_analysis_controller.rb index 9fbe5bc3c..bcfb74241 100644 --- a/app/controllers/quality_analysis_controller.rb +++ b/app/controllers/quality_analysis_controller.rb @@ -248,10 +248,12 @@ class QualityAnalysisController < ApplicationController author_infos.each do |author_info| email = author_info.email changes = author_info.changes.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 + 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 ratio = (changes == 0 ? 0 : format("%0.4f",issue_count.to_f/changes.to_f)) - @user_quality_infos << {:email => email, :changes => changes, :issue_count => issue_count, :ratio => ratio} + @user_quality_infos << {:email => email, :changes => changes, :unresolved_issue_count => unresolved_issue_count, :ratio => ratio, :all_issue_count => all_issue_count} end # 按名称转换成hash键值对 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2d6e84762..1ff7fc2d9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2524,7 +2524,7 @@ module ApplicationHelper def footer_logo(ul_class=nil, li_class=nil) logos = [] logos.push(link_to image_tag('/images/footer_logo/nudt.png',:alt=>"nudt"),"http://www.nudt.edu.cn/special.asp?classid=12" ) - logos.push(link_to image_tag('/images/footer_logo/peking_eecs.png', :alt=>"peking_eecs"), "http://eecs.pku.edu.cn" ) + logos.push(link_to image_tag('/images/footer_logo/peking_eecs.png', :alt=>"peking_eecs"), "http://www.sei.pku.edu.cn/" ) logos.push(link_to image_tag('/images/footer_logo/buaa_scse.png', :alt=>"buaa_scse"), "http://scse.buaa.edu.cn/" ) logos.push(link_to image_tag('/images/footer_logo/iscas.png', :alt=>"iscas"), "http://www.iscas.ac.cn" ) logos.push(link_to image_tag('/images/footer_logo/inforbus.png', :alt=>"inforbus"), "http://www.inforbus.com" ) diff --git a/app/views/layouts/_base_footer.html.erb b/app/views/layouts/_base_footer.html.erb index 7253af03d..bef18d7fc 100644 --- a/app/views/layouts/_base_footer.html.erb +++ b/app/views/layouts/_base_footer.html.erb @@ -26,7 +26,7 @@ <%= link_to image_tag('/images/footer_logo/nudt.png',:size=>'100x30',:alt=>l(:label_co_organizer_NUDT)),"http://www.nudt.edu.cn/special.asp?classid=12", :target => "_blank" %> - <%= link_to image_tag('/images/footer_logo/peking_eecs.png',:size=>'100x30',:alt=>l(:label_co_organizer_EECS)), "http://eecs.pku.edu.cn", :target => "_blank" %> + <%= link_to image_tag('/images/footer_logo/peking_eecs.png',:size=>'100x30',:alt=>l(:label_co_organizer_EECS)), "http://www.sei.pku.edu.cn/", :target => "_blank" %> <%= link_to image_tag('/images/footer_logo/buaa_scse.png',:size=>'100x30',:alt=>l(:label_co_organizer_BHU)), "http://scse.buaa.edu.cn/", :target => "_blank" %> diff --git a/app/views/layouts/_base_footer_public.html.erb b/app/views/layouts/_base_footer_public.html.erb index 7c5ab571e..18152c745 100644 --- a/app/views/layouts/_base_footer_public.html.erb +++ b/app/views/layouts/_base_footer_public.html.erb @@ -24,7 +24,7 @@ <%= l(:label_sponsor)%>
  • - <%= l(:label_partners)%><%= l(:label_co_organizer_EECS)%> + <%= l(:label_partners)%><%= l(:label_co_organizer_EECS)%>
  • <%= l(:label_co_organizer_BHU)%> diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index a639e1203..1625241fa 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -22,7 +22,7 @@ <%= l(:label_partners)%>
  • - <%#= l(:label_co_organizer_EECS)%>北京大学 + <%#= l(:label_co_organizer_EECS)%>北京大学
  • <%#= l(:label_co_organizer_BHU)%>北京航空航天大学 diff --git a/app/views/layouts/_footer_show.html.erb b/app/views/layouts/_footer_show.html.erb index bb29956d3..19028ed8a 100644 --- a/app/views/layouts/_footer_show.html.erb +++ b/app/views/layouts/_footer_show.html.erb @@ -22,7 +22,7 @@ <%= l(:label_partners)%>
  • - <%#= l(:label_co_organizer_EECS)%>北京大学 + <%#= l(:label_co_organizer_EECS)%>北京大学
  • <%#= l(:label_co_organizer_BHU)%>北京航空航天大学 diff --git a/app/views/layouts/_new_footer.html.erb b/app/views/layouts/_new_footer.html.erb index 06f8c61e3..90b693053 100644 --- a/app/views/layouts/_new_footer.html.erb +++ b/app/views/layouts/_new_footer.html.erb @@ -13,7 +13,7 @@ <%= link_to image_tag('/images/footer_logo/nudt.png',:style => "width:90px;height:30px;",:alt=>l(:label_co_organizer_NUDT)),"http://www.nudt.edu.cn/special.asp?classid=12", :target => "_blank"%>
  • - <%= link_to image_tag('/images/footer_logo/peking_eecs.png',:style => "width:90px;height:30px;",:alt=>l(:label_co_organizer_EECS)), "http://eecs.pku.edu.cn", :target => "_blank"%> + <%= link_to image_tag('/images/footer_logo/peking_eecs.png',:style => "width:90px;height:30px;",:alt=>l(:label_co_organizer_EECS)), "http://www.sei.pku.edu.cn/", :target => "_blank"%>
  • <%= link_to image_tag('/images/footer_logo/buaa_scse.png',:style => "width:90px;height:30px;",:alt=>l(:label_co_organizer_BHU)), "http://scse.buaa.edu.cn/", :target => "_blank"%> diff --git a/app/views/quality_analysis/_show.html.erb b/app/views/quality_analysis/_show.html.erb index 0ec0873ce..a21428f2f 100644 --- a/app/views/quality_analysis/_show.html.erb +++ b/app/views/quality_analysis/_show.html.erb @@ -133,7 +133,8 @@ @@ -149,7 +150,8 @@
  • <%= author_info[:changes] %>
  • -
  • <%= author_info[:issue_count] %>
  • +
  • <%= author_info[:all_issue_count] %>
  • +
  • <%= author_info[:unresolved_issue_count] %>
  • <%= author_info[:ratio] %>
  • diff --git a/db/schema.rb b/db/schema.rb index 1e20df076..34579a13a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160811084401) do +ActiveRecord::Schema.define(:version => 20160824073554) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -1283,6 +1283,7 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.boolean "mail_notification", :default => false, :null => false t.integer "course_id", :default => -1 t.integer "course_group_id", :default => 0 + t.integer "is_collect", :default => 1 end add_index "members", ["project_id"], :name => "index_members_on_project_id" diff --git a/public/images/footer_logo/CVICSE.png b/public/images/footer_logo/CVICSE.png index c252e0f93..6fa4566f7 100644 Binary files a/public/images/footer_logo/CVICSE.png and b/public/images/footer_logo/CVICSE.png differ diff --git a/public/images/footer_logo/ISCAS_logo.png b/public/images/footer_logo/ISCAS_logo.png index 7c2eb9ff7..f682f6ee0 100644 Binary files a/public/images/footer_logo/ISCAS_logo.png and b/public/images/footer_logo/ISCAS_logo.png differ diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index ce2423c34..454fce294 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -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: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-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-height {height:80px;} .contribute-list-line-height {line-height:80px;} @@ -554,4 +554,4 @@ a:hover.upload_btn_grey{background:#8a8a8a;} .icons_project_favorite {background: url(/images/syllabus/sy_icons_star.png) 0px 0px no-repeat; width:20px; height:20px; display:block; float:left;} .icons_project_star{background: url(/images/syllabus/sy_icons_star.png) 0px -27px no-repeat; width:20px; height:20px; display:block; float:left;} .new_projectlist_more{ text-align:center;} -.new_projectlist_more a:hover{ color:#3b94d6;} +.new_projectlist_more a:hover{ color:#3b94d6;}