From 494b69c89baa0008facc6591f852206924e56a6b Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 22 Jun 2016 09:12:57 +0800 Subject: [PATCH] =?UTF-8?q?sonar=E6=95=B0=E6=8D=AE=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/quality_analysis_controller.rb | 4 ++-- app/views/quality_analysis/index.html.erb | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/quality_analysis_controller.rb b/app/controllers/quality_analysis_controller.rb index 21e094407..be3dee0dd 100644 --- a/app/controllers/quality_analysis_controller.rb +++ b/app/controllers/quality_analysis_controller.rb @@ -48,8 +48,8 @@ class QualityAnalysisController < ApplicationController def index data = open('http://123.59.135.93:8891/api/resources/index?resource=my:project985&depth=-1&metrics=complexity,class_complexity,lines,comment_lines,blocker_violations').read - cc=JSON.parse(data) - p cc + @cc =JSON.parse(data) + end # Find project of id params[:project_id] diff --git a/app/views/quality_analysis/index.html.erb b/app/views/quality_analysis/index.html.erb index e69de29bb..1f70644db 100644 --- a/app/views/quality_analysis/index.html.erb +++ b/app/views/quality_analysis/index.html.erb @@ -0,0 +1,3 @@ +<% @cc.each do |c| %> + <%= c %> +<% end %> \ No newline at end of file