summaryrefslogtreecommitdiff
path: root/app/presenters
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-04-06 21:32:56 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-04-06 21:32:56 +0800
commit057c0d7a5c062f3030bcc46614ef2442009002de (patch)
treee4e9f8b092500950e914955f8d257c3b443a77dd /app/presenters
parent98a4aca6b5ce503543b0e325212265a365e64d75 (diff)
downloadgitlab-ce-057c0d7a5c062f3030bcc46614ef2442009002de.tar.gz
Also track auto-cancelling in jobs, detail:
Not only tracking auto-cancelling in pipelines, we'll also track this in jobs because pipelines could be retried and the information would get lost when this happened. Also erase auto-cancelling relation for pipelines when they're retried.
Diffstat (limited to 'app/presenters')
-rw-r--r--app/presenters/ci/build_presenter.rb4
-rw-r--r--app/presenters/ci/pipeline_presenter.rb4
2 files changed, 5 insertions, 3 deletions
diff --git a/app/presenters/ci/build_presenter.rb b/app/presenters/ci/build_presenter.rb
index d9970396cc6..c495c3f39bb 100644
--- a/app/presenters/ci/build_presenter.rb
+++ b/app/presenters/ci/build_presenter.rb
@@ -13,8 +13,8 @@ module Ci
end
def status_title
- if canceled? && pipeline.auto_canceled?
- "Job is redundant and is auto-canceled by Pipeline ##{pipeline.auto_canceled_by_id}"
+ if auto_canceled?
+ "Job is redundant and is auto-canceled by Pipeline ##{auto_canceled_by_id}"
end
end
end
diff --git a/app/presenters/ci/pipeline_presenter.rb b/app/presenters/ci/pipeline_presenter.rb
index b8e74bf5509..a542bdd8295 100644
--- a/app/presenters/ci/pipeline_presenter.rb
+++ b/app/presenters/ci/pipeline_presenter.rb
@@ -3,7 +3,9 @@ module Ci
presents :pipeline
def status_title
- "Pipeline is redundant and is auto-canceled by Pipeline ##{auto_canceled_by_id}" if auto_canceled?
+ if auto_canceled?
+ "Pipeline is redundant and is auto-canceled by Pipeline ##{auto_canceled_by_id}"
+ end
end
end
end