staypuft 0.2.4 → 0.2.5
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 +4 -4
- data/app/assets/javascripts/staypuft/staypuft.js +22 -0
- data/app/controllers/staypuft/deployments_controller.rb +0 -1
- data/app/models/staypuft/deployment/cinder_service.rb +1 -1
- data/app/views/staypuft/deployments/_assigned_hosts.html.erb +2 -2
- data/app/views/staypuft/deployments/_deployed_hosts.html.erb +7 -2
- data/app/views/staypuft/deployments/_free_hosts.html.erb +31 -2
- 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: 96268aa2d192eb421898423d6559a5d3344855a8
|
4
|
+
data.tar.gz: 045c68a430a1375198f3ea52a95c6dbd41ab90a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbb30bec65a2635dc2f347af6cb183331b540976ff79a0b79d8a742f82fd1a284d023a9a6ee643639245ce93ca8ffbe97aac1eeed0e75ff1acbfb6c18a9cd61c
|
7
|
+
data.tar.gz: 3d84e07780685aa36f75d48c5ed9e1f81d4b8465e057ea2678496c98c884add023d62c04bd2fb078f1c807bf94ce1b8c08a265845b060da6b378a42c332793c4
|
@@ -170,6 +170,12 @@ $(function () {
|
|
170
170
|
window.location.hash = "#overview";
|
171
171
|
});
|
172
172
|
|
173
|
+
$('#role_modal').on('shown.bs.modal', function(e) {
|
174
|
+
$('#sub-navigation a[href="#hosts"]').tab('show');
|
175
|
+
$('#hosts-navigation a[href="#free-hosts"]').tab('show');
|
176
|
+
window.location.hash = "#hosts";
|
177
|
+
});
|
178
|
+
|
173
179
|
var scrolled = false;
|
174
180
|
|
175
181
|
$(window).scroll(function(){
|
@@ -180,4 +186,20 @@ $(function () {
|
|
180
186
|
$(window).scrollTop( 0 );
|
181
187
|
}
|
182
188
|
|
189
|
+
var free_host_checkboxes = $('#free-hosts table input:checkbox');
|
190
|
+
free_host_checkboxes.click(function(){
|
191
|
+
$("#assign_hosts_modal").attr("disabled", !free_host_checkboxes.is(":checked"));
|
192
|
+
});
|
193
|
+
|
194
|
+
var assigned_host_checkboxes = $('#assigned-hosts table input:checkbox');
|
195
|
+
assigned_host_checkboxes.click(function(){
|
196
|
+
$("#unassign_hosts_button").attr("disabled", !assigned_host_checkboxes.is(":checked"));
|
197
|
+
});
|
198
|
+
|
199
|
+
var deployed_host_checkboxes = $('#deployed-hosts table input:checkbox');
|
200
|
+
deployed_host_checkboxes.click(function(){
|
201
|
+
$("#undeploy_hosts_modal").attr("disabled", !deployed_host_checkboxes.is(":checked"));
|
202
|
+
});
|
203
|
+
|
204
|
+
|
183
205
|
});
|
@@ -111,7 +111,6 @@ module Staypuft
|
|
111
111
|
|
112
112
|
def unassign_host
|
113
113
|
deployment = Deployment.find(params[:id])
|
114
|
-
hostgroup = ::Hostgroup.find params[:hostgroup_id]
|
115
114
|
deployment_in_progress = ForemanTasks::Lock.locked?(deployment, nil)
|
116
115
|
|
117
116
|
hosts_to_unassign = ::Host::Base.find Array(params[:host_ids])
|
@@ -107,7 +107,7 @@ module Staypuft
|
|
107
107
|
# ASCII, Unicode
|
108
108
|
validates :eqlx_pool,
|
109
109
|
:presence => true,
|
110
|
-
:format => /\A[[^\p{Z}\p{C}!"
|
110
|
+
:format => /\A[[^\p{Z}\p{C}!"\#$%&'\(\)\*\+,\/;<=>\?@\[\]\\\^\{\}|~\.\-:]][[^\p{Z}\p{C}!"\#$%&'\(\)\*\+,\/;<=>\?@\[\]\\\^\{\}|~]]+[[^\p{Z}\p{C}!"\#$%&'\(\)\*\+,\/;<=>\?@\[\]\\\^\{\}|~\.\-:]]\z/,
|
111
111
|
:length => { maximum: 63,
|
112
112
|
too_long: "Too long: max length is %{count} bytes. Using multibyte characters reduces the maximum number of characters allowed.",
|
113
113
|
tokenizer: lambda {|str| str.bytes.to_a } },
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<% if hosts.any? %>
|
2
2
|
<div class="" id="table_assigned_hosts">
|
3
|
-
<%= form_tag(
|
3
|
+
<%= form_tag(unassign_host_deployment_path(id: @deployment), class: 'form-horizontal association', method: 'post') do |f| %>
|
4
4
|
<div class="pull-right top_actions">
|
5
5
|
<%= submit_tag _("Configure Networks"), :class => "btn btn-default btn-sm", :style => "visibility: hidden" %>
|
6
|
-
<%= submit_tag _("Unassign Hosts"), :class => "btn btn-primary btn-sm", :
|
6
|
+
<%= submit_tag _("Unassign Hosts"), :class => "btn btn-primary btn-sm", :disabled => true, :id => "unassign_hosts_button" %>
|
7
7
|
</div>
|
8
8
|
<h4 class="pull-left"><%= _("Assigned Hosts") %></h4>
|
9
9
|
<p class="clearfix"></p>
|
@@ -2,8 +2,13 @@
|
|
2
2
|
<div class="" id="table_deployed_hosts">
|
3
3
|
<%= form_tag(associate_host_deployment_path(id: @deployment), class: 'form-horizontal association') do |f| %>
|
4
4
|
<div class="pull-right top_actions">
|
5
|
-
<%= submit_tag _("
|
6
|
-
:
|
5
|
+
<%= submit_tag _("Unassign Hosts"),
|
6
|
+
:class => "btn btn-danger btn-sm pull-right",
|
7
|
+
:'data-toggle' => "tooltip",
|
8
|
+
:'data-placement' => "left",
|
9
|
+
:id => "undeploy_hosts_modal",
|
10
|
+
:disabled => true,
|
11
|
+
:title => _("Unassigning deployed hosts may lead to unexpected problems.") %>
|
7
12
|
</div>
|
8
13
|
<h4 class="pull-left"><%= _("Deployed Hosts") %></h4>
|
9
14
|
<p class="clearfix"></p>
|
@@ -3,8 +3,9 @@
|
|
3
3
|
<%= form_tag(associate_host_deployment_path(id: @deployment), class: 'form-horizontal association') do |f| %>
|
4
4
|
<div class="pull-right top_actions">
|
5
5
|
<%= submit_tag _("Configure Networks"), :class => "btn btn-default btn-sm", :style => "visibility: hidden" %>
|
6
|
-
|
7
|
-
|
6
|
+
<button type="button" class= "btn btn-primary btn-sm"
|
7
|
+
id="assign_hosts_modal" data-toggle = "modal"
|
8
|
+
data-target = "#role_modal" disabled="true"><%= _("Assign Hosts") %></button>
|
8
9
|
</div>
|
9
10
|
<h4 class="pull-left"><%= _("Free Hosts") %></h4>
|
10
11
|
<p class="clearfix"></p>
|
@@ -45,6 +46,34 @@
|
|
45
46
|
<% end %>
|
46
47
|
</tbody>
|
47
48
|
</table>
|
49
|
+
<div class="modal fade" id="role_modal" tabindex="-1" role="dialog" aria-labelledby="Deployment Roles" aria-hidden="true">
|
50
|
+
<div class="modal-dialog">
|
51
|
+
<div class="modal-content">
|
52
|
+
<div class="modal-header">
|
53
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
54
|
+
<h2 class="modal-title" id="deploy_modal_label">
|
55
|
+
<span class="glyphicon glyphicon-th-list">
|
56
|
+
</span> <%= _("Deployment Roles") %>
|
57
|
+
</h2>
|
58
|
+
</div>
|
59
|
+
<div class="modal-body">
|
60
|
+
<h3><%= _("Choose a deployment role to assign these to:") %></h3>
|
61
|
+
<div>
|
62
|
+
<% @deployment.child_hostgroups.each do |child_hostgroup| %>
|
63
|
+
<div class="form-inline">
|
64
|
+
<%= radio_button_tag(:hostgroup_id, child_hostgroup.id, false) %>
|
65
|
+
<%= label_tag(child_hostgroup.id, child_hostgroup.name) %>
|
66
|
+
</div>
|
67
|
+
<% end %>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
<div class="modal-footer">
|
71
|
+
<button type="button" class="btn btn-default" data-dismiss="modal"><%= _("Cancel") %></button>
|
72
|
+
<%= submit_tag _("Assign Hosts"), :class => "btn btn-primary btn-sm" %>
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
</div>
|
48
77
|
<% end %>
|
49
78
|
</div>
|
50
79
|
<% else %>
|
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.5
|
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-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman-tasks
|