Project

General

Profile

Revision ad3852f2

Added by Ohad Levy over 8 years ago

fixes #8718 - refactor container index

- simplify controller to use the correct compute resource type in sql
- used icon helper methods
- fixed html syntax + removed duplicate pagination

View differences:

app/controllers/containers_controller.rb
8 8
                                          :search_repository]
9 9

  
10 10
  def index
11
    @container_resources = allowed_resources.select { |cr| cr.provider == 'Docker' }
11
    @container_resources = allowed_resources
12 12
    if @container_resources.empty?
13 13
      warning('You need a Compute Resource of type Docker to start managing containers')
14 14
      redirect_to new_compute_resource_path
......
139 139
  end
140 140

  
141 141
  def allowed_resources
142
    ComputeResource.authorized(:view_compute_resources)
142
    ForemanDocker::Docker.authorized(:view_compute_resources)
143 143
  end
144 144

  
145 145
  # To be replaced by find_resource after 1.6 support is deprecated

Also available in: Unified diff