diff --git a/app/controllers/quality_analysis_controller.rb b/app/controllers/quality_analysis_controller.rb index fd000aa72..58ae02add 100644 --- a/app/controllers/quality_analysis_controller.rb +++ b/app/controllers/quality_analysis_controller.rb @@ -60,7 +60,7 @@ class QualityAnalysisController < ApplicationController else @name_flag = false resource_id = params[:resource_id] - complexity_date = open("http://123.59.135.93:8891/api/resources/index?resource=139&depth=0&metrics=complexity,function_complexity,class_complexity,file_complexity,lines,file_line,files,functions,classes,directories").read + complexity_date = open("http://123.59.135.93:8891/api/resources/index?resource=139&depth=0&metrics=sqale_rating,function_complexity,duplicated_lines_density,comment_lines_density,sqale_index,lines,file_line,files,functions,classes,directories").read @complexity =JSON.parse(complexity_date).first end end diff --git a/app/views/quality_analysis/_hightchars.html.erb b/app/views/quality_analysis/_hightchars.html.erb new file mode 100644 index 000000000..5acb0e20f --- /dev/null +++ b/app/views/quality_analysis/_hightchars.html.erb @@ -0,0 +1,376 @@ + \ No newline at end of file diff --git a/app/views/quality_analysis/_show.html.erb b/app/views/quality_analysis/_show.html.erb index cf81680b0..674507c4c 100644 --- a/app/views/quality_analysis/_show.html.erb +++ b/app/views/quality_analysis/_show.html.erb @@ -1,132 +1,19 @@
lines: <%= @complexity["msr"][0]["frmt_val"] %>
+classes: <%= @complexity["msr"][1]["frmt_val"] %>
files: <%= @complexity["msr"][2]["frmt_val"] %>
directories: <%= @complexity["msr"][3]["frmt_val"] %>
-classes: <%= @complexity["msr"][1]["frmt_val"] %>
function: <%= @complexity["msr"][4]["frmt_val"] %>
-total Complexity: <%= @complexity["msr"][5]["frmt_val"] %>
-file_complexity: <%= @complexity["msr"][6]["frmt_val"] %>
-class_complexity: <%= @complexity["msr"][7]["frmt_val"] %>
-function_complexity: <%= @complexity["msr"][8]["frmt_val"] %>
+comment_lines_density: <%= @complexity["msr"][5]["frmt_val"] %>
+function_complexity: <%= @complexity["msr"][6]["frmt_val"] %>
+duplicated_lines_density: <%= @complexity["msr"][7]["frmt_val"] %>
+sqale_index: <%= @complexity["msr"][8]["frmt_val"] %>
+sqale_rating: <%= @complexity["msr"][9]["frmt_val"] %>
+ +<%dd %> + + <%= javascript_include_tag 'highcharts','highcharts-more' %> - - - - + <%= render :partial => "hightchars" %>质量等级
-A
+质量等级
+A
+复杂度
+44
+复杂度
-复杂度
-44
-重复
-44%
-注释率
-12%
+重复
+44%
+注释率
+12%
+