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/models/service/registry_api.rb
59 59
      get('/v2/'.freeze).is_a? Hash
60 60
    end
61 61

  
62
    def ok?
63
      get('/v1/').match("Docker Registry API")
64
    rescue
65
      get('/v2/').is_a? Hash
66
    end
67

  
62 68
    def self.docker_hub
63 69
      @@docker_hub ||= new(url: DOCKER_HUB)
64 70
    end

Also available in: Unified diff