This commit is contained in:
Your Name 2016-06-24 17:39:10 +08:00
parent eae70f9c71
commit 244c178758
4 changed files with 43 additions and 5 deletions

View File

@ -157,7 +157,7 @@ class Project < ActiveRecord::Base
# 创建project之后默认创建一个board之后的board去掉了board的概念
after_create :create_board_sync,:acts_as_forge_activities
before_destroy :delete_all_members,:delete_project_ealasticsearch_index
after_update :update_project_ealasticsearch_index
# after_update :update_project_ealasticsearch_index
def remove_references_before_destroy
return if self.id.nil?
Watcher.delete_all ['watchable_id = ?', id]

View File

@ -1,3 +1,3 @@
class QualityAnalysis < ActiveRecord::Base
attr_accessible :author_login, :project_id, :rep_identifier, :sonar_version, :branch, :path, :rep_identifier
attr_accessible :author_login, :project_id, :rep_identifier, :sonar_version, :branch, :path, :rep_identifier, :language
end

View File

@ -3,12 +3,50 @@
</div>
<% if @quality_analyses.count >0 %>
<% @quality_analyses.each do |qa| %>
<div style="min-height: 687px;" id="RSide" class="fl">
<div class="project_r_h">
<h2 class="project_h2">分析结果</h2>
</div>
<ul class="analysis-result-list">
<li class="analysis-result-name fl fontBlue2" title="Name"></li>
<li class="analysis-result-version fl fontBlue2" title="Version">VERSION</li>
<li class="analysis-result-loc fl fontBlue2" title="Non Commenting Lines of Code">LOC</li>
<li class="analysis-result-debt fl fontBlue2" title="Total effort (in days) to fix all the issues on the component and therefore to comply to all the requirements.">TECHNICAL DEBT</li>
<li class="analysis-result-time fl fontBlue2" title="Last Analysis">LAST ANALYSIS</li>
<div class="cl"></div>
</ul>
<ul class="analysis-result-list b_grey">
<li class="analysis-result-name fl fontBlue2 hidden" title="Name"><span class="analysis-name-icon mr5"></span><a href="/dashboard/index/139" title="shitou:sonar_rep" class="fontBlue2">shitou:sonar_rep</a></li>
<li class="analysis-result-version fl fontGrey3" title="Version">1</li>
<li class="analysis-result-loc fl fontGrey3" title="Non Commenting Lines of Code">1,814</li>
<li class="analysis-result-debt fl fontGrey3" title="Total effort (in days) to fix all the issues on the component and therefore to comply to all the requirements.">3d 2h</li>
<li class="analysis-result-time fl fontGrey3" title="Last Analysis">2016-06-22</li>
<div class="cl"></div>
</ul>
<ul class="analysis-result-list">
<li class="analysis-result-name fl fontBlue2 hidden" title="Name"><span class="analysis-name-icon mr5"></span><a href="/dashboard/index/139" title="shitou:sonar_rep" class="fontBlue2">shitou:sonar_rep</a></li>
<li class="analysis-result-version fl fontGrey3" title="Version">1</li>
<li class="analysis-result-loc fl fontGrey3" title="Non Commenting Lines of Code">1,814</li>
<li class="analysis-result-debt fl fontGrey3" title="Total effort (in days) to fix all the issues on the component and therefore to comply to all the requirements.">3d 2h</li>
<li class="analysis-result-time fl fontGrey3" title="Last Analysis">2016-06-22</li>
<div class="cl"></div>
</ul>
<ul class="analysis-result-list b_grey">
<li class="analysis-result-name fl fontBlue2 hidden" title="Name"><span class="analysis-name-icon mr5"></span><a href="/dashboard/index/139" title="shitou:sonar_rep" class="fontBlue2">shitou:sonar_rep</a></li>
<li class="analysis-result-version fl fontGrey3" title="Version">1</li>
<li class="analysis-result-loc fl fontGrey3" title="Non Commenting Lines of Code">1,814</li>
<li class="analysis-result-debt fl fontGrey3" title="Total effort (in days) to fix all the issues on the component and therefore to comply to all the requirements.">3d 2h</li>
<li class="analysis-result-time fl fontGrey3" title="Last Analysis">2016-06-22</li>
<div class="cl"></div>
</ul>
</div>
<ul class="analysis-result-list">
<li title="Name"><%=link_to "#{qa.author_login}:#{qa.rep_identifier}", project_quality_analysis_path(:resource_id => qa.author_login+":"+qa.rep_identifier), :class => "analysis-result-name fl fontBlue2" %></li>
<li title="Name"><%=link_to "#{qa.author_login}:#{qa.rep_identifier}", project_quality_analysis_path(:resource_id => qa.author_login+":"+qa.rep_identifier, :branch => qa.branch.nil? ? "master" : qa.branch), :class => "analysis-result-name fl fontBlue2" %></li>
<li class="analysis-result-version fl fontBlue2" title="版本">1.0</li>
<li class="analysis-result-loc fl fontBlue2" title="分支名"><%= qa.branch %></li>
<li class="analysis-result-debt fl fontBlue2" title="语言"><%= qa.language %></li>
<li class="analysis-result-time fl fontBlue2" title="用户"><<%= qa.author_login %>/li>
<li class="analysis-result-time fl fontBlue2" title="用户"><%= qa.author_login %></li>
<div class="cl"></div>
</ul>
<% end %>

View File

@ -3,7 +3,7 @@
<div class="project_r_h">
<h2 class="project_h2" style="width:180px;">质量分析</h2>
</div>
<!--<a href="javascript:void(0);" class="blue_btn_cir fl mt5 c_white" style="background-color:#64bdd9;">branch:master</a>-->
<div class="button-rep">当前分支:<%= params[:branch] %></div>
<div class="cl"></div>
<div class="tac f20 fb mt35 mb30">项目代码质量分析报告</div>
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl">概要信息</span></div>