Project

General

Profile

Revision f02a9ce2

Added by Sebastian Gräßl over 5 years ago

Fixes #18733 - Prevent fallback to Docker Hub on registry search

When searching for an external registry the search would show
results from Docker Hub due to it searching via the compute
resource.

By using a registry parameter to indicate which search tab is
active this gets prevented on the backend as well as on the
client by not searching when no registry is selected.

View differences:

app/helpers/container_steps_helper.rb
34 34
    active_tab.to_s == tab_name.to_s ? "active" : ""
35 35
  end
36 36

  
37
  # el7 returns -> "name" => "docker.io: docker.io/centos",
38
  # while f20 returns -> "name" => "centos"
39
  # we need repo name to be => "docker.io/centos" for el7 and "centos" for fedora
40
  # to ensure proper search with respect to the tags, image creation etc.
41
  def cleanup_image_name(name)
42
    name.split.last
43
  end
44

  
45

  
37 46
  def model_for(registry_type)
38 47
    if active_tab.to_s == registry_type.to_s
39 48
      @docker_container_wizard_states_image

Also available in: Unified diff