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
1
Merge Requests
1
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
nexedi
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
when
'manual'
s_
(
'CiStatusText|blocked'
)
when
'scheduled'
s_
(
'CiStatusText|
schedul
ed'
)
s_
(
'CiStatusText|
delay
ed'
)
else
# All states are already being translated inside the detailed statuses:
# :running => Gitlab::Ci::Status::Running
...
...
app/views/projects/ci/builds/_build.html.haml
View file @
1f1b3923
...
...
@@ -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|
schedul
ed'
)
%span
.badge.badge-info
=
s_
(
'DelayedJobs|
delay
ed'
)
-
elsif
job
.
action?
%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
present
build
,
with:
Entities
::
Job
end
desc
'Trigger a actionable job (manual,
schedul
ed, etc)'
do
desc
'Trigger a actionable job (manual,
delay
ed, etc)'
do
success
Entities
::
Job
detail
'This feature was added in GitLab 8.11'
end
...
...
lib/gitlab/ci/status/build/scheduled.rb
View file @
1f1b3923
...
...
@@ -7,7 +7,7 @@ module Gitlab
{
image:
'illustrations/illustrations_scheduled-job_countdown.svg'
,
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. "
\
"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
"
schedul
ed manual action (
#{
execute_in
}
)"
"
delay
ed manual action (
#{
execute_in
}
)"
end
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
module
Ci
module
Status
module
Pipeline
class
Schedul
ed
<
Status
::
Extended
class
Delay
ed
<
Status
::
Extended
def
text
s_
(
'CiStatusText|
schedul
ed'
)
s_
(
'CiStatusText|
delay
ed'
)
end
def
label
...
...
lib/gitlab/ci/status/pipeline/factory.rb
View file @
1f1b3923
...
...
@@ -5,7 +5,7 @@ module Gitlab
class
Factory
<
Status
::
Factory
def
self
.
extended_statuses
[[
Status
::
SuccessWarning
,
Status
::
Pipeline
::
Schedul
ed
,
Status
::
Pipeline
::
Delay
ed
,
Status
::
Pipeline
::
Blocked
]]
end
...
...
lib/gitlab/ci/status/scheduled.rb
View file @
1f1b3923
...
...
@@ -3,11 +3,11 @@ module Gitlab
module
Status
class
Scheduled
<
Status
::
Core
def
text
s_
(
'CiStatusText|
schedul
ed'
)
s_
(
'CiStatusText|
delay
ed'
)
end
def
label
s_
(
'CiStatusLabel|
schedul
ed'
)
s_
(
'CiStatusLabel|
delay
ed'
)
end
def
icon
...
...
locale/gitlab.pot
View file @
1f1b3923
...
...
@@ -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|
schedul
ed"
msgid "DelayedJobs|
delay
ed"
msgstr ""
msgid "Delete"
...
...
@@ -6113,7 +6113,7 @@ msgstr ""
msgid "This is a confidential issue."
msgstr ""
msgid "This is a
schedul
ed to run in "
msgid "This is a
delay
ed to run in "
msgstr ""
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
end
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_link
(
'Unschedule job'
)
end
...
...
spec/lib/gitlab/ci/status/build/factory_spec.rb
View file @
1f1b3923
...
...
@@ -339,7 +339,7 @@ describe Gitlab::Ci::Status::Build::Factory do
end
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
.
icon
).
to
eq
'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'
describe
Gitlab
::
Ci
::
Status
::
Pipeline
::
Schedul
ed
do
describe
Gitlab
::
Ci
::
Status
::
Pipeline
::
Delay
ed
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
'
schedul
ed'
expect
(
subject
.
text
).
to
eq
'
delay
ed'
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
it
'matches a correct extended statuses'
do
expect
(
factory
.
extended_statuses
)
.
to
eq
[
Gitlab
::
Ci
::
Status
::
Pipeline
::
Schedul
ed
]
.
to
eq
[
Gitlab
::
Ci
::
Status
::
Pipeline
::
Delay
ed
]
end
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
end
describe
'#text'
do
it
{
expect
(
subject
.
text
).
to
eq
'
schedul
ed'
}
it
{
expect
(
subject
.
text
).
to
eq
'
delay
ed'
}
end
describe
'#label'
do
it
{
expect
(
subject
.
label
).
to
eq
'
schedul
ed'
}
it
{
expect
(
subject
.
label
).
to
eq
'
delay
ed'
}
end
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