diff --git a/app/controllers/quality_analysis_controller.rb b/app/controllers/quality_analysis_controller.rb index ac31ee198..152335dd8 100644 --- a/app/controllers/quality_analysis_controller.rb +++ b/app/controllers/quality_analysis_controller.rb @@ -61,10 +61,10 @@ class QualityAnalysisController < ApplicationController @results = JSON.parse(projects_date) else @name_flag = false - resource_id = params[:resource_id] - complexity_date = open(@sonar_address + "/api/resources/index?resource=#{resource_id}&depth=0&metrics=sqale_rating,function_complexity,duplicated_lines_density,comment_lines_density,sqale_index,lines,file_line,files,functions,classes,directories").read + @resource_id = params[:resource_id] + complexity_date = open(@sonar_address + "/api/resources/index?resource=#{@resource_id}&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 - issue_date = open(@sonar_address + "/api/resources/index?resource=#{resource_id}&depth=0&metrics=blocker_violations,critical_violations,major_violations,minor_violations,info_violations,violations").read + issue_date = open(@sonar_address + "/api/resources/index?resource=#{@resource_id}&depth=0&metrics=blocker_violations,critical_violations,major_violations,minor_violations,info_violations,violations").read @sonar_issues = JSON.parse(issue_date).first end end diff --git a/app/views/quality_analysis/_hightchars.html.erb b/app/views/quality_analysis/_hightchars.html.erb index 6e63bcecd..fb60eaed3 100644 --- a/app/views/quality_analysis/_hightchars.html.erb +++ b/app/views/quality_analysis/_hightchars.html.erb @@ -103,21 +103,21 @@ }, // Add some life function (chart) { - if (!chart.renderer.forExport) { - setInterval(function () { - var point = chart.series[0].points[0], - newVal, - inc = Math.round((Math.random() - 0.5) * 20); - - newVal = point.y + inc; - if (newVal < 0 || newVal > 200) { - newVal = point.y - inc; - } - - point.update(newVal); - - }, 3000); - } +// if (!chart.renderer.forExport) { +// setInterval(function () { +// var point = chart.series[0].points[0], +// newVal, +// inc = Math.round((Math.random() - 0.5) * 20); +// +// newVal = point.y + inc; +// if (newVal < 0 || newVal > 200) { +// newVal = point.y - inc; +// } +// +// point.update(newVal); +// +// }, 3000); +// } }); }); @@ -218,21 +218,21 @@ }, // Add some life function (chart) { - if (!chart.renderer.forExport) { - setInterval(function () { - var point = chart.series[0].points[0], - newVal, - inc = Math.round((Math.random() - 0.5) * 20); - - newVal = point.y + inc; - if (newVal < 0 || newVal > 200) { - newVal = point.y - inc; - } - - point.update(newVal); - - }, 3000); - } +// if (!chart.renderer.forExport) { +// setInterval(function () { +// var point = chart.series[0].points[0], +//// newVal, +//// inc = Math.round((Math.random() - 0.5) * 20); +// +//// newVal = point.y + inc; +//// if (newVal < 0 || newVal > 200) { +//// newVal = point.y - inc; +//// } +// +//// point.update(newVal); +// +// }, 3000); +// } }); }); @@ -338,21 +338,21 @@ }, // Add some life function (chart) { - if (!chart.renderer.forExport) { - setInterval(function () { - var point = chart.series[0].points[0], - newVal, - inc = Math.round((Math.random() - 0.5) * 20); - - newVal = point.y + inc; - if (newVal < 0 || newVal > 200) { - newVal = point.y - inc; - } - - point.update(newVal); - - }, 3000); - } +// if (!chart.renderer.forExport) { +// setInterval(function () { +// var point = chart.series[0].points[0], +// newVal, +// inc = Math.round((Math.random() - 0.5) * 20); +// +// newVal = point.y + inc; +// if (newVal < 0 || newVal > 200) { +// newVal = point.y - inc; +// } +// +// point.update(newVal); +// +// }, 3000); +// } }); }); @@ -463,21 +463,21 @@ }, // Add some life function (chart) { - if (!chart.renderer.forExport) { - setInterval(function () { - var point = chart.series[0].points[0], - newVal, - inc = Math.round((Math.random() - 0.5) * 20); - - newVal = point.y + inc; - if (newVal < 0 || newVal > 200) { - newVal = point.y - inc; - } - - point.update(newVal); - - }, 3000); - } +// if (!chart.renderer.forExport) { +// setInterval(function () { +// var point = chart.series[0].points[0], +// newVal, +// inc = Math.round((Math.random() - 0.5) * 20); +// +// newVal = point.y + inc; +// if (newVal < 0 || newVal > 200) { +// newVal = point.y - inc; +// } +// +// point.update(newVal); +// +// }, 3000); +// } }); }); \ 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 f44bb9325..b49cbb03f 100644 --- a/app/views/quality_analysis/_show.html.erb +++ b/app/views/quality_analysis/_show.html.erb @@ -1,7 +1,7 @@ <%= javascript_include_tag 'highcharts','highcharts-more' %> <%= render :partial => "hightchars" %>
<%= @complexity["msr"][4]["frmt_val"] %>