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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b3ac12c5dafea1291f34a213907a4ccf7393f88
4
- data.tar.gz: b90f1bece1343dab61b41b40d2f96e48aea61ccc
3
+ metadata.gz: 12e42c771f843e87d2ee36bec11487a4c3336c90
4
+ data.tar.gz: a81664dbe8b7001f0a7fe7d90fe6ae4acbf5de58
5
5
  SHA512:
6
- metadata.gz: 77e84e4899f3fff9d53e71d0c11b20fde50b824abfdd7691a5ffc44dd6c85f7798c808cf2675bfe434de5adc6a13438c4679e334a4742deb26bb9a4a402f3b38
7
- data.tar.gz: 98f5a41476938823d8a3fd24f8aea148dfb96de47b471d27cbca2dfd7c36c9f5b696c88bb0a67ef23fdb5ec1030d7454a5ebe0a9aec7be3a044009d0c15d807a
6
+ metadata.gz: a1db2612e76589521267a1ba5ef5a01aaa8b9f865b1d3b5049ae5e13acdfc48f4dad97b5179f9d2d403202098123edb522bfcb71dd496ac665d6178736be0bd9
7
+ data.tar.gz: 07339351f2555cf31cf7f44d1c28fa14a200ed327da0e41d715228f30bf2fdddfdba7af37551252cb502ae0ad08e164a34ed864dc33c56277fa7ee4189ed3da1
@@ -1,3 +1,3 @@
1
1
  .tags-autocomplete-loading {
2
- background: white url('/assets/spinner.gif') right center no-repeat;
2
+ background: white url('spinner.gif') right center no-repeat;
3
3
  }
@@ -5,5 +5,7 @@ module DockerContainerWizardStates
5
5
  :foreign_key => :docker_container_wizard_state_id
6
6
 
7
7
  validates :command, :presence => true
8
+
9
+ attr_accessible :name, :command, :entrypoint, :cpu_set, :cpu_shares, :memory, :wizard_state
8
10
  end
9
11
  end
@@ -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
@@ -7,5 +7,7 @@ module DockerContainerWizardStates
7
7
 
8
8
  validates :tag, :presence => true
9
9
  validates :repository_name, :presence => true
10
+
11
+ attr_accessible :repository_name, :tag, :wizard_state, :registry_id, :capsule_id, :katello
10
12
  end
11
13
  end
@@ -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
- <%= image_tag('/assets/spinner.gif', :id => 'test_connection_indicator', :class => 'hide') %>
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></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><%= action_buttons(container_power_action(container),
30
- display_delete_if_authorized(hash_for_container_path(:compute_resource_id => resource,
31
- :id => container.id).
32
- merge(:auth_object => resource, :auth_action => 'destroy',
33
- :authorizer => authorizer),
34
- :confirm => _("Delete %s?") % container.name)) %></td>
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.name %>" data-toggle="tab"><%= _("#{resource.name}") %></a></li>
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.name %>">
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
- <%= image_tag('/assets/spinner.gif', :id => "loading_repositories_indicator_#{registry}") %>
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
- <%= f.fields_for :environment_variables, @docker_container_wizard_states_environment.environment_variables do |builder| %>
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
- <%= f.fields_for :exposed_ports, @docker_container_wizard_states_environment.exposed_ports do |builder| %>
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
- <%= f.fields_for :dns, @docker_container_wizard_states_environment.dns do |builder| %>
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 ?') %></label>
36
- <div class="col-md-4">
37
- <%= check_box_tag(:start_on_create) %>
38
- <%= content_tag(:span, _('If selected, the container will start after it is created'), :class => "help-block").html_safe %>
39
- </div>
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
- <div class='fields'>
2
- <table class="table table-bordered table-hover table-striped">
3
- <tr class="form-group <%= 'has-error' if f.object.errors.any? %>">
4
- <td><%= f.text_field(:name, :class => "form-control",
5
- :placeholder => _("DNS e.g: 8.8.8.8")) %></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>
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
- <div class='fields'>
2
- <table class="table table-bordered table-hover table-striped">
3
- <tr class="form-group <%= 'error' if f.object.errors.any? %>">
4
- <td><%= f.text_field(:name, :class => "form-control",
5
- :placeholder => _("Name, e.g: PING_HOST")) %></td>
6
- <td><%= f.text_field(:value, :class => "form-control",
7
- :placeholder => _("Value, e.g: theforeman.org")) %></td>
8
- <td style='vertical-align: middle' class='text-center'>
9
- <span class="help-block">
10
- <%= link_to_remove_fields('', f) %>
11
- </span>
12
- </td>
13
- <span class="help-block">
14
- <%= f.object.errors.full_messages.to_sentence %>
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
- <div class='fields'>
2
- <table class="table table-bordered table-hover table-striped">
3
- <tr class="form-group <%= 'has-error' if f.object.errors.any? %>">
4
- <td><%= f.text_field(:name, :class => "form-control",
5
- :placeholder => _("Port Number e.g: 22")) %></td>
6
- <td><%= f.select :value, [['TCP','tcp'],['UDP','udp']] %></td>
7
- <td style='vertical-align: middle' class='text-center'>
8
- <span class="help-block">
9
- <%= link_to_remove_fields('', f) %>
10
- </span>
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', :after => :finisher_hook do
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
@@ -1,3 +1,3 @@
1
1
  module ForemanDocker
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
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.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: 2015-12-18 00:00:00.000000000 Z
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