Separate the manual empty state from the action empty state
This commit is contained in:
parent
c48f33c5be
commit
b57fcbe616
|
|
@ -14,17 +14,6 @@ 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'),
|
|
||||||
action_path: action_path,
|
|
||||||
action_method: action_method
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.matches?(build, user)
|
def self.matches?(build, user)
|
||||||
build.playable?
|
build.playable?
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ module Gitlab
|
||||||
Status::Build::Play,
|
Status::Build::Play,
|
||||||
Status::Build::Stop],
|
Status::Build::Stop],
|
||||||
[Status::Build::Action],
|
[Status::Build::Action],
|
||||||
[Status::Build::Action,
|
[Status::Build::Manual,
|
||||||
Status::Build::Canceled,
|
Status::Build::Canceled,
|
||||||
Status::Build::Created,
|
Status::Build::Created,
|
||||||
Status::Build::Pending,
|
Status::Build::Pending,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
module Gitlab
|
||||||
|
module Ci
|
||||||
|
module Status
|
||||||
|
module Build
|
||||||
|
class Manual < Status::Extended
|
||||||
|
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'),
|
||||||
|
action_path: play_project_job_path(subject.project, subject),
|
||||||
|
action_method: :post
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.matches?(build, user)
|
||||||
|
build.playable?
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Reference in New Issue