staypuft 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45b52d5a9c0aa95ff9d31fbef3c20b491d000a1b
4
- data.tar.gz: b901b85c5ab666ed79303e20ef127f76cf928607
3
+ metadata.gz: 3b0e05b324e38d1dc083bdd6ed82f0fcd0859991
4
+ data.tar.gz: 931bb580e72de0778a64de04601808ac5c2a1d01
5
5
  SHA512:
6
- metadata.gz: f63308f66381fc965dfe19a7718925494295d4e7f7a76ee1fbb4123f1cd12d1a993ce4854151cfa9c5004525e9c59ce8aae9eaaa3a4e4bb78680c6eba758f5ee
7
- data.tar.gz: 6eb41ec18540190e04906eb24c94c684b0273f53174b26244ee9ca40361cb2e36761eee3946a168d2ece55bb69d2eb97dc3023429739bb8944bbe8161e298d2f
6
+ metadata.gz: ee8c8ccff0fb497adce623790cbd4dc48e074b55670a73cade664c962c8010547095681b6c782dd14c123fc7deab89fcbc77b3dfb97d1e268f215e605ee0bf65
7
+ data.tar.gz: 0d259f68904d837a3377c3dbd022ff187678c8cae3b0aecd8dc2669f3f5f3666b348a2281b7661ab01ef2e7028fe053ff08f813e3ff614c5dabb632d311f7a98
@@ -17,6 +17,11 @@ module Staypuft
17
17
  self.facts_hash["processorcount"]
18
18
  end
19
19
 
20
+ # Returns model
21
+ def model_type
22
+ self.facts_hash["hardwaremodel"]
23
+ end
24
+
20
25
  # Returns array of NIC names
21
26
  def network_interfaces
22
27
  if self.facts_hash["interfaces"]
@@ -22,7 +22,6 @@ module Staypuft
22
22
  belongs_to :layout
23
23
 
24
24
  # needs to be defined before hostgroup association
25
- before_destroy :prepare_destroy
26
25
  belongs_to :hostgroup, :dependent => :destroy
27
26
 
28
27
  has_many :deployment_role_hostgroups, :dependent => :destroy
@@ -318,10 +317,5 @@ module Staypuft
318
317
  self.form_step = Deployment::STEP_COMPLETE if self.form_step.to_sym == Deployment::STEP_CONFIGURATION
319
318
  end
320
319
 
321
- def prepare_destroy
322
- hosts.each &:open_stack_unassign
323
- child_hostgroups.each &:destroy
324
- end
325
-
326
320
  end
327
321
  end
@@ -12,8 +12,15 @@ module Staypuft
12
12
  validates :role_id, :uniqueness => {:scope => :deployment_id}
13
13
  validates :hostgroup, :presence => true
14
14
  validates :hostgroup_id, :uniqueness => true
15
+ has_many :hosts, :through => :hostgroup
15
16
 
16
17
  validates :deploy_order, :presence => true
17
18
 
19
+ before_destroy :prepare_destroy
20
+
21
+ def prepare_destroy
22
+ hosts.each &:open_stack_unassign
23
+ end
24
+
18
25
  end
19
26
  end
@@ -14,6 +14,10 @@
14
14
  <%= tag :input, type: 'checkbox', class: 'check_all' %>
15
15
  </th>
16
16
  <th><%= sort :name, :as => _('Name') %></th>
17
+ <th><%= _("Deployment Role") %></th>
18
+ <th><%= _("CPUs") %><br/><span class="text-muted small"><%= _("(cores)") %></span></th>
19
+ <th><%= _("Memory") %><br/><span class="text-muted small"><%= _("(GB)") %></span></th>
20
+ <th><%= _("NICs") %></th>
17
21
  <th class="hidden-s hidden-xs"><%= sort :ip, :as => _('IP Address') %></th>
18
22
  </tr>
19
23
  </thead>
@@ -29,6 +33,12 @@
29
33
  <td class="ellipsis">
30
34
  <%= host_label(host) %>
31
35
  </td>
36
+ <td class="ellipsis">
37
+ <%= link_to(host.hostgroup.role, hosts_path(:search => "os_description = #{host.hostgroup.role}")) if host.hostgroup %>
38
+ </td>
39
+ <td><%= host.cpus %></td>
40
+ <td><%= host.mem %></td>
41
+ <td><%= host.network_interfaces.join('<br/>') if host.network_interfaces %></td>
32
42
  <td class="hidden-s hidden-xs"><%= host.ip %></td>
33
43
  </tr>
34
44
  <% end %>
@@ -1,9 +1,9 @@
1
1
  <div class="tab-pane" id="<%= child_hostgroup.name.parameterize.underscore %>_assigned_hosts">
2
2
  <% if child_hostgroup.hosts.present? %>
3
3
  <%= form_tag(unassign_host_deployment_path(id: deployment), class: 'form-horizontal well association') do |f| %>
4
- <%= submit_tag _("Unassign Hosts"), :class => "btn btn-primary btn-sm pull-left" %>
5
4
  <h4 class="pull-left"><%= _("Assigned Hosts") %></h4>
6
- <button type="button" class="close" aria-hidden="true">×</button>
5
+ <button type="button" class="close pull-right" aria-hidden="true">&nbsp;&nbsp;×</button>
6
+ <%= submit_tag _("Unassign Hosts"), :class => "btn btn-primary btn-sm pull-right" %>
7
7
  <p class="clearfix"></p>
8
8
  <%= hidden_field_tag :hostgroup_id, child_hostgroup.id %>
9
9
  <table class="table table-bordered table-striped table-condensed">
@@ -14,7 +14,10 @@
14
14
  <%= tag :input, type: 'checkbox', class: 'check_all' %>
15
15
  </th>
16
16
  <th><%= sort :name, :as => _('Name') %></th>
17
- <th class="hidden-s hidden-xs"><%= sort :ip, :as => _('IP Address') %></th>
17
+ <th><%= _("Operating System") %></th>
18
+ <th><%= _("Model") %></th>
19
+ <th><%= _("Deployment Role") %></th>
20
+ <th><%= _("Last Report") %></th>
18
21
  </tr>
19
22
  </thead>
20
23
  <tbody>
@@ -29,7 +32,14 @@
29
32
  <td class="ellipsis">
30
33
  <%= host_label(host) %>
31
34
  </td>
32
- <td class="hidden-s hidden-xs"><%= host.ip %></td>
35
+ <td class="ellipsis">
36
+ <%= link_to(host.os.to_label, hosts_path(:search => "os_description = #{host.os.description}")) if host.os %>
37
+ </td>
38
+ <td><%= host.model_type %></td>
39
+ <td class="ellipsis">
40
+ <%= link_to(host.hostgroup.role, hosts_path(:search => "os_description = #{host.hostgroup.role}")) if host.hostgroup %>
41
+ </td>
42
+ <td><%= host.last_report %></td>
33
43
  </tr>
34
44
  <% end %>
35
45
  </tbody>
@@ -15,6 +15,10 @@
15
15
  <%= tag :input, type: 'checkbox', class: 'check_all' %>
16
16
  </th>
17
17
  <th><%= sort :name, :as => _('Name') %></th>
18
+ <th><%= _("Operating System") %></th>
19
+ <th><%= _("CPUs") %><br/><span class="text-muted small"><%= _("(cores)") %></span></th>
20
+ <th><%= _("Memory") %><br/><span class="text-muted small"><%= _("(GB)") %></span></th>
21
+ <th><%= _("NICs") %></th>
18
22
  <th class="hidden-s hidden-xs"><%= sort :ip, :as => _('IP Address') %></th>
19
23
  </tr>
20
24
  </thead>
@@ -30,6 +34,12 @@
30
34
  <td class="ellipsis">
31
35
  <%= host_label(host) %>
32
36
  </td>
37
+ <td class="ellipsis">
38
+ <%= link_to(host.os.to_label, hosts_path(:search => "os_description = #{host.os.description}")) if host.os %>
39
+ </td>
40
+ <td><%= host.cpus %></td>
41
+ <td><%= host.mem %></td>
42
+ <td><%= host.network_interfaces.join('<br/>') if host.network_interfaces %></td>
33
43
  <td class="hidden-s hidden-xs"><%= host.ip %></td>
34
44
  </tr>
35
45
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module Staypuft
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: staypuft
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Staypuft team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-07 00:00:00.000000000 Z
11
+ date: 2014-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman-tasks