diff --git a/app/helpers/quality_analysis_helper.rb b/app/helpers/quality_analysis_helper.rb index 8356c476b..e13882f6f 100644 --- a/app/helpers/quality_analysis_helper.rb +++ b/app/helpers/quality_analysis_helper.rb @@ -18,7 +18,6 @@ module QualityAnalysisHelper arr << "很差" arr << "b_red" end - arr.first end def complexity_status val @@ -33,7 +32,6 @@ module QualityAnalysisHelper arr << "很高" arr << "b_red" end - arr.first end def duplicated_lines_density_status val @@ -48,7 +46,6 @@ module QualityAnalysisHelper arr << "很高" arr << "b_red" end - arr.first end def comment_lines_density_status val @@ -63,7 +60,6 @@ module QualityAnalysisHelper arr << "较高" arr << "b_red" end - arr.first end def score_sqale_rating val diff --git a/app/views/quality_analysis/_hightchars.html.erb b/app/views/quality_analysis/_hightchars.html.erb index 620e2d4fb..c4d884287 100644 --- a/app/views/quality_analysis/_hightchars.html.erb +++ b/app/views/quality_analysis/_hightchars.html.erb @@ -436,11 +436,11 @@ plotBands: [{ from: 0, to: 20, - color: '#55BF3B' // green + color: '#DDDF0D' // green }, { from: 21, to: 50, - color: '#DDDF0D' // red + color: '#55BF3B' // red }, { from: 51, to: 100, diff --git a/app/views/quality_analysis/_show.html.erb b/app/views/quality_analysis/_show.html.erb index 86ff6782b..f44bb9325 100644 --- a/app/views/quality_analysis/_show.html.erb +++ b/app/views/quality_analysis/_show.html.erb @@ -12,24 +12,24 @@

质量等级

-

<%= @complexity["msr"][9]["frmt_val"] %>} borderRadius"><%= sqale_rating_status(@complexity["msr"][9]["val"]) %>

+

<%= @complexity["msr"][9]["frmt_val"] %> borderRadius"><%= sqale_rating_status(@complexity["msr"][9]["val"])[0] %>

复杂度

-

<%= @complexity["msr"][6]["val"] %><%= complexity_status(@complexity["msr"][6]["val"]) %>

+

<%= @complexity["msr"][6]["val"] %> borderRadius"><%= complexity_status(@complexity["msr"][6]["val"])[0] %>

重复

-

<%= @complexity["msr"][7]["frmt_val"] %><%= duplicated_lines_density_status(@complexity["msr"][7]["val"]) %>

+

<%= @complexity["msr"][7]["frmt_val"] %> borderRadius"><%= duplicated_lines_density_status(@complexity["msr"][7]["val"])[0] %>

注释率

-

<%= @complexity["msr"][5]["frmt_val"] %><%=comment_lines_density_status(@complexity["msr"][5]["val"]) %>

+

<%= @complexity["msr"][5]["frmt_val"] %> borderRadius"><%=comment_lines_density_status(@complexity["msr"][5]["val"])[0] %>