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
Léo-Paul Géneau
gitlab-ce
Commits
d0349362
Commit
d0349362
authored
Mar 26, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend Gitlab::Ci::Status#illustration to include metadata
parent
d696194f
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
37 additions
and
14 deletions
+37
-14
lib/gitlab/ci/status/canceled.rb
lib/gitlab/ci/status/canceled.rb
+5
-1
lib/gitlab/ci/status/created.rb
lib/gitlab/ci/status/created.rb
+6
-1
lib/gitlab/ci/status/manual.rb
lib/gitlab/ci/status/manual.rb
+6
-1
lib/gitlab/ci/status/pending.rb
lib/gitlab/ci/status/pending.rb
+6
-1
lib/gitlab/ci/status/skipped.rb
lib/gitlab/ci/status/skipped.rb
+5
-1
spec/lib/gitlab/ci/status/build/factory_spec.rb
spec/lib/gitlab/ci/status/build/factory_spec.rb
+4
-4
spec/lib/gitlab/ci/status/canceled_spec.rb
spec/lib/gitlab/ci/status/canceled_spec.rb
+1
-1
spec/lib/gitlab/ci/status/created_spec.rb
spec/lib/gitlab/ci/status/created_spec.rb
+1
-1
spec/lib/gitlab/ci/status/manual_spec.rb
spec/lib/gitlab/ci/status/manual_spec.rb
+1
-1
spec/lib/gitlab/ci/status/pending_spec.rb
spec/lib/gitlab/ci/status/pending_spec.rb
+1
-1
spec/lib/gitlab/ci/status/skipped_spec.rb
spec/lib/gitlab/ci/status/skipped_spec.rb
+1
-1
No files found.
lib/gitlab/ci/status/canceled.rb
View file @
d0349362
...
@@ -19,7 +19,11 @@ module Gitlab
...
@@ -19,7 +19,11 @@ module Gitlab
end
end
def
illustration
def
illustration
'canceled-job_empty'
{
image:
'illustrations/canceled-job_empty.svg'
,
size:
'svg-430'
,
title:
_
(
'This job has been canceled'
)
}
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/created.rb
View file @
d0349362
...
@@ -19,7 +19,12 @@ module Gitlab
...
@@ -19,7 +19,12 @@ module Gitlab
end
end
def
illustration
def
illustration
'job_not_triggered'
{
image:
'illustrations/job_not_triggered.svg'
,
size:
'svg-306'
,
title:
_
(
'This job has not been triggered yet'
),
content:
_
(
'This job depends on upstream jobs that need to succeed in order for this job to be triggered'
)
}
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/manual.rb
View file @
d0349362
...
@@ -19,7 +19,12 @@ module Gitlab
...
@@ -19,7 +19,12 @@ module Gitlab
end
end
def
illustration
def
illustration
'manual_action'
{
image:
'illustrations/manual_action.svg'
,
size:
'svg-394'
,
title:
_
(
'This job requires a manual action'
),
content:
_
(
'This job depends on a user to trigger its process. Often they are used to deploy code to production environments'
)
}
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/pending.rb
View file @
d0349362
...
@@ -19,7 +19,12 @@ module Gitlab
...
@@ -19,7 +19,12 @@ module Gitlab
end
end
def
illustration
def
illustration
'pending_job_empty'
{
image:
'illustrations/pending_job_empty.svg'
,
size:
'svg-430'
,
title:
_
(
'This job has not started yet'
),
content:
_
(
'This job is in pending state and is waiting to be picked by a runner'
)
}
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/skipped.rb
View file @
d0349362
...
@@ -19,7 +19,11 @@ module Gitlab
...
@@ -19,7 +19,11 @@ module Gitlab
end
end
def
illustration
def
illustration
'skipped-job_empty'
{
image:
'illustrations/skipped-job_empty.svg'
,
size:
'svg-430'
,
title:
_
(
'This job has been skipped'
)
}
end
end
end
end
end
end
...
...
spec/lib/gitlab/ci/status/build/factory_spec.rb
View file @
d0349362
...
@@ -115,7 +115,7 @@ describe Gitlab::Ci::Status::Build::Factory do
...
@@ -115,7 +115,7 @@ describe Gitlab::Ci::Status::Build::Factory do
expect
(
status
.
text
).
to
eq
'canceled'
expect
(
status
.
text
).
to
eq
'canceled'
expect
(
status
.
icon
).
to
eq
'status_canceled'
expect
(
status
.
icon
).
to
eq
'status_canceled'
expect
(
status
.
favicon
).
to
eq
'favicon_status_canceled'
expect
(
status
.
favicon
).
to
eq
'favicon_status_canceled'
expect
(
status
.
illustration
).
to
eq
'canceled-job_empty'
expect
(
status
.
illustration
).
to
include
(
:image
,
:size
,
:title
)
expect
(
status
.
label
).
to
eq
'canceled'
expect
(
status
.
label
).
to
eq
'canceled'
expect
(
status
).
to
have_details
expect
(
status
).
to
have_details
expect
(
status
).
to
have_action
expect
(
status
).
to
have_action
...
@@ -168,7 +168,7 @@ describe Gitlab::Ci::Status::Build::Factory do
...
@@ -168,7 +168,7 @@ describe Gitlab::Ci::Status::Build::Factory do
expect
(
status
.
text
).
to
eq
'pending'
expect
(
status
.
text
).
to
eq
'pending'
expect
(
status
.
icon
).
to
eq
'status_pending'
expect
(
status
.
icon
).
to
eq
'status_pending'
expect
(
status
.
favicon
).
to
eq
'favicon_status_pending'
expect
(
status
.
favicon
).
to
eq
'favicon_status_pending'
expect
(
status
.
illustration
).
to
eq
'pending_job_empty'
expect
(
status
.
illustration
).
to
include
(
:image
,
:size
,
:title
,
:content
)
expect
(
status
.
label
).
to
eq
'pending'
expect
(
status
.
label
).
to
eq
'pending'
expect
(
status
).
to
have_details
expect
(
status
).
to
have_details
expect
(
status
).
to
have_action
expect
(
status
).
to
have_action
...
@@ -194,7 +194,7 @@ describe Gitlab::Ci::Status::Build::Factory do
...
@@ -194,7 +194,7 @@ describe Gitlab::Ci::Status::Build::Factory do
expect
(
status
.
text
).
to
eq
'skipped'
expect
(
status
.
text
).
to
eq
'skipped'
expect
(
status
.
icon
).
to
eq
'status_skipped'
expect
(
status
.
icon
).
to
eq
'status_skipped'
expect
(
status
.
favicon
).
to
eq
'favicon_status_skipped'
expect
(
status
.
favicon
).
to
eq
'favicon_status_skipped'
expect
(
status
.
illustration
).
to
eq
'skipped-job_empty'
expect
(
status
.
illustration
).
to
include
(
:image
,
:size
,
:title
)
expect
(
status
.
label
).
to
eq
'skipped'
expect
(
status
.
label
).
to
eq
'skipped'
expect
(
status
).
to
have_details
expect
(
status
).
to
have_details
expect
(
status
).
not_to
have_action
expect
(
status
).
not_to
have_action
...
@@ -224,7 +224,7 @@ describe Gitlab::Ci::Status::Build::Factory do
...
@@ -224,7 +224,7 @@ describe Gitlab::Ci::Status::Build::Factory do
expect
(
status
.
group
).
to
eq
'manual'
expect
(
status
.
group
).
to
eq
'manual'
expect
(
status
.
icon
).
to
eq
'status_manual'
expect
(
status
.
icon
).
to
eq
'status_manual'
expect
(
status
.
favicon
).
to
eq
'favicon_status_manual'
expect
(
status
.
favicon
).
to
eq
'favicon_status_manual'
expect
(
status
.
illustration
).
to
eq
'manual_action'
expect
(
status
.
illustration
).
to
include
(
:image
,
:size
,
:title
,
:content
)
expect
(
status
.
label
).
to
include
'manual play action'
expect
(
status
.
label
).
to
include
'manual play action'
expect
(
status
).
to
have_details
expect
(
status
).
to
have_details
expect
(
status
.
action_path
).
to
include
'play'
expect
(
status
.
action_path
).
to
include
'play'
...
...
spec/lib/gitlab/ci/status/canceled_spec.rb
View file @
d0349362
...
@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Canceled do
...
@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Canceled do
end
end
describe
'#illustration'
do
describe
'#illustration'
do
it
{
expect
(
subject
.
illustration
).
to
eq
'canceled-job_empty'
}
it
{
expect
(
subject
.
illustration
).
to
include
(
:image
,
:size
,
:title
)
}
end
end
describe
'#group'
do
describe
'#group'
do
...
...
spec/lib/gitlab/ci/status/created_spec.rb
View file @
d0349362
...
@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Created do
...
@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Created do
end
end
describe
'#illustration'
do
describe
'#illustration'
do
it
{
expect
(
subject
.
illustration
).
to
eq
'job_not_triggered'
}
it
{
expect
(
subject
.
illustration
).
to
include
(
:image
,
:size
,
:title
,
:content
)
}
end
end
describe
'#group'
do
describe
'#group'
do
...
...
spec/lib/gitlab/ci/status/manual_spec.rb
View file @
d0349362
...
@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Manual do
...
@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Manual do
end
end
describe
'#illustration'
do
describe
'#illustration'
do
it
{
expect
(
subject
.
illustration
).
to
eq
'manual_action'
}
it
{
expect
(
subject
.
illustration
).
to
include
(
:image
,
:size
,
:title
,
:content
)
}
end
end
describe
'#group'
do
describe
'#group'
do
...
...
spec/lib/gitlab/ci/status/pending_spec.rb
View file @
d0349362
...
@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Pending do
...
@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Pending do
end
end
describe
'#illustration'
do
describe
'#illustration'
do
it
{
expect
(
subject
.
illustration
).
to
eq
'pending_job_empty'
}
it
{
expect
(
subject
.
illustration
).
to
include
(
:image
,
:size
,
:title
,
:content
)
}
end
end
describe
'#group'
do
describe
'#group'
do
...
...
spec/lib/gitlab/ci/status/skipped_spec.rb
View file @
d0349362
...
@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Skipped do
...
@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Skipped do
end
end
describe
'#illustration'
do
describe
'#illustration'
do
it
{
expect
(
subject
.
illustration
).
to
eq
'skipped-job_empty'
}
it
{
expect
(
subject
.
illustration
).
to
include
(
:image
,
:size
,
:title
)
}
end
end
describe
'#group'
do
describe
'#group'
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