Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
1f1b3923
Commit
1f1b3923
authored
Oct 19, 2018
by
Shinya Maeda
Committed by
Kamil Trzciński
Oct 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename "scheduled" label/badge of delayed jobs to "delayed"
parent
041e0316
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
30 additions
and
25 deletions
+30
-25
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+1
-1
app/views/projects/ci/builds/_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+1
-1
changelogs/unreleased/rename-scheduled-label-badges.yml
changelogs/unreleased/rename-scheduled-label-badges.yml
+5
-0
lib/api/jobs.rb
lib/api/jobs.rb
+1
-1
lib/gitlab/ci/status/build/scheduled.rb
lib/gitlab/ci/status/build/scheduled.rb
+2
-2
lib/gitlab/ci/status/pipeline/delayed.rb
lib/gitlab/ci/status/pipeline/delayed.rb
+2
-2
lib/gitlab/ci/status/pipeline/factory.rb
lib/gitlab/ci/status/pipeline/factory.rb
+1
-1
lib/gitlab/ci/status/scheduled.rb
lib/gitlab/ci/status/scheduled.rb
+2
-2
locale/gitlab.pot
locale/gitlab.pot
+8
-8
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+1
-1
spec/lib/gitlab/ci/status/build/factory_spec.rb
spec/lib/gitlab/ci/status/build/factory_spec.rb
+1
-1
spec/lib/gitlab/ci/status/pipeline/delayed_spec.rb
spec/lib/gitlab/ci/status/pipeline/delayed_spec.rb
+2
-2
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
+1
-1
spec/lib/gitlab/ci/status/scheduled_spec.rb
spec/lib/gitlab/ci/status/scheduled_spec.rb
+2
-2
No files found.
app/helpers/ci_status_helper.rb
View file @
1f1b3923
...
@@ -42,7 +42,7 @@ module CiStatusHelper
...
@@ -42,7 +42,7 @@ module CiStatusHelper
when
'manual'
when
'manual'
s_
(
'CiStatusText|blocked'
)
s_
(
'CiStatusText|blocked'
)
when
'scheduled'
when
'scheduled'
s_
(
'CiStatusText|
schedul
ed'
)
s_
(
'CiStatusText|
delay
ed'
)
else
else
# All states are already being translated inside the detailed statuses:
# All states are already being translated inside the detailed statuses:
# :running => Gitlab::Ci::Status::Running
# :running => Gitlab::Ci::Status::Running
...
...
app/views/projects/ci/builds/_build.html.haml
View file @
1f1b3923
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
-
if
job
.
try
(
:allow_failure
)
-
if
job
.
try
(
:allow_failure
)
%span
.badge.badge-danger
allowed to fail
%span
.badge.badge-danger
allowed to fail
-
if
job
.
schedulable?
-
if
job
.
schedulable?
%span
.badge.badge-info
=
s_
(
'DelayedJobs|
schedul
ed'
)
%span
.badge.badge-info
=
s_
(
'DelayedJobs|
delay
ed'
)
-
elsif
job
.
action?
-
elsif
job
.
action?
%span
.badge.badge-info
manual
%span
.badge.badge-info
manual
...
...
changelogs/unreleased/rename-scheduled-label-badges.yml
0 → 100644
View file @
1f1b3923
---
title
:
Rename "scheduled" label/badge of delayed jobs to "delayed"
merge_request
:
22245
author
:
type
:
changed
lib/api/jobs.rb
View file @
1f1b3923
...
@@ -151,7 +151,7 @@ module API
...
@@ -151,7 +151,7 @@ module API
present
build
,
with:
Entities
::
Job
present
build
,
with:
Entities
::
Job
end
end
desc
'Trigger a actionable job (manual,
schedul
ed, etc)'
do
desc
'Trigger a actionable job (manual,
delay
ed, etc)'
do
success
Entities
::
Job
success
Entities
::
Job
detail
'This feature was added in GitLab 8.11'
detail
'This feature was added in GitLab 8.11'
end
end
...
...
lib/gitlab/ci/status/build/scheduled.rb
View file @
1f1b3923
...
@@ -7,7 +7,7 @@ module Gitlab
...
@@ -7,7 +7,7 @@ module Gitlab
{
{
image:
'illustrations/illustrations_scheduled-job_countdown.svg'
,
image:
'illustrations/illustrations_scheduled-job_countdown.svg'
,
size:
'svg-394'
,
size:
'svg-394'
,
title:
_
(
"This is a
schedul
ed to run in "
)
+
"
#{
execute_in
}
"
,
title:
_
(
"This is a
delay
ed to run in "
)
+
"
#{
execute_in
}
"
,
content:
_
(
"This job will automatically run after it's timer finishes. "
\
content:
_
(
"This job will automatically run after it's timer finishes. "
\
"Often they are used for incremental roll-out deploys "
\
"Often they are used for incremental roll-out deploys "
\
"to production environments. When unscheduled it converts "
\
"to production environments. When unscheduled it converts "
\
...
@@ -16,7 +16,7 @@ module Gitlab
...
@@ -16,7 +16,7 @@ module Gitlab
end
end
def
status_tooltip
def
status_tooltip
"
schedul
ed manual action (
#{
execute_in
}
)"
"
delay
ed manual action (
#{
execute_in
}
)"
end
end
def
self
.
matches?
(
build
,
user
)
def
self
.
matches?
(
build
,
user
)
...
...
lib/gitlab/ci/status/pipeline/
schedul
ed.rb
→
lib/gitlab/ci/status/pipeline/
delay
ed.rb
View file @
1f1b3923
...
@@ -2,9 +2,9 @@ module Gitlab
...
@@ -2,9 +2,9 @@ module Gitlab
module
Ci
module
Ci
module
Status
module
Status
module
Pipeline
module
Pipeline
class
Schedul
ed
<
Status
::
Extended
class
Delay
ed
<
Status
::
Extended
def
text
def
text
s_
(
'CiStatusText|
schedul
ed'
)
s_
(
'CiStatusText|
delay
ed'
)
end
end
def
label
def
label
...
...
lib/gitlab/ci/status/pipeline/factory.rb
View file @
1f1b3923
...
@@ -5,7 +5,7 @@ module Gitlab
...
@@ -5,7 +5,7 @@ module Gitlab
class
Factory
<
Status
::
Factory
class
Factory
<
Status
::
Factory
def
self
.
extended_statuses
def
self
.
extended_statuses
[[
Status
::
SuccessWarning
,
[[
Status
::
SuccessWarning
,
Status
::
Pipeline
::
Schedul
ed
,
Status
::
Pipeline
::
Delay
ed
,
Status
::
Pipeline
::
Blocked
]]
Status
::
Pipeline
::
Blocked
]]
end
end
...
...
lib/gitlab/ci/status/scheduled.rb
View file @
1f1b3923
...
@@ -3,11 +3,11 @@ module Gitlab
...
@@ -3,11 +3,11 @@ module Gitlab
module
Status
module
Status
class
Scheduled
<
Status
::
Core
class
Scheduled
<
Status
::
Core
def
text
def
text
s_
(
'CiStatusText|
schedul
ed'
)
s_
(
'CiStatusText|
delay
ed'
)
end
end
def
label
def
label
s_
(
'CiStatusLabel|
schedul
ed'
)
s_
(
'CiStatusLabel|
delay
ed'
)
end
end
def
icon
def
icon
...
...
locale/gitlab.pot
View file @
1f1b3923
...
@@ -1217,6 +1217,9 @@ msgstr ""
...
@@ -1217,6 +1217,9 @@ msgstr ""
msgid "CiStatusLabel|created"
msgid "CiStatusLabel|created"
msgstr ""
msgstr ""
msgid "CiStatusLabel|delayed"
msgstr ""
msgid "CiStatusLabel|failed"
msgid "CiStatusLabel|failed"
msgstr ""
msgstr ""
...
@@ -1232,9 +1235,6 @@ msgstr ""
...
@@ -1232,9 +1235,6 @@ msgstr ""
msgid "CiStatusLabel|pending"
msgid "CiStatusLabel|pending"
msgstr ""
msgstr ""
msgid "CiStatusLabel|scheduled"
msgstr ""
msgid "CiStatusLabel|skipped"
msgid "CiStatusLabel|skipped"
msgstr ""
msgstr ""
...
@@ -1253,6 +1253,9 @@ msgstr ""
...
@@ -1253,6 +1253,9 @@ msgstr ""
msgid "CiStatusText|created"
msgid "CiStatusText|created"
msgstr ""
msgstr ""
msgid "CiStatusText|delayed"
msgstr ""
msgid "CiStatusText|failed"
msgid "CiStatusText|failed"
msgstr ""
msgstr ""
...
@@ -1265,9 +1268,6 @@ msgstr ""
...
@@ -1265,9 +1268,6 @@ msgstr ""
msgid "CiStatusText|pending"
msgid "CiStatusText|pending"
msgstr ""
msgstr ""
msgid "CiStatusText|scheduled"
msgstr ""
msgid "CiStatusText|skipped"
msgid "CiStatusText|skipped"
msgstr ""
msgstr ""
...
@@ -2178,7 +2178,7 @@ msgstr ""
...
@@ -2178,7 +2178,7 @@ msgstr ""
msgid "DelayedJobs|Unschedule"
msgid "DelayedJobs|Unschedule"
msgstr ""
msgstr ""
msgid "DelayedJobs|
schedul
ed"
msgid "DelayedJobs|
delay
ed"
msgstr ""
msgstr ""
msgid "Delete"
msgid "Delete"
...
@@ -6113,7 +6113,7 @@ msgstr ""
...
@@ -6113,7 +6113,7 @@ msgstr ""
msgid "This is a confidential issue."
msgid "This is a confidential issue."
msgstr ""
msgstr ""
msgid "This is a
schedul
ed to run in "
msgid "This is a
delay
ed to run in "
msgstr ""
msgstr ""
msgid "This is the author's first Merge Request to this project."
msgid "This is the author's first Merge Request to this project."
...
...
spec/features/projects/jobs_spec.rb
View file @
1f1b3923
...
@@ -594,7 +594,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
...
@@ -594,7 +594,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
end
end
it
'shows delayed job'
,
:js
do
it
'shows delayed job'
,
:js
do
expect
(
page
).
to
have_content
(
'This is a
schedul
ed to run in'
)
expect
(
page
).
to
have_content
(
'This is a
delay
ed to run in'
)
expect
(
page
).
to
have_content
(
"This job will automatically run after it's timer finishes."
)
expect
(
page
).
to
have_content
(
"This job will automatically run after it's timer finishes."
)
expect
(
page
).
to
have_link
(
'Unschedule job'
)
expect
(
page
).
to
have_link
(
'Unschedule job'
)
end
end
...
...
spec/lib/gitlab/ci/status/build/factory_spec.rb
View file @
1f1b3923
...
@@ -339,7 +339,7 @@ describe Gitlab::Ci::Status::Build::Factory do
...
@@ -339,7 +339,7 @@ describe Gitlab::Ci::Status::Build::Factory do
end
end
it
'fabricates status with correct details'
do
it
'fabricates status with correct details'
do
expect
(
status
.
text
).
to
eq
'
schedul
ed'
expect
(
status
.
text
).
to
eq
'
delay
ed'
expect
(
status
.
group
).
to
eq
'scheduled'
expect
(
status
.
group
).
to
eq
'scheduled'
expect
(
status
.
icon
).
to
eq
'status_scheduled'
expect
(
status
.
icon
).
to
eq
'status_scheduled'
expect
(
status
.
favicon
).
to
eq
'favicon_status_scheduled'
expect
(
status
.
favicon
).
to
eq
'favicon_status_scheduled'
...
...
spec/lib/gitlab/ci/status/pipeline/
schedul
ed_spec.rb
→
spec/lib/gitlab/ci/status/pipeline/
delay
ed_spec.rb
View file @
1f1b3923
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Pipeline
::
Schedul
ed
do
describe
Gitlab
::
Ci
::
Status
::
Pipeline
::
Delay
ed
do
let
(
:pipeline
)
{
double
(
'pipeline'
)
}
let
(
:pipeline
)
{
double
(
'pipeline'
)
}
subject
do
subject
do
...
@@ -9,7 +9,7 @@ describe Gitlab::Ci::Status::Pipeline::Scheduled do
...
@@ -9,7 +9,7 @@ describe Gitlab::Ci::Status::Pipeline::Scheduled do
describe
'#text'
do
describe
'#text'
do
it
'overrides status text'
do
it
'overrides status text'
do
expect
(
subject
.
text
).
to
eq
'
schedul
ed'
expect
(
subject
.
text
).
to
eq
'
delay
ed'
end
end
end
end
...
...
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
View file @
1f1b3923
...
@@ -71,7 +71,7 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
...
@@ -71,7 +71,7 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
it
'matches a correct extended statuses'
do
it
'matches a correct extended statuses'
do
expect
(
factory
.
extended_statuses
)
expect
(
factory
.
extended_statuses
)
.
to
eq
[
Gitlab
::
Ci
::
Status
::
Pipeline
::
Schedul
ed
]
.
to
eq
[
Gitlab
::
Ci
::
Status
::
Pipeline
::
Delay
ed
]
end
end
it
'extends core status with common pipeline methods'
do
it
'extends core status with common pipeline methods'
do
...
...
spec/lib/gitlab/ci/status/scheduled_spec.rb
View file @
1f1b3923
...
@@ -6,11 +6,11 @@ describe Gitlab::Ci::Status::Scheduled do
...
@@ -6,11 +6,11 @@ describe Gitlab::Ci::Status::Scheduled do
end
end
describe
'#text'
do
describe
'#text'
do
it
{
expect
(
subject
.
text
).
to
eq
'
schedul
ed'
}
it
{
expect
(
subject
.
text
).
to
eq
'
delay
ed'
}
end
end
describe
'#label'
do
describe
'#label'
do
it
{
expect
(
subject
.
label
).
to
eq
'
schedul
ed'
}
it
{
expect
(
subject
.
label
).
to
eq
'
delay
ed'
}
end
end
describe
'#icon'
do
describe
'#icon'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment