提交 160ffb68 编写于 作者: G Grzegorz Bizon

Fix empty state for build that doesn ot have a trace

It also adds a fallback that covers other edge cases that might surface
later.
上级 7e3bb679
......@@ -3,6 +3,13 @@ module Gitlab
module Status
module Build
module Common
def illustration
{
image: 'illustrations/skipped-job_empty.svg',
size: 'svg-430'
}
end
def has_details?
can?(user, :read_build, subject)
end
......
module Gitlab
module Ci
module Status
module Build
class Empty < Status::Extended
def illustration
{
image: 'illustrations/skipped-job_empty.svg',
size: 'svg-430',
title: _('This job does not have a trace.')
}
end
def self.matches?(build, user)
!build.has_trace?
end
end
end
end
end
end
......@@ -17,7 +17,8 @@ module Gitlab
Status::Build::Play,
Status::Build::Stop],
[Status::Build::Action],
[Status::Build::Retried]]
[Status::Build::Retried],
[Status::Build::Empty]]
end
def self.common_helpers
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册