代码质量分析部分数据转换成整型
This commit is contained in:
parent
5c046f922e
commit
c50ca34b0e
|
@ -70,33 +70,33 @@
|
|||
<div><span class="fontGrey3 mr30 fl"> 质量问题</span>
|
||||
<span class="fontBlue2 w100 pInline">
|
||||
<a class="fontBlue2 w70 pInline" target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false">
|
||||
<%= @ha["violations"].nil? ? 0 : @ha["violations"] %>
|
||||
<%= @ha["violations"].to_i %>
|
||||
</a>
|
||||
</span><span class="fontGrey2"> 问题分类如下:</span></div>
|
||||
<div class="ml90 mt15">
|
||||
<div class="mb10"><span class="analysis-block-icon mr5"></span><span class="fontGrey3 mr45">阻断</span>
|
||||
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=BLOCKER" class="fontBlue2 w70 pInline">
|
||||
<%= @ha["blocker_violations"].nil? ? 0 : @ha["blocker_violations"] %>
|
||||
<%= @ha["blocker_violations"].to_i %>
|
||||
</a>
|
||||
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%=@ha["blocker_violations"].nil? ? 0 : statistics_result_percentage(@ha["blocker_violations"].to_i, 3000) %>%;"></span></span></div>
|
||||
<div class="mb10"><span class="analysis-serious-icon mr5"></span><span class="fontGrey3 mr45">严重</span>
|
||||
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=CRITICAL" class="fontBlue2 w70 pInline">
|
||||
<%= @ha["critical_violations"].nil? ? 0 : @ha["critical_violations"] %>
|
||||
<%= @ha["critical_violations"].to_i %>
|
||||
</a>
|
||||
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["critical_violations"].nil? ? 0 : statistics_result_percentage(@ha["critical_violations"].to_i, 3000) %>%;"></span></span></div>
|
||||
<div class="mb10"><span class="analysis-main-icon mr5"></span><span class="fontGrey3 mr45">主要</span>
|
||||
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=MAJOR" class="fontBlue2 w70 pInline">
|
||||
<%= @ha["major_violations"].nil? ? 0 : @ha["major_violations"] %>
|
||||
<%= @ha["major_violations"].to_i %>
|
||||
</a>
|
||||
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["major_violations"].nil? ? 0 : statistics_result_percentage(@ha["major_violations"].to_i, 3000) %>%;"></span></span></div>
|
||||
<div class="mb10"><span class="analysis-secondary-icon mr5"></span><span class="fontGrey3 mr45">次要</span>
|
||||
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=MINOR" class="fontBlue2 w70 pInline">
|
||||
<%= @ha["minor_violations"].nil? ? 0 : @ha["minor_violations"] %>
|
||||
<%= @ha["minor_violations"].to_i %>
|
||||
</a>
|
||||
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["minor_violations"].nil? ? 0 : statistics_result_percentage(@ha["minor_violations"].to_i, 3000) %>%;"></span></span></div>
|
||||
<div><span class="analysis-info-icon mr5"></span><span class="fontGrey3 mr45">信息</span>
|
||||
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=INFO" class="fontBlue2 w70 pInline">
|
||||
<%= @ha["info_violations"].nil? ? 0 : @ha["info_violations"] %>
|
||||
<%= @ha["info_violations"].to_i %>
|
||||
</a>
|
||||
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["info_violations"].nil? ? 0 : statistics_result_percentage(@ha["info_violations"].to_i, 3000) %>%;"></span></span></div>
|
||||
</div>
|
||||
|
@ -107,23 +107,23 @@
|
|||
<div class="analysis-block mt10 mb40 flex f14">
|
||||
<div class="analysis-genral">
|
||||
<p class="fontGrey3">代码行数</p>
|
||||
<p class="fontBlue2"><%= @ha["lines"].nil? ? 0 : @ha["lines"] %></p>
|
||||
<p class="fontBlue2"><%= @ha["lines"].to_i %></p>
|
||||
</div>
|
||||
<div class="analysis-genral">
|
||||
<p class="fontGrey3">文件</p>
|
||||
<p class="fontBlue2"><%= @ha["lines"].nil? ? 0 : @ha["lines"] %></p>
|
||||
<p class="fontBlue2"><%= @ha["files"].to_i %></p>
|
||||
</div>
|
||||
<div class="analysis-genral">
|
||||
<p class="fontGrey3">目录</p>
|
||||
<p class="fontBlue2"><%= @ha["directories"].nil? ? 0 : @ha["directories"] %></p>
|
||||
<p class="fontBlue2"><%= @ha["directories"].to_i %></p>
|
||||
</div>
|
||||
<div class="analysis-genral">
|
||||
<p class="fontGrey3">类</p>
|
||||
<p class="fontBlue2"><%= @ha["classes"].nil? ? 0 : @ha["classes"] %></p>
|
||||
<p class="fontBlue2"><%= @ha["classes"].to_i %></p>
|
||||
</div>
|
||||
<div class="analysis-genral">
|
||||
<p class="fontGrey3">方法</p>
|
||||
<p class="fontBlue2"><%=@ha["functions"].nil? ? 0 : @ha["functions"] %></p>
|
||||
<p class="fontBlue2"><%= @ha["functions"].to_i %></p>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl">贡献统计</span></div>-->
|
||||
|
|
Loading…
Reference in New Issue