foreman_docker 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/foreman_docker/autocomplete.css.scss +1 -1
- data/app/models/docker_container_wizard_states/configuration.rb +2 -0
- data/app/models/docker_container_wizard_states/environment.rb +3 -1
- data/app/models/docker_container_wizard_states/image.rb +2 -0
- data/app/models/environment_variable.rb +1 -0
- data/app/views/compute_resources/form/_docker.html.erb +1 -1
- data/app/views/containers/_list.html.erb +10 -7
- data/app/views/containers/index.html.erb +2 -2
- data/app/views/containers/steps/_image_hub_tab.html.erb +2 -2
- data/app/views/containers/steps/environment.html.erb +9 -21
- data/app/views/foreman_docker/common_parameters/_dns.erb +8 -16
- data/app/views/foreman_docker/common_parameters/_dns_entry.html.erb +12 -0
- data/app/views/foreman_docker/common_parameters/_environment_variable.html.erb +14 -18
- data/app/views/foreman_docker/common_parameters/_environment_variables.html.erb +10 -0
- data/app/views/foreman_docker/common_parameters/_exposed_port.html.erb +13 -0
- data/app/views/foreman_docker/common_parameters/_exposed_ports.erb +10 -17
- data/lib/foreman_docker/engine.rb +1 -1
- data/lib/foreman_docker/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12e42c771f843e87d2ee36bec11487a4c3336c90
|
4
|
+
data.tar.gz: a81664dbe8b7001f0a7fe7d90fe6ae4acbf5de58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1db2612e76589521267a1ba5ef5a01aaa8b9f865b1d3b5049ae5e13acdfc48f4dad97b5179f9d2d403202098123edb522bfcb71dd496ac665d6178736be0bd9
|
7
|
+
data.tar.gz: 07339351f2555cf31cf7f44d1c28fa14a200ed327da0e41d715228f30bf2fdddfdba7af37551252cb502ae0ad08e164a34ed864dc33c56277fa7ee4189ed3da1
|
@@ -4,7 +4,9 @@ module DockerContainerWizardStates
|
|
4
4
|
belongs_to :wizard_state, :class_name => DockerContainerWizardState
|
5
5
|
|
6
6
|
attr_accessible :tty, :docker_container_wizard_state_id,
|
7
|
-
:attach_stdin, :attach_stdout, :attach_stderr
|
7
|
+
:attach_stdin, :attach_stdout, :attach_stderr,
|
8
|
+
:exposed_ports_attributes, :environment_variables_attributes,
|
9
|
+
:dns_attributes
|
8
10
|
# Fix me:
|
9
11
|
# Validations are off on this association as there's a bug in ::Parameter
|
10
12
|
# that forces validation of reference_id. This will fail on new records as
|
@@ -2,4 +2,5 @@ class EnvironmentVariable < Parameter
|
|
2
2
|
belongs_to :container, :foreign_key => :reference_id, :inverse_of => :environment_variables
|
3
3
|
audited :except => [:priority], :associated_with => :container, :allow_mass_assignment => true
|
4
4
|
validates :name, :uniqueness => { :scope => :reference_id }
|
5
|
+
attr_accessible :priority
|
5
6
|
end
|
@@ -8,4 +8,4 @@
|
|
8
8
|
:class => "btn + #{authenticated ? "btn-success" : "btn-default"}",
|
9
9
|
:'data-url' => test_connection_compute_resources_path %>
|
10
10
|
|
11
|
-
<%=
|
11
|
+
<%= spinner('', :id => 'test_connection_indicator', :class => 'hide') %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<th class="hidden-tablet hidden-xs text-center"><%= _("Uptime") %></th>
|
9
9
|
<th class="hidden-tablet hidden-xs text-center"><%= _("Running on") %></th>
|
10
10
|
<th class="hidden-tablet hidden-xs text-center"><%= _("Managed") %></th>
|
11
|
-
<th
|
11
|
+
<th class="col-md-1 text-center"><%= _('Action') %></th>
|
12
12
|
</tr>
|
13
13
|
</thead>
|
14
14
|
|
@@ -26,12 +26,15 @@
|
|
26
26
|
<td class="hidden-tablet hidden-xs text-center"><%= link_to resource, compute_resource_path(resource) %> </td>
|
27
27
|
<td class="hidden-tablet hidden-xs text-center"><%= managed?(container, resource) ? _('Yes') : _('No') %></td>
|
28
28
|
<% @compute_resource = resource %>
|
29
|
-
<td
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
<td class="text-center">
|
30
|
+
<%= action_buttons(container_power_action(container),
|
31
|
+
display_delete_if_authorized(hash_for_container_path(
|
32
|
+
:compute_resource_id => resource,
|
33
|
+
:id => container.id).
|
34
|
+
merge(:auth_object => resource, :auth_action => 'destroy',
|
35
|
+
:authorizer => authorizer),
|
36
|
+
:confirm => _("Delete %s?") % container.name)) %>
|
37
|
+
</td>
|
35
38
|
</tr>
|
36
39
|
<% end %>
|
37
40
|
</tbody>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<% if i == 0 %>
|
11
11
|
<li class="active"><a href="#<%= "primary" %>" data-toggle="tab"><%= _("#{resource.name}") %></a></li>
|
12
12
|
<% else %>
|
13
|
-
<li><a href="#<%= resource.
|
13
|
+
<li><a href="#<%= resource.id %>" data-toggle="tab"><%= _("#{resource.name}") %></a></li>
|
14
14
|
<% end %>
|
15
15
|
<% end %>
|
16
16
|
</ul>
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<% if i == 0 %>
|
21
21
|
<div class="tab-pane active" id="primary">
|
22
22
|
<% else %>
|
23
|
-
<div class="tab-pane" id="<%= resource.
|
23
|
+
<div class="tab-pane" id="<%= resource.id %>">
|
24
24
|
<% end %>
|
25
25
|
<% if resource.test_connection %>
|
26
26
|
<%= render 'list', :containers => resource.vms,
|
@@ -43,11 +43,11 @@
|
|
43
43
|
<div data-search-spinner=true class='col-md-offset-3 hide'>
|
44
44
|
<span data-wait-text=true>
|
45
45
|
</span>
|
46
|
-
<%=
|
46
|
+
<%= spinner('', :id => "loading_repositories_indicator_#{registry}") %>
|
47
47
|
</div>
|
48
48
|
<div data-repository-search-results=true >
|
49
49
|
</div>
|
50
50
|
</div>
|
51
51
|
<%= render :partial => 'form_buttons', locals: { :registry => registry} %>
|
52
52
|
</div>
|
53
|
-
<% end -%>
|
53
|
+
<% end -%>
|
@@ -10,33 +10,21 @@
|
|
10
10
|
</div>
|
11
11
|
<div class='col-md-6 col-md-pull-6'>
|
12
12
|
<h3><%= _("Environment variables") %></h3>
|
13
|
-
<%=
|
14
|
-
<%= render 'foreman_docker/common_parameters/environment_variable', :f => builder %>
|
15
|
-
<% end %>
|
16
|
-
<%= link_to_add_fields(_("Add environment variable"), f, :environment_variables,
|
17
|
-
'foreman_docker/common_parameters/environment_variable') %>
|
18
|
-
|
13
|
+
<%= render 'foreman_docker/common_parameters/environment_variables', :f => f %>
|
19
14
|
<h3><%= _("Exposed Ports") %></h3>
|
20
|
-
<%=
|
21
|
-
<%= render 'foreman_docker/common_parameters/exposed_ports', :f => builder %>
|
22
|
-
<% end %>
|
23
|
-
<%= link_to_add_fields(_("Add Exposed Port"), f, :exposed_ports,
|
24
|
-
'foreman_docker/common_parameters/exposed_ports') %>
|
15
|
+
<%= render 'foreman_docker/common_parameters/exposed_ports', :f => f %>
|
25
16
|
<h3><%= _("DNS") %></h3>
|
26
|
-
<%=
|
27
|
-
<%= render 'foreman_docker/common_parameters/dns', :f => builder %>
|
28
|
-
<% end %>
|
29
|
-
<%= link_to_add_fields(_("Add DNS"), f, :dns,
|
30
|
-
'foreman_docker/common_parameters/dns') %>
|
17
|
+
<%= render 'foreman_docker/common_parameters/dns', :f => f %>
|
31
18
|
</div>
|
32
19
|
</div>
|
33
20
|
<div class="row">
|
34
21
|
<div class="form-group col-md-6">
|
35
|
-
<label class="col-md-2"><%= _('Run
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
22
|
+
<label class="col-md-2"><%= _('Run?') %>
|
23
|
+
<%= popover('', _('If selected, the container will start after it is created')) %>
|
24
|
+
</label>
|
25
|
+
<div class="col-md-4">
|
26
|
+
<%= check_box_tag(:start_on_create) %>
|
27
|
+
</div>
|
40
28
|
</div>
|
41
29
|
</div>
|
42
30
|
<%= render :partial => 'form_buttons' %>
|
@@ -1,16 +1,8 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
</span>
|
10
|
-
</td>
|
11
|
-
<span class="help-block">
|
12
|
-
<%= f.object.errors.full_messages.to_sentence %>
|
13
|
-
</span>
|
14
|
-
</tr>
|
15
|
-
</table>
|
16
|
-
</div>
|
1
|
+
<table class="table table-bordered table-hover table-striped" id="dns_table">
|
2
|
+
<tbody>
|
3
|
+
<%= f.fields_for :dns, @docker_container_wizard_states_environment.dns do |builder| %>
|
4
|
+
<%= render 'foreman_docker/common_parameters/dns_entry', :f => builder %>
|
5
|
+
<% end %>
|
6
|
+
</tbody>
|
7
|
+
</table>
|
8
|
+
<%= link_to_add_fields(_("Add DNS"), f, :dns, 'foreman_docker/common_parameters/dns_entry', :target => '#dns_table tbody') %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<tr class="fields form-group <%= 'has-error' if f.object.errors.any? %>">
|
2
|
+
<td><%= f.text_field(:name, :class => "form-control",
|
3
|
+
:placeholder => _("DNS e.g: 8.8.8.8")) %></td>
|
4
|
+
<td style='vertical-align: middle' class='text-center'>
|
5
|
+
<span class="help-block">
|
6
|
+
<%= link_to_remove_fields('', f) %>
|
7
|
+
</span>
|
8
|
+
</td>
|
9
|
+
<span class="help-block">
|
10
|
+
<%= f.object.errors.full_messages.to_sentence %>
|
11
|
+
</span>
|
12
|
+
</tr>
|
@@ -1,18 +1,14 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
</span>
|
16
|
-
</tr>
|
17
|
-
</table>
|
18
|
-
</div>
|
1
|
+
<tr class="fields form-group <%= 'error' if f.object.errors.any? %>">
|
2
|
+
<td><%= f.text_field(:name, :class => "form-control",
|
3
|
+
:placeholder => _("Name, e.g: PING_HOST")) %></td>
|
4
|
+
<td><%= f.text_field(:value, :class => "form-control",
|
5
|
+
:placeholder => _("Value, e.g: theforeman.org")) %></td>
|
6
|
+
<td style='vertical-align: middle' class='text-center'>
|
7
|
+
<span class="help-block">
|
8
|
+
<%= link_to_remove_fields('', f) %>
|
9
|
+
</span>
|
10
|
+
</td>
|
11
|
+
<span class="help-block">
|
12
|
+
<%= f.object.errors.full_messages.to_sentence %>
|
13
|
+
</span>
|
14
|
+
</tr>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<table class="table table-bordered table-hover table-striped" id="environment_variable_table">
|
2
|
+
<tbody>
|
3
|
+
<%= f.fields_for :environment_variables, @docker_container_wizard_states_environment.environment_variables do |builder| %>
|
4
|
+
<%= render 'foreman_docker/common_parameters/environment_variable', :f => builder %>
|
5
|
+
<% end %>
|
6
|
+
</tbody>
|
7
|
+
</table>
|
8
|
+
<%= link_to_add_fields(_("Add environment variable"), f, :environment_variables,
|
9
|
+
'foreman_docker/common_parameters/environment_variable',
|
10
|
+
:target => '#environment_variable_table tbody') %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<tr class="fields form-group <%= 'has-error' if f.object.errors.any? %>">
|
2
|
+
<td><%= f.text_field(:name, :class => "form-control",
|
3
|
+
:placeholder => _("Port Number e.g: 22")) %></td>
|
4
|
+
<td><%= f.select :value, [['TCP','tcp'],['UDP','udp']] %></td>
|
5
|
+
<td style='vertical-align: middle' class='text-center'>
|
6
|
+
<span class="help-block">
|
7
|
+
<%= link_to_remove_fields('', f) %>
|
8
|
+
</span>
|
9
|
+
</td>
|
10
|
+
<span class="help-block">
|
11
|
+
<%= f.object.errors.full_messages.to_sentence %>
|
12
|
+
</span>
|
13
|
+
</tr>
|
@@ -1,17 +1,10 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
</td>
|
12
|
-
<span class="help-block">
|
13
|
-
<%= f.object.errors.full_messages.to_sentence %>
|
14
|
-
</span>
|
15
|
-
</tr>
|
16
|
-
</table>
|
17
|
-
</div>
|
1
|
+
<table class="table table-bordered table-hover table-striped" id="exposed_ports_table">
|
2
|
+
<tbody>
|
3
|
+
<%= f.fields_for :exposed_ports, @docker_container_wizard_states_environment.exposed_ports do |builder| %>
|
4
|
+
<%= render 'foreman_docker/common_parameters/exposed_port', :f => builder %>
|
5
|
+
<% end %>
|
6
|
+
</tbody>
|
7
|
+
</table>
|
8
|
+
<%= link_to_add_fields(_("Add Exposed Port"), f, :exposed_ports,
|
9
|
+
'foreman_docker/common_parameters/exposed_port',
|
10
|
+
:target => '#exposed_ports_table tbody') %>
|
@@ -39,7 +39,7 @@ module ForemanDocker
|
|
39
39
|
Foreman::Gettext::Support.add_text_domain locale_domain, locale_dir
|
40
40
|
end
|
41
41
|
|
42
|
-
initializer 'foreman_docker.register_plugin', :
|
42
|
+
initializer 'foreman_docker.register_plugin', :before => :finisher_hook do
|
43
43
|
Foreman::Plugin.register :foreman_docker do
|
44
44
|
requires_foreman '>= 1.11'
|
45
45
|
compute_resource ForemanDocker::Docker
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_docker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Lobato, Amos Benari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docker-api
|
@@ -109,7 +109,10 @@ files:
|
|
109
109
|
- app/views/containers/steps/image.html.erb
|
110
110
|
- app/views/containers/steps/preliminary.html.erb
|
111
111
|
- app/views/foreman_docker/common_parameters/_dns.erb
|
112
|
+
- app/views/foreman_docker/common_parameters/_dns_entry.html.erb
|
112
113
|
- app/views/foreman_docker/common_parameters/_environment_variable.html.erb
|
114
|
+
- app/views/foreman_docker/common_parameters/_environment_variables.html.erb
|
115
|
+
- app/views/foreman_docker/common_parameters/_exposed_port.html.erb
|
113
116
|
- app/views/foreman_docker/common_parameters/_exposed_ports.erb
|
114
117
|
- app/views/image_search/_repository_search_results.html.erb
|
115
118
|
- app/views/images/form/_docker.html.erb
|