Class: Gitlab::Ci::Status::Processable::WaitingForResource

Inherits:
Extended
  • Object
show all
Defined in:
lib/gitlab/ci/status/processable/waiting_for_resource.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Extended

#initialize

Constructor Details

This class inherits a constructor from Gitlab::Ci::Status::Extended

Class Method Details

.matches?(processable, _) ⇒ Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/gitlab/ci/status/processable/waiting_for_resource.rb', line 44

def self.matches?(processable, _)
  processable.waiting_for_resource?
end

Instance Method Details

#action_button_titleObject



32
33
34
# File 'lib/gitlab/ci/status/processable/waiting_for_resource.rb', line 32

def action_button_title
  _('View job currently using resource')
end

#action_iconObject



24
25
26
# File 'lib/gitlab/ci/status/processable/waiting_for_resource.rb', line 24

def action_icon
  nil
end

#action_methodObject



40
41
42
# File 'lib/gitlab/ci/status/processable/waiting_for_resource.rb', line 40

def action_method
  :get
end

#action_pathObject



36
37
38
# File 'lib/gitlab/ci/status/processable/waiting_for_resource.rb', line 36

def action_path
  project_job_path(subject.project, current_processable)
end

#action_titleObject



28
29
30
# File 'lib/gitlab/ci/status/processable/waiting_for_resource.rb', line 28

def action_title
  nil
end

#has_action?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/gitlab/ci/status/processable/waiting_for_resource.rb', line 20

def has_action?
  current_processable.present?
end

#illustrationObject

TODO: image is shared with ‘pending’ until we get a dedicated one



12
13
14
15
16
17
18
# File 'lib/gitlab/ci/status/processable/waiting_for_resource.rb', line 12

def illustration
  {
    image: 'illustrations/pending_job_empty.svg',
    size: 'svg-430',
    title: _('This job is waiting for resource: ') + subject.resource_group.key
  }
end