foreman_datacenter 1.20.3 → 1.20.4
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/foreman_datacenter/modal.js +10 -4
- data/app/views/foreman_datacenter/device_roles/index.html.erb +1 -1
- data/app/views/foreman_datacenter/device_roles/show.html.erb +1 -1
- data/app/views/foreman_datacenter/device_types/index.html.erb +1 -1
- data/app/views/foreman_datacenter/device_types/show.html.erb +1 -1
- data/app/views/foreman_datacenter/devices/index.html.erb +1 -1
- data/app/views/foreman_datacenter/manufacturers/index.html.erb +1 -1
- data/app/views/foreman_datacenter/manufacturers/show.html.erb +1 -1
- data/app/views/foreman_datacenter/platforms/index.html.erb +1 -1
- data/app/views/foreman_datacenter/platforms/show.html.erb +1 -1
- data/lib/foreman_datacenter/version.rb +1 -1
- metadata +2 -3
- data/app/views/foreman_datacenter/racks/_device_position.html.erb.back +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31dbb1be5a3d3b9952130a981dd0504936e95b351c1123ca6e8b51722e7fcfd7
|
4
|
+
data.tar.gz: bd5ec041069a976115bac55df645b02334a37e0b250ffcf41fc994ec0458d59d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71b2ec635d67fc988d2dcfdaae9d4b9639060d91397847d477328341ff21fc6c12f2b3d28a010eaf26ce557351cf524c6a040972fe393f5aa62f50b5e7157b7c
|
7
|
+
data.tar.gz: 9509cc3926f5fe17020ae65dffa2995b671a9dbb8c1ba6c7aa0de76323f52a5b820a8316845217cea3967db51f424c6c439e60966db26969f96be8c6a7d5d851
|
@@ -8,7 +8,7 @@ $(window).click(function(event) {
|
|
8
8
|
var pathname = window.location.pathname; // Returns path only
|
9
9
|
var str = "/" + object_id;
|
10
10
|
var patt = new RegExp(str);
|
11
|
-
|
11
|
+
var token = $('meta[name="csrf-token"]').attr('content');
|
12
12
|
if (object_type == 'device') {
|
13
13
|
var checkbox_label = 'Delete associated host ONLY and keep current device as UNASSIGNED!'
|
14
14
|
} else {
|
@@ -19,6 +19,12 @@ $(window).click(function(event) {
|
|
19
19
|
pathname = pathname + str
|
20
20
|
}
|
21
21
|
|
22
|
+
var move = "<p></p>"
|
23
|
+
if (object_type == "device" || object_type == "site" || object_type == "rack" || object_type == "rack_group") {
|
24
|
+
move = '<p>You also can move associated object to another <strong>' + object_type + '</strong> before you destroy it.</p> \
|
25
|
+
<a class="btn btn-block btn-primary modal-btn modal-btn-primary marginbottomsixteen" href="/datacenter/' + object_type + 's/' + object_id + '/move">Move associated objects</a>'
|
26
|
+
}
|
27
|
+
|
22
28
|
var form = '<div id="myModal" class="modal"> \
|
23
29
|
<div class="modal-content"> \
|
24
30
|
<div class="modal-header"> \
|
@@ -34,17 +40,17 @@ $(window).click(function(event) {
|
|
34
40
|
be undone. By unselecting checkbox you will permanently delete the \
|
35
41
|
<strong>' + object_name + '</strong> \
|
36
42
|
with \
|
37
|
-
<strong>
|
43
|
+
<strong>ALL</strong> \
|
38
44
|
associated objects' + ao + ' \
|
39
45
|
</p> \
|
40
46
|
<form class="modal-form nonpaddingbottom" action=' + pathname + ' accept-charset="UTF-8" method="post"> \
|
41
47
|
<input type="hidden" name="_method" value="delete"> \
|
48
|
+
<input type="hidden" name="authenticity_token" value=' + token + '> \
|
42
49
|
<input type="checkbox" name="object_only" id="object_only" value="true" checked="checked"> \
|
43
50
|
<label>' + checkbox_label + '</label> \
|
44
51
|
<input type="submit" name="commit" value="I understand the consequences, delete this ' + object_type + '" class="btn btn-block btn-danger modal-btn modal-btn-danger"> \
|
45
52
|
</form> \
|
46
|
-
|
47
|
-
<a class="btn btn-block btn-primary modal-btn modal-btn-primary marginbottomsixteen" href="/datacenter/' + object_type + 's/' + object_id + '/move">Move associated objects</a> \
|
53
|
+
'+ move +' \
|
48
54
|
</div> \
|
49
55
|
</div> \
|
50
56
|
</div>'
|
@@ -28,7 +28,7 @@
|
|
28
28
|
hash_for_edit_device_role_path(:id => device_role).merge(:auth_object => device_role, :authorizer => authorizer)
|
29
29
|
),
|
30
30
|
display_fake_delete_if_authorized(
|
31
|
-
|
31
|
+
hash_for_device_role_path(:id => device_role).merge(:auth_object => device_role, :authorizer => authorizer),
|
32
32
|
id: 'init-modal',
|
33
33
|
href: '#',
|
34
34
|
data: { objecttype: 'device_role',
|
@@ -34,7 +34,7 @@
|
|
34
34
|
hash_for_edit_device_type_path(:id => device_type).merge(:auth_object => device_type, :authorizer => authorizer)
|
35
35
|
),
|
36
36
|
display_fake_delete_if_authorized(
|
37
|
-
|
37
|
+
hash_for_device_type_path(:id => device_type).merge(:auth_object => device_type, :authorizer => authorizer),
|
38
38
|
id: 'init-modal',
|
39
39
|
href: '#',
|
40
40
|
data: { objecttype: 'device_type',
|
@@ -55,7 +55,7 @@
|
|
55
55
|
hash_for_edit_device_path(:id => device).merge(:auth_object => device, :authorizer => authorizer)
|
56
56
|
),
|
57
57
|
display_fake_delete_if_authorized(
|
58
|
-
|
58
|
+
hash_for_device_path(:id => device).merge(:auth_object => device, :authorizer => authorizer),
|
59
59
|
id: 'init-modal',
|
60
60
|
href: '#',
|
61
61
|
data: { objecttype: 'device',
|
@@ -30,7 +30,7 @@
|
|
30
30
|
hash_for_edit_manufacturer_path(:id => manufacturer).merge(:auth_object => manufacturer, :authorizer => authorizer)
|
31
31
|
),
|
32
32
|
display_fake_delete_if_authorized(
|
33
|
-
|
33
|
+
hash_for_manufacturer_path(:id => manufacturer).merge(:auth_object => manufacturer, :authorizer => authorizer),
|
34
34
|
id: 'init-modal',
|
35
35
|
href: '#',
|
36
36
|
data: { objecttype: 'manufacturer',
|
@@ -28,7 +28,7 @@
|
|
28
28
|
hash_for_edit_platform_path(:id => platform).merge(:auth_object => platform, :authorizer => authorizer)
|
29
29
|
),
|
30
30
|
display_fake_delete_if_authorized(
|
31
|
-
|
31
|
+
hash_for_platform_path(:id => platform).merge(:auth_object => platform, :authorizer => authorizer),
|
32
32
|
id: 'init-modal',
|
33
33
|
href: '#',
|
34
34
|
data: { objecttype: 'platform',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_datacenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.20.
|
4
|
+
version: 1.20.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Ivanov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-06-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: prawn
|
@@ -462,7 +462,6 @@ files:
|
|
462
462
|
- app/views/foreman_datacenter/rack_groups/show.html.erb
|
463
463
|
- app/views/foreman_datacenter/rack_groups/welcome.html.erb
|
464
464
|
- app/views/foreman_datacenter/racks/_device_position.html.erb
|
465
|
-
- app/views/foreman_datacenter/racks/_device_position.html.erb.back
|
466
465
|
- app/views/foreman_datacenter/racks/_dp.html.erb
|
467
466
|
- app/views/foreman_datacenter/racks/_form.html.erb
|
468
467
|
- app/views/foreman_datacenter/racks/_rack_groups.html.erb
|
@@ -1,28 +0,0 @@
|
|
1
|
-
<div class="col-md-5">
|
2
|
-
<div class="panel panel-default">
|
3
|
-
<div class="panel-heading"><strong>Devices</strong></div>
|
4
|
-
<table class="table table-hover panel-body">
|
5
|
-
<tbody>
|
6
|
-
<% @rack.positioned_devices.each do |position, devices| %>
|
7
|
-
<tr>
|
8
|
-
<td class="col-md-1"><%= position %>U</td>
|
9
|
-
<td class="col-md-4">
|
10
|
-
<% unless devices.empty? %>
|
11
|
-
<% devices.each do |d| %>
|
12
|
-
<div class="<%= "text-" + ((d.side == "full" or d.side.nil?) ? "center" : "right") + " pull-" + ((d.side == "full" or d.side.nil?) ? "center" : d.side) %>">
|
13
|
-
<%= link_to d.name, device_path(d) %>
|
14
|
-
<% if d.side.nil? %>
|
15
|
-
*
|
16
|
-
<% end %>
|
17
|
-
</div>
|
18
|
-
<% end %>
|
19
|
-
<% end %>
|
20
|
-
</td>
|
21
|
-
</tr>
|
22
|
-
<% end %>
|
23
|
-
</tbody>
|
24
|
-
</table>
|
25
|
-
</div>
|
26
|
-
<div><h6 class="text-right">* side is not defined</h6></div>
|
27
|
-
</div>
|
28
|
-
|