summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-10-19 16:28:41 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-10-19 16:28:41 +0000
commit1f1b3923ecb263d512a0340cd5b44cc249f3f698 (patch)
treec2b024ac7ed800d32aed9264593c11965e52b4f5
parent041e03169f072fa8e403d705314c0e739ebac6f9 (diff)
downloadgitlab-ce-1f1b3923ecb263d512a0340cd5b44cc249f3f698.tar.gz
Rename "scheduled" label/badge of delayed jobs to "delayed"
-rw-r--r--app/helpers/ci_status_helper.rb2
-rw-r--r--app/views/projects/ci/builds/_build.html.haml2
-rw-r--r--changelogs/unreleased/rename-scheduled-label-badges.yml5
-rw-r--r--lib/api/jobs.rb2
-rw-r--r--lib/gitlab/ci/status/build/scheduled.rb4
-rw-r--r--lib/gitlab/ci/status/pipeline/delayed.rb (renamed from lib/gitlab/ci/status/pipeline/scheduled.rb)4
-rw-r--r--lib/gitlab/ci/status/pipeline/factory.rb2
-rw-r--r--lib/gitlab/ci/status/scheduled.rb4
-rw-r--r--locale/gitlab.pot16
-rw-r--r--spec/features/projects/jobs_spec.rb2
-rw-r--r--spec/lib/gitlab/ci/status/build/factory_spec.rb2
-rw-r--r--spec/lib/gitlab/ci/status/pipeline/delayed_spec.rb (renamed from spec/lib/gitlab/ci/status/pipeline/scheduled_spec.rb)4
-rw-r--r--spec/lib/gitlab/ci/status/pipeline/factory_spec.rb2
-rw-r--r--spec/lib/gitlab/ci/status/scheduled_spec.rb4
14 files changed, 30 insertions, 25 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb
index 6f9e2ef78cd..923a06a0512 100644
--- a/app/helpers/ci_status_helper.rb
+++ b/app/helpers/ci_status_helper.rb
@@ -42,7 +42,7 @@ module CiStatusHelper
when 'manual'
s_('CiStatusText|blocked')
when 'scheduled'
- s_('CiStatusText|scheduled')
+ s_('CiStatusText|delayed')
else
# All states are already being translated inside the detailed statuses:
# :running => Gitlab::Ci::Status::Running
diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml
index 95828626bd9..f975e37ee72 100644
--- a/app/views/projects/ci/builds/_build.html.haml
+++ b/app/views/projects/ci/builds/_build.html.haml
@@ -48,7 +48,7 @@
- if job.try(:allow_failure)
%span.badge.badge-danger allowed to fail
- if job.schedulable?
- %span.badge.badge-info= s_('DelayedJobs|scheduled')
+ %span.badge.badge-info= s_('DelayedJobs|delayed')
- elsif job.action?
%span.badge.badge-info manual
diff --git a/changelogs/unreleased/rename-scheduled-label-badges.yml b/changelogs/unreleased/rename-scheduled-label-badges.yml
new file mode 100644
index 00000000000..f9ee17a98a4
--- /dev/null
+++ b/changelogs/unreleased/rename-scheduled-label-badges.yml
@@ -0,0 +1,5 @@
+---
+title: Rename "scheduled" label/badge of delayed jobs to "delayed"
+merge_request: 22245
+author:
+type: changed
diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb
index fa992b9a440..697555c9605 100644
--- a/lib/api/jobs.rb
+++ b/lib/api/jobs.rb
@@ -151,7 +151,7 @@ module API
present build, with: Entities::Job
end
- desc 'Trigger a actionable job (manual, scheduled, etc)' do
+ desc 'Trigger a actionable job (manual, delayed, etc)' do
success Entities::Job
detail 'This feature was added in GitLab 8.11'
end
diff --git a/lib/gitlab/ci/status/build/scheduled.rb b/lib/gitlab/ci/status/build/scheduled.rb
index eebb3f761c5..6f460b62fa9 100644
--- a/lib/gitlab/ci/status/build/scheduled.rb
+++ b/lib/gitlab/ci/status/build/scheduled.rb
@@ -7,7 +7,7 @@ module Gitlab
{
image: 'illustrations/illustrations_scheduled-job_countdown.svg',
size: 'svg-394',
- title: _("This is a scheduled to run in ") + " #{execute_in}",
+ title: _("This is a delayed to run in ") + " #{execute_in}",
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 " \
@@ -16,7 +16,7 @@ module Gitlab
end
def status_tooltip
- "scheduled manual action (#{execute_in})"
+ "delayed manual action (#{execute_in})"
end
def self.matches?(build, user)
diff --git a/lib/gitlab/ci/status/pipeline/scheduled.rb b/lib/gitlab/ci/status/pipeline/delayed.rb
index 9ec6994bd2f..12736861c89 100644
--- a/lib/gitlab/ci/status/pipeline/scheduled.rb
+++ b/lib/gitlab/ci/status/pipeline/delayed.rb
@@ -2,9 +2,9 @@ module Gitlab
module Ci
module Status
module Pipeline
- class Scheduled < Status::Extended
+ class Delayed < Status::Extended
def text
- s_('CiStatusText|scheduled')
+ s_('CiStatusText|delayed')
end
def label
diff --git a/lib/gitlab/ci/status/pipeline/factory.rb b/lib/gitlab/ci/status/pipeline/factory.rb
index 00d8f01cbdc..0adf83fa197 100644
--- a/lib/gitlab/ci/status/pipeline/factory.rb
+++ b/lib/gitlab/ci/status/pipeline/factory.rb
@@ -5,7 +5,7 @@ module Gitlab
class Factory < Status::Factory
def self.extended_statuses
[[Status::SuccessWarning,
- Status::Pipeline::Scheduled,
+ Status::Pipeline::Delayed,
Status::Pipeline::Blocked]]
end
diff --git a/lib/gitlab/ci/status/scheduled.rb b/lib/gitlab/ci/status/scheduled.rb
index 542100e41da..3adcfa36af2 100644
--- a/lib/gitlab/ci/status/scheduled.rb
+++ b/lib/gitlab/ci/status/scheduled.rb
@@ -3,11 +3,11 @@ module Gitlab
module Status
class Scheduled < Status::Core
def text
- s_('CiStatusText|scheduled')
+ s_('CiStatusText|delayed')
end
def label
- s_('CiStatusLabel|scheduled')
+ s_('CiStatusLabel|delayed')
end
def icon
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 36f6dd5ef24..d73beaf93b6 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -1217,6 +1217,9 @@ msgstr ""
msgid "CiStatusLabel|created"
msgstr ""
+msgid "CiStatusLabel|delayed"
+msgstr ""
+
msgid "CiStatusLabel|failed"
msgstr ""
@@ -1232,9 +1235,6 @@ msgstr ""
msgid "CiStatusLabel|pending"
msgstr ""
-msgid "CiStatusLabel|scheduled"
-msgstr ""
-
msgid "CiStatusLabel|skipped"
msgstr ""
@@ -1253,6 +1253,9 @@ msgstr ""
msgid "CiStatusText|created"
msgstr ""
+msgid "CiStatusText|delayed"
+msgstr ""
+
msgid "CiStatusText|failed"
msgstr ""
@@ -1265,9 +1268,6 @@ msgstr ""
msgid "CiStatusText|pending"
msgstr ""
-msgid "CiStatusText|scheduled"
-msgstr ""
-
msgid "CiStatusText|skipped"
msgstr ""
@@ -2178,7 +2178,7 @@ msgstr ""
msgid "DelayedJobs|Unschedule"
msgstr ""
-msgid "DelayedJobs|scheduled"
+msgid "DelayedJobs|delayed"
msgstr ""
msgid "Delete"
@@ -6113,7 +6113,7 @@ msgstr ""
msgid "This is a confidential issue."
msgstr ""
-msgid "This is a scheduled to run in "
+msgid "This is a delayed to run in "
msgstr ""
msgid "This is the author's first Merge Request to this project."
diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb
index 7f5c3ff6ed8..b0631c9dec8 100644
--- a/spec/features/projects/jobs_spec.rb
+++ b/spec/features/projects/jobs_spec.rb
@@ -594,7 +594,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
end
it 'shows delayed job', :js do
- expect(page).to have_content('This is a scheduled to run in')
+ expect(page).to have_content('This is a delayed to run in')
expect(page).to have_content("This job will automatically run after it's timer finishes.")
expect(page).to have_link('Unschedule job')
end
diff --git a/spec/lib/gitlab/ci/status/build/factory_spec.rb b/spec/lib/gitlab/ci/status/build/factory_spec.rb
index aa53ecd5967..b379b08ad62 100644
--- a/spec/lib/gitlab/ci/status/build/factory_spec.rb
+++ b/spec/lib/gitlab/ci/status/build/factory_spec.rb
@@ -339,7 +339,7 @@ describe Gitlab::Ci::Status::Build::Factory do
end
it 'fabricates status with correct details' do
- expect(status.text).to eq 'scheduled'
+ expect(status.text).to eq 'delayed'
expect(status.group).to eq 'scheduled'
expect(status.icon).to eq 'status_scheduled'
expect(status.favicon).to eq 'favicon_status_scheduled'
diff --git a/spec/lib/gitlab/ci/status/pipeline/scheduled_spec.rb b/spec/lib/gitlab/ci/status/pipeline/delayed_spec.rb
index 29afa08b56b..f89712d2b03 100644
--- a/spec/lib/gitlab/ci/status/pipeline/scheduled_spec.rb
+++ b/spec/lib/gitlab/ci/status/pipeline/delayed_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Gitlab::Ci::Status::Pipeline::Scheduled do
+describe Gitlab::Ci::Status::Pipeline::Delayed do
let(:pipeline) { double('pipeline') }
subject do
@@ -9,7 +9,7 @@ describe Gitlab::Ci::Status::Pipeline::Scheduled do
describe '#text' do
it 'overrides status text' do
- expect(subject.text).to eq 'scheduled'
+ expect(subject.text).to eq 'delayed'
end
end
diff --git a/spec/lib/gitlab/ci/status/pipeline/factory_spec.rb b/spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
index d97fdc01109..466087a0e31 100644
--- a/spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
+++ b/spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
@@ -71,7 +71,7 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
it 'matches a correct extended statuses' do
expect(factory.extended_statuses)
- .to eq [Gitlab::Ci::Status::Pipeline::Scheduled]
+ .to eq [Gitlab::Ci::Status::Pipeline::Delayed]
end
it 'extends core status with common pipeline methods' do
diff --git a/spec/lib/gitlab/ci/status/scheduled_spec.rb b/spec/lib/gitlab/ci/status/scheduled_spec.rb
index c35a6f43d5d..b8ca3caa1f7 100644
--- a/spec/lib/gitlab/ci/status/scheduled_spec.rb
+++ b/spec/lib/gitlab/ci/status/scheduled_spec.rb
@@ -6,11 +6,11 @@ describe Gitlab::Ci::Status::Scheduled do
end
describe '#text' do
- it { expect(subject.text).to eq 'scheduled' }
+ it { expect(subject.text).to eq 'delayed' }
end
describe '#label' do
- it { expect(subject.label).to eq 'scheduled' }
+ it { expect(subject.label).to eq 'delayed' }
end
describe '#icon' do