summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/status
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2018-10-26 10:29:45 +0200
committerWinnie Hellmann <winnie@gitlab.com>2018-11-07 10:00:25 +0100
commit390abbf054e82cfc51707ec3e2f68017d22ac75d (patch)
treebd1ba017a4e9ab4a0dd68786c37f8b32626073c1 /lib/gitlab/ci/status
parentd0c58a97c8a053c0beec7c13c1c6ec5042120ef1 (diff)
downloadgitlab-ce-390abbf054e82cfc51707ec3e2f68017d22ac75d.tar.gz
Add placeholder for remaining time in delayed job tooltips
Diffstat (limited to 'lib/gitlab/ci/status')
-rw-r--r--lib/gitlab/ci/status/build/scheduled.rb13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/gitlab/ci/status/build/scheduled.rb b/lib/gitlab/ci/status/build/scheduled.rb
index f443dbee120..b3452eae189 100644
--- a/lib/gitlab/ci/status/build/scheduled.rb
+++ b/lib/gitlab/ci/status/build/scheduled.rb
@@ -9,7 +9,7 @@ module Gitlab
{
image: 'illustrations/illustrations_scheduled-job_countdown.svg',
size: 'svg-394',
- title: _("This is a delayed to run in ") + " #{execute_in}",
+ title: _("This is a delayed job to run in %{remainingTime}"),
content: _("This job will automatically run after it's timer finishes. " \
"Often they are used for incremental roll-out deploys " \
"to production environments. When unscheduled it converts " \
@@ -18,21 +18,12 @@ module Gitlab
end
def status_tooltip
- "delayed manual action (#{execute_in})"
+ "delayed manual action (%{remainingTime})"
end
def self.matches?(build, user)
build.scheduled? && build.scheduled_at
end
-
- private
-
- include TimeHelper
-
- def execute_in
- remaining_seconds = [0, subject.scheduled_at - Time.now].max
- duration_in_numbers(remaining_seconds)
- end
end
end
end