From 28c20c966ed4c70aebede52db2d8a416761da375 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 1 Jul 2016 19:28:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=98=BE=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/_show_users.html.erb | 2 +- app/views/tags/index.html.erb | 2 +- public/stylesheets/courses.css | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/tags/_show_users.html.erb b/app/views/tags/_show_users.html.erb index d8b172ba9..ab6570a2a 100644 --- a/app/views/tags/_show_users.html.erb +++ b/app/views/tags/_show_users.html.erb @@ -2,7 +2,7 @@ <% if users_results.try(:size).to_i > 0 %>
<% users_results.each do |user| %> -

+

<%= l(:label_tags_user_name) %><%= link_to ("#{user.name}"), :controller => "users",:action => "show",:id => user.id%>
diff --git a/app/views/tags/index.html.erb b/app/views/tags/index.html.erb index 947366eeb..038768a41 100644 --- a/app/views/tags/index.html.erb +++ b/app/views/tags/index.html.erb @@ -16,7 +16,7 @@ <% content_for :content do %>

<%= l(:label_tags_search_result) %>

-
+
<%= l(:label_tags_numbers) %>: <%= l(:label_issue_plural) %>(<%= @issues_tags_num %>) | <%= l(:label_project_plural) %>(<%= @projects_tags_num %>) | diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index d6026537e..1df2a2ece 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -1428,4 +1428,5 @@ a.pages-big{ width:50px;} .W300 {width:300px !important;} .W600{ width:600px;} -.syllabus_input {width: 290px; border: 1px solid #64bdd9; height: 30px;} +.syllabus_input {width: 290px; border: 1px solid #64bdd9; height: 30px;} +.syllabus_input option {max-width:260px;} From 6ac7d322b9715130e420935e215ddf5e8724ae97 Mon Sep 17 00:00:00 2001 From: txz Date: Fri, 1 Jul 2016 21:31:50 +0800 Subject: [PATCH 2/2] some added --- app/controllers/quality_analysis_controller.rb | 3 ++- app/views/quality_analysis/_console_output.html.erb | 6 +++--- app/views/quality_analysis/index.html.erb | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/controllers/quality_analysis_controller.rb b/app/controllers/quality_analysis_controller.rb index 2c55f780c..bec66aeff 100644 --- a/app/controllers/quality_analysis_controller.rb +++ b/app/controllers/quality_analysis_controller.rb @@ -165,6 +165,7 @@ class QualityAnalysisController < ApplicationController # resource_id: login + @repository.id def index begin + @branch = params[:branch] @resource_id = params[:resource_id] @sonar_address = Redmine::Configuration['sonar_address'] @jenkins_address = Redmine::Configuration['jenkins_address'] @@ -177,7 +178,7 @@ class QualityAnalysisController < ApplicationController else if params[:current_build_status] == "failure" job_name = params[:job_name] - @console_build = @client.job.get_console_output("#{job_name}", build_num = 0, start = 0, mode = 'text') + @console_build = @client.job.get_console_output("#{job_name}", build_num = 0, start = 0, mode = 'text')["output"] end 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 diff --git a/app/views/quality_analysis/_console_output.html.erb b/app/views/quality_analysis/_console_output.html.erb index 45115b9fe..372f7ec8d 100644 --- a/app/views/quality_analysis/_console_output.html.erb +++ b/app/views/quality_analysis/_console_output.html.erb @@ -2,7 +2,7 @@

质量分析

-

- <%= h @console_build.to_json.html_safe %> -

+
+ <%=h @console_build %> +
diff --git a/app/views/quality_analysis/index.html.erb b/app/views/quality_analysis/index.html.erb index 19b5c5eea..7925f6120 100644 --- a/app/views/quality_analysis/index.html.erb +++ b/app/views/quality_analysis/index.html.erb @@ -2,7 +2,7 @@ <%= render :partial => "result_list" %> <% else %> <% if params[:current_build_status].nil? || params[:current_build_status] == "success" %> - <%= render :partial => "show", :locals => {:branch => params[:branch]} %> + <%= render :partial => "show", :locals => {:branch => @branch} %> <% else %> <% if params[:build_console_result] %> 运行结果超时