From c080cf6c9489226d9e469a1855c739c58911c83b Mon Sep 17 00:00:00 2001 From: huang Date: Sun, 10 Jun 2018 20:31:42 +0800 Subject: [PATCH] =?UTF-8?q?pull=20request=E6=B7=BB=E5=8A=A0jenkins?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E8=BF=87=E7=A8=8B=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/pull_requests/_pull_requests_list.html.erb | 3 +++ app/views/pull_requests/pr_console.html.erb | 5 +++++ config/routes.rb | 1 + 3 files changed, 9 insertions(+) create mode 100644 app/views/pull_requests/pr_console.html.erb diff --git a/app/views/pull_requests/_pull_requests_list.html.erb b/app/views/pull_requests/_pull_requests_list.html.erb index a8ad379b5..b64626a60 100644 --- a/app/views/pull_requests/_pull_requests_list.html.erb +++ b/app/views/pull_requests/_pull_requests_list.html.erb @@ -14,8 +14,11 @@

由 <%= link_to_user_login(request.author.try(:username), "linkBlue2") %> 创建于<%= time_tag(request.created_at) %>前

<%= time_tag(request.updated_at) %>前更新 + <%# 时间紧,待优化 %> <% qa = QualityAnalysis.where(:pull_request_id => request.id).first %> + <% if qa.present? %> +

<%= link_to "执行过程", pr_console_project_quality_analysis_path(:job_name => qa.sonar_name), :class => "linkBlue2 ml10 mr10", :target => "_blank" %>

质量检测结果

<% end %>
diff --git a/app/views/pull_requests/pr_console.html.erb b/app/views/pull_requests/pr_console.html.erb new file mode 100644 index 000000000..2843121f9 --- /dev/null +++ b/app/views/pull_requests/pr_console.html.erb @@ -0,0 +1,5 @@ +
+
+ <%= @output.html_safe %> +
+
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 37c1a9865..b657a0496 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1028,6 +1028,7 @@ RedmineApp::Application.routes.draw do resources :quality_analysis, :only => [:index, :create, :edit, :update, :delete] do collection do + get 'pr_console' end member do match 'update_jenkins_job'