Commit 2afb2d3c authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix broken Runners admin page

parent f230b42f
...@@ -17,6 +17,7 @@ module Ci ...@@ -17,6 +17,7 @@ module Ci
@projects = @projects.where(gitlab_id: @gl_projects.select(:id)) @projects = @projects.where(gitlab_id: @gl_projects.select(:id))
end end
@projects = @projects.where("ci_projects.id NOT IN (?)", @runner.projects.pluck(:id)) if @runner.projects.any? @projects = @projects.where("ci_projects.id NOT IN (?)", @runner.projects.pluck(:id)) if @runner.projects.any?
@projects = @projects.joins(:gl_project)
@projects = @projects.page(params[:page]).per(30) @projects = @projects.page(params[:page]).per(30)
end end
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
%th %th
- @runner.runner_projects.each do |runner_project| - @runner.runner_projects.each do |runner_project|
- project = runner_project.project - project = runner_project.project
- if project.gl_project
%tr.alert-info %tr.alert-info
%td %td
%strong %strong
...@@ -103,19 +104,24 @@ ...@@ -103,19 +104,24 @@
%th Finished at %th Finished at
- @builds.each do |build| - @builds.each do |build|
- gl_project = build.gl_project
%tr.build %tr.build
%td.id %td.id
- gl_project = build.project.gl_project - if gl_project
= link_to namespace_project_build_path(gl_project.namespace, gl_project, build) do = link_to namespace_project_build_path(gl_project.namespace, gl_project, build) do
= build.id = build.id
- else
= build.id
%td.status %td.status
= ci_status_with_icon(build.status) = ci_status_with_icon(build.status)
%td.status %td.status
= build.project.name - if gl_project
= gl_project.name_with_namespace
%td.build-link %td.build-link
- if gl_project
= link_to ci_status_path(build.commit) do = link_to ci_status_path(build.commit) do
%strong #{build.commit.short_sha} %strong #{build.commit.short_sha}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment