Project

General

Profile

Revision 401c0065

Added by Ivan Necas over 3 years ago

Fixes #25988 - fix registries autocompletion (#215)

View differences:

app/controllers/registries_controller.rb
40 40
    end
41 41
  end
42 42

  
43
  protected
44

  
45
  def model_of_controller
46
    DockerRegistry
47
  end
48

  
43 49
  def find_registry
44 50
    @registry = DockerRegistry.find(params[:id])
45 51
  rescue ActiveRecord::RecordNotFound
app/views/registries/welcome.html.erb
1
<% content_for(:title, _("Registries")) %>
2
<div class="blank-slate-pf">
3
  <div class="blank-slate-pf-icon">
4
    <%= icon_text("gears", "", :kind => "fa") %>
5
  </div>
6
  <h1><%= _('Registries') %></h1>
7
  <p><%= _("No registries found in this context.") %>
8
  <%= _("This page shows registries available to the instance.") %></p>
9
  <p><%= link_to _('Learn more about this in the documentation.'), documentation_url("3.x/index.html", {:root_url => 'https://theforeman.org/plugins/foreman_docker/'})%></p>
10
  <div class="blank-slate-pf-main-action">
11
    <%= new_link(_("Create Registry"), {}, { :class => "btn-lg" }) %>
12
  </div>
13
</div>
14

  
config/routes.rb
18 18
    end
19 19
  end
20 20

  
21
  resources :registries, :except => [:show]
21
  resources :registries, :except => [:show] do
22
    collection do
23
      get 'auto_complete_search'
24
    end
25
  end
22 26

  
23 27
  scope path: '/docker', as: :foreman_docker do
24 28
    namespace :api, :defaults => { :format => 'json' } do

Also available in: Unified diff