modified days and hours for nil data

This commit is contained in:
huang 2016-07-08 13:53:54 +08:00
parent 406d636aac
commit fcf32474b6
1 changed files with 2 additions and 2 deletions

View File

@ -45,11 +45,11 @@
<div class="analysis-block mt10 mb40 f14">
<div><span class="fontGrey3 mr30">技术债务</span>
<span class="w70 pInline">
<% if @complexity["msr"][8].nil? %>
<% if @complexity["msr"][8].nil? || @complexity["msr"][8]["frmt_val"] == "0" %>
0
<% else %>
<%= /[0-9]*/.match(@complexity["msr"][8]["frmt_val"])[0] %>天
<%= / [0-9]*/.match(@complexity["msr"][8]["frmt_val"]) %>小时
<%= / [0-9]*/.match(@complexity["msr"][8]["frmt_val"]).nil? ? 0 : / [0-9]*/.match(@complexity["msr"][8]["frmt_val"]) %>小时
<% end %>
</span>
<span class="fontGrey2"><a class="linkBlue2" target="_blank" href="<%= @sonar_address %>/drilldown/measures/<%= @resource_id %>?metric=sqale_index">查看详情</a></span></div>