debian-mirror-gitlab/lib/gitlab/ci/status/build/scheduled.rb

32 lines
947 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2018-12-05 23:21:45 +05:30
module Gitlab
module Ci
module Status
module Build
class Scheduled < Status::Extended
def illustration
{
image: 'illustrations/illustrations_scheduled-job_countdown.svg',
size: 'svg-394',
2018-12-13 13:39:08 +05:30
title: _("This is a delayed job to run in %{remainingTime}"),
2019-02-15 15:39:39 +05:30
content: _("This job will automatically run after its timer finishes. " \
2018-12-05 23:21:45 +05:30
"Often they are used for incremental roll-out deploys " \
"to production environments. When unscheduled it converts " \
"into a manual action.")
}
end
def status_tooltip
2018-12-13 13:39:08 +05:30
"delayed manual action (%{remainingTime})"
2018-12-05 23:21:45 +05:30
end
def self.matches?(build, user)
build.scheduled? && build.scheduled_at
end
end
end
end
end
end