Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
yuanke 2016-07-01 21:39:14 +08:00
commit 3159d16917
6 changed files with 9 additions and 7 deletions

View File

@ -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

View File

@ -2,7 +2,7 @@
<div class="project_r_h">
<h2 class="project_h2" style="width:180px;">质量分析</h2>
</div>
<p>
<%= h @console_build.to_json.html_safe %>
</p>
<div>
<%=h @console_build %>
</div>

View File

@ -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] %>
运行结果超时

View File

@ -2,7 +2,7 @@
<% if users_results.try(:size).to_i > 0 %>
<hr />
<% users_results.each do |user| %>
<p class="font_description2">
<p class="font_description2" style="padding: 10px 5px">
<strong><%= l(:label_tags_user_name) %><%= link_to ("#{user.name}"),
:controller => "users",:action => "show",:id => user.id%></strong>
<br />

View File

@ -16,7 +16,7 @@
<% content_for :content do %>
<div>
<h3><strong><%= l(:label_tags_search_result) %></strong></h3>
<div align="right">
<div class="mb5">
<%= l(:label_tags_numbers) %>
<%= l(:label_issue_plural) %>(<%= @issues_tags_num %>) |
<%= l(:label_project_plural) %>(<%= @projects_tags_num %>) |

View File

@ -1429,3 +1429,4 @@ a.pages-big{ width:50px;}
.W600{ width:600px;}
.syllabus_input {width: 290px; border: 1px solid #64bdd9; height: 30px;}
.syllabus_input option {max-width:260px;}