1
|
<%= javascript 'foreman_docker/image_step' %>
|
2
|
<%= stylesheet 'foreman_docker/autocomplete' %>
|
3
|
|
4
|
<%= render :layout => 'title', :locals => { :step => 2 } do %>
|
5
|
<ul class="nav nav-tabs" data-tabs="tabs">
|
6
|
<li class=<%= ("active" if @docker_container_wizard_states_image.registry_id.nil?) %>><a href="#hub" data-toggle="tab" id="hub_tab">
|
7
|
<span class="glyphicon glyphicon-cloud-download"></span>
|
8
|
<%= _("Docker hub") %>
|
9
|
</a></li>
|
10
|
<li class=<%= ("active" unless @docker_container_wizard_states_image.registry_id.nil?) %>><a href="#registry" data-toggle="tab" id="registry_tab">
|
11
|
<span class="glyphicon glyphicon-cloud-download"></span>
|
12
|
<%= _("External registry") %>
|
13
|
</a></li>
|
14
|
</ul>
|
15
|
|
16
|
<%= form_for @docker_container_wizard_states_image, :class => 'form-horizontal', :url => wizard_path, :method => :put do |f| %>
|
17
|
<div class="tab-content">
|
18
|
<% if @docker_container_wizard_states_image.registry_id.nil? %>
|
19
|
<div class="tab-pane active" id="hub">
|
20
|
</div>
|
21
|
<div class="tab-pane" id="registry">
|
22
|
<% else %>
|
23
|
<div class="tab-pane" id="hub">
|
24
|
</div>
|
25
|
<div class="tab-pane active" id="registry">
|
26
|
<% end %>
|
27
|
<div class="input-group col-md-6">
|
28
|
<%= select_registry f %>
|
29
|
</div>
|
30
|
</div>
|
31
|
<div>
|
32
|
<div class="form-group col-md-6">
|
33
|
<%= label_tag "image_id", _('Search'), :class=>"col-sm-2 control-label" %>
|
34
|
<div class="input-group">
|
35
|
|
36
|
<%= auto_complete_docker_search('docker_container_wizard_states_image[repository_name]', '',
|
37
|
:'data-url' => auto_complete_repository_name_image_search_path(@docker_container_wizard_states_image.compute_resource_id),
|
38
|
:value => f.object.repository_name.present? ? f.object.repository_name : '',
|
39
|
:id => :search,
|
40
|
:focus_on_load => true,
|
41
|
:placeholder => _('Find your favorite container, e.g: centos')) %>
|
42
|
<span class="input-group-addon glyphicon" id="search-addon"></span>
|
43
|
<span class="input-group-btn">
|
44
|
<%= button_tag(:class => 'btn btn-default',
|
45
|
:type => 'button',
|
46
|
:id => 'search_repository',
|
47
|
:'data-url' => search_repository_image_search_path(@docker_container_wizard_states_image.compute_resource_id),
|
48
|
:onclick => 'searchRepo(this)') do %>
|
49
|
<span class="glyphicon glyphicon-search"></span>
|
50
|
<% end %>
|
51
|
</span>
|
52
|
</div>
|
53
|
</div>
|
54
|
<%= text_f f, :tag,
|
55
|
:id => 'tag',
|
56
|
:'data-url' => auto_complete_image_tag_image_search_path(@docker_container_wizard_states_image.compute_resource_id) %>
|
57
|
<div class="col-md-12">
|
58
|
<div id='searching_spinner' class='col-md-offset-3 hide'>
|
59
|
<span id='waiting_text'>
|
60
|
</span>
|
61
|
<%= image_tag('/assets/spinner.gif', :id => 'loading_repositories_indicator') %>
|
62
|
</div>
|
63
|
<div id='repository_search_results'>
|
64
|
</div>
|
65
|
</div>
|
66
|
</div>
|
67
|
<%= render :partial => 'form_buttons' %>
|
68
|
</div>
|
69
|
<% end %>
|
70
|
<% end %>
|