diff --git a/app/controllers/quality_analysis_controller.rb b/app/controllers/quality_analysis_controller.rb index 852277126..a9b93269a 100644 --- a/app/controllers/quality_analysis_controller.rb +++ b/app/controllers/quality_analysis_controller.rb @@ -67,18 +67,18 @@ class QualityAnalysisController < ApplicationController puts e end # respond_to do |format| - # format.html{redirect_to project_quality_analysis_path(:project_id => @project.id, :resource_id => sonar_name, :branch => branch)} + # #format.html{redirect_to project_quality_analysis_path(:project_id => @project.id, :resource_id => sonar_name, :branch => branch)} # format.js # end end # get language type def swith_language_type language - if language = "c#" + if language == "c#" "cs" - elsif language = "python" + elsif language == "python" "py" - elsif language = "c" + elsif language == "c" "c++" else language diff --git a/app/views/quality_analysis/_hightchars.html.erb b/app/views/quality_analysis/_hightchars.html.erb index 278851ad5..9e6cdf5aa 100644 --- a/app/views/quality_analysis/_hightchars.html.erb +++ b/app/views/quality_analysis/_hightchars.html.erb @@ -94,7 +94,7 @@ }, series: [{ name: '代码质量', - data: [<%= @complexity["msr"][9]["val"] %>] + data: [<%= @complexity["msr"][9].nil? ? 0 : @complexity["msr"][9]["val"] %>] // tooltip: { // valueSuffix: ' km/h' // } diff --git a/app/views/quality_analysis/create.js.erb b/app/views/quality_analysis/create.js.erb deleted file mode 100644 index 8f93f86ee..000000000 --- a/app/views/quality_analysis/create.js.erb +++ /dev/null @@ -1 +0,0 @@ -alert("正在分析中…………(大概需要30分钟,请耐心等待)") \ No newline at end of file diff --git a/app/views/repositories/_quality_analysis.html.erb b/app/views/repositories/_quality_analysis.html.erb index b6eb62124..17af1b477 100644 --- a/app/views/repositories/_quality_analysis.html.erb +++ b/app/views/repositories/_quality_analysis.html.erb @@ -1,6 +1,6 @@