summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-05-08 06:52:50 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-05-08 06:52:50 +0000
commit3aa5317d93b14817c11631cde36cc111b3cb2e70 (patch)
tree4860edfb04e4ffcfa56de2f7fe30d593d7ea046c /app/views/projects
parent0eb74426b3eeacf92cd144e6ddc336adbe43ca1e (diff)
parent6776fac62200e6ec558dc6cc2cde120b82fce5da (diff)
downloadgitlab-ce-3aa5317d93b14817c11631cde36cc111b3cb2e70.tar.gz
Merge branch 'fix-failed-jobs-tab' into 'master'
Fix failed jobs tab See merge request gitlab-org/gitlab-ce!18520
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/pipelines/_with_tabs.html.haml11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml
index 218e7338c83..4dbf95be357 100644
--- a/app/views/projects/pipelines/_with_tabs.html.haml
+++ b/app/views/projects/pipelines/_with_tabs.html.haml
@@ -1,5 +1,3 @@
-- failed_builds = @pipeline.statuses.latest.failed
-
.tabs-holder
%ul.pipelines-tabs.nav-links.no-top.no-bottom.mobile-separator
%li.js-pipeline-tab-link
@@ -9,11 +7,11 @@
= link_to builds_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-builds', action: 'builds', toggle: 'tab' }, class: 'builds-tab' do
= _("Jobs")
%span.badge.js-builds-counter= pipeline.total_size
- - if failed_builds.present?
+ - if @pipeline.failed_builds.present?
%li.js-failures-tab-link
= link_to failures_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-failures', action: 'failures', toggle: 'tab' }, class: 'failures-tab' do
= _("Failed Jobs")
- %span.badge.js-failures-counter= failed_builds.count
+ %span.badge.js-failures-counter= @pipeline.failed_builds.count
.tab-content
#js-tab-pipeline.tab-pane
@@ -43,9 +41,10 @@
%th Coverage
%th
= render partial: "projects/stage/stage", collection: pipeline.legacy_stages, as: :stage
- - if failed_builds.present?
+
+ - if @pipeline.failed_builds.present?
#js-tab-failures.build-failures.tab-pane
- - failed_builds.each_with_index do |build, index|
+ - @pipeline.failed_builds.each_with_index do |build, index|
.build-state
%span.ci-status-icon-failed= custom_icon('icon_status_failed')
%span.stage