staypuft 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/staypuft/concerns/host_details_helper.rb +5 -0
- data/app/models/staypuft/deployment.rb +0 -6
- data/app/models/staypuft/deployment_role_hostgroup.rb +7 -0
- data/app/views/staypuft/deployments/_assigned_hosts.html.erb +10 -0
- data/app/views/staypuft/deployments/_assigned_hosts_table.html.erb +2 -2
- data/app/views/staypuft/deployments/_deployed_hosts.html.erb +12 -2
- data/app/views/staypuft/deployments/_free_hosts.html.erb +10 -0
- data/lib/staypuft/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b0e05b324e38d1dc083bdd6ed82f0fcd0859991
|
4
|
+
data.tar.gz: 931bb580e72de0778a64de04601808ac5c2a1d01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee8c8ccff0fb497adce623790cbd4dc48e074b55670a73cade664c962c8010547095681b6c782dd14c123fc7deab89fcbc77b3dfb97d1e268f215e605ee0bf65
|
7
|
+
data.tar.gz: 0d259f68904d837a3377c3dbd022ff187678c8cae3b0aecd8dc2669f3f5f3666b348a2281b7661ab01ef2e7028fe053ff08f813e3ff614c5dabb632d311f7a98
|
@@ -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"
|
5
|
+
<button type="button" class="close pull-right" aria-hidden="true"> ×</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
|
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="
|
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 %>
|
data/lib/staypuft/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman-tasks
|