Commit 0969f198 authored by Matija Čupić's avatar Matija Čupić

Move illustration to build specific statuses

parent 6df1eb14
...@@ -14,6 +14,15 @@ module Gitlab ...@@ -14,6 +14,15 @@ module Gitlab
end end
end end
def illustration
{
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
def self.matches?(build, user) def self.matches?(build, user)
build.playable? build.playable?
end end
......
module Gitlab
module Ci
module Status
module Build
class Canceled < Status::Extended
def illustration
{
image: 'illustrations/canceled-job_empty.svg',
size: 'svg-430',
title: _('This job has been canceled')
}
end
def self.matches?(build, user)
build.canceled?
end
end
end
end
end
end
module Gitlab
module Ci
module Status
module Build
class Created < Status::Extended
def illustration
{
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
def self.matches?(build, user)
build.created?
end
end
end
end
end
end
...@@ -9,7 +9,12 @@ module Gitlab ...@@ -9,7 +9,12 @@ module Gitlab
[Status::Build::FailedAllowed, [Status::Build::FailedAllowed,
Status::Build::Play, Status::Build::Play,
Status::Build::Stop], Status::Build::Stop],
[Status::Build::Action]] [Status::Build::Action],
[Status::Build::Action,
Status::Build::Canceled,
Status::Build::Created,
Status::Build::Pending,
Status::Build::Skipped]]
end end
def self.common_helpers def self.common_helpers
......
module Gitlab
module Ci
module Status
module Build
class Pending < Status::Extended
def illustration
{
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
def self.matches?(build, user)
build.pending?
end
end
end
end
end
end
module Gitlab
module Ci
module Status
module Build
class Skipped < Status::Extended
def illustration
{
image: 'illustrations/skipped-job_empty.svg',
size: 'svg-430',
title: _('This job has been skipped')
}
end
def self.matches?(build, user)
build.skipped?
end
end
end
end
end
end
...@@ -17,14 +17,6 @@ module Gitlab ...@@ -17,14 +17,6 @@ module Gitlab
def favicon def favicon
'favicon_status_canceled' 'favicon_status_canceled'
end end
def illustration
{
image: 'illustrations/canceled-job_empty.svg',
size: 'svg-430',
title: _('This job has been canceled')
}
end
end end
end end
end end
......
...@@ -17,15 +17,6 @@ module Gitlab ...@@ -17,15 +17,6 @@ module Gitlab
def favicon def favicon
'favicon_status_created' 'favicon_status_created'
end end
def illustration
{
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 end
......
...@@ -17,15 +17,6 @@ module Gitlab ...@@ -17,15 +17,6 @@ module Gitlab
def favicon def favicon
'favicon_status_manual' 'favicon_status_manual'
end end
def illustration
{
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 end
......
...@@ -17,15 +17,6 @@ module Gitlab ...@@ -17,15 +17,6 @@ module Gitlab
def favicon def favicon
'favicon_status_pending' 'favicon_status_pending'
end end
def illustration
{
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 end
......
...@@ -17,14 +17,6 @@ module Gitlab ...@@ -17,14 +17,6 @@ module Gitlab
def favicon def favicon
'favicon_status_skipped' 'favicon_status_skipped'
end end
def illustration
{
image: 'illustrations/skipped-job_empty.svg',
size: 'svg-430',
title: _('This job has been skipped')
}
end
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment