foreman_datacenter 1.19.4 → 1.19.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e4170969e9678dee8ac17bd158e4e6e7465db4bce58e2c2e7717fb59dbb5947
4
- data.tar.gz: f105335fbe08325fcc2b04b1322788982c81bb6e7b039e5620564fc395a84ae6
3
+ metadata.gz: 3379f15bc6b2cdd363625a0bf9fdeef9ec6faf0cd09448afe36dcb833da5dfcb
4
+ data.tar.gz: 1ffa1280a6d03ffb2e7a53af1abff6399f11a2d4c216e8a8d400fc257c2ffb7e
5
5
  SHA512:
6
- metadata.gz: 9916fc3ecdfb26624ba5d7d497127bef3bd94e2b89d6cdf88d06d9ee20cafb982c29819b2127f54803bd85f758655468810f2894f436e4594a3b27b5d0756ac5
7
- data.tar.gz: 73666ccd139b38bb358be227d458add1950f216af6e921b98f9c4853acf98ea26ee1e37391bbe313827d34a08370092e71cfc68c6a73b5f7855a7b5565b8cd80
6
+ metadata.gz: fa8feef431143d629cdc55f9487f390b051fbd917d2d190fa8b874636913e57461b09a5f4aaf18ef231fa5343940c9a9dde2a7d48de8d4d4460dc8830339f9e1
7
+ data.tar.gz: 5e40dc171c0284703efc741cbb1febb2948c726b2f5bbe566b3d1c0e109377ec23b325abda30e05506c70a6a93b482559548281183cd26f821240302230daccb
@@ -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
- console.log(object_type);
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>all</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
- <p>You also can move associated object to another <strong>' + object_type + '</strong> before you destroy it.</p> \
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
- hash_for_site_path(:id => device_role).merge(:auth_object => device_role, :authorizer => authorizer),
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',
@@ -12,7 +12,7 @@
12
12
  :class => 'btn btn-warning'
13
13
  ),
14
14
  display_fake_delete_if_authorized(
15
- hash_for_site_path(id: @device_role),
15
+ hash_for_device_role_path(id: @device_role),
16
16
  class: 'btn btn-danger',
17
17
  id: 'init-modal',
18
18
  href: '#',
@@ -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
- hash_for_site_path(:id => device_type).merge(:auth_object => device_type, :authorizer => authorizer),
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',
@@ -12,7 +12,7 @@
12
12
  :class => 'btn btn-warning'
13
13
  ),
14
14
  display_fake_delete_if_authorized(
15
- hash_for_site_path(id: @device_type),
15
+ hash_for_device_type_path(id: @device_type),
16
16
  class: 'btn btn-danger',
17
17
  id: 'init-modal',
18
18
  href: '#',
@@ -14,6 +14,11 @@
14
14
  <td>
15
15
  <%= h interface.connected_interface.name %>
16
16
  </td>
17
+ <td>
18
+ <%= h interface.connection.id %>
19
+ -
20
+ <%= h interface.form_factor %>
21
+ </td>
17
22
  <td></td>
18
23
  <td class="text-right">
19
24
  <% if interface.connection.planned? %>
@@ -56,6 +61,7 @@
56
61
  <td></td>
57
62
  <td class="text-muted">Not connected</td>
58
63
  <td></td>
64
+ <td></td>
59
65
  <td class="text-right">
60
66
  <%= link_to new_device_interface_device_interface_connection_path(interface),
61
67
  class: 'btn btn-success btn-xs', title: 'Connect' do %>
@@ -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
- hash_for_site_path(:id => device).merge(:auth_object => device, :authorizer => authorizer),
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',
@@ -257,7 +257,7 @@
257
257
  <tr>
258
258
  <td><%= _("Console URL") %></td>
259
259
  <td>
260
- <%= link_to @device.console_url, "http://#{@device.console_url}", target: "_blank" %>
260
+ <%= link_to @device.console_url, "#{@device.console_url}", target: "_blank" %>
261
261
  </td>
262
262
 
263
263
  </tr>
@@ -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
- hash_for_site_path(:id => manufacturer).merge(:auth_object => manufacturer, :authorizer => authorizer),
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',
@@ -12,7 +12,7 @@
12
12
  :class => 'btn btn-warning'
13
13
  ),
14
14
  display_fake_delete_if_authorized(
15
- hash_for_site_path(id: @manufacturer),
15
+ hash_for_manufacturer_path(id: @manufacturer),
16
16
  class: 'btn btn-danger',
17
17
  id: 'init-modal',
18
18
  href: '#',
@@ -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
- hash_for_site_path(:id => platform).merge(:auth_object => platform, :authorizer => authorizer),
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',
@@ -12,7 +12,7 @@
12
12
  :class => 'btn btn-warning'
13
13
  ),
14
14
  display_fake_delete_if_authorized(
15
- hash_for_site_path(id: @platform),
15
+ hash_for_platform_path(id: @platform),
16
16
  class: 'btn btn-danger',
17
17
  id: 'init-modal',
18
18
  href: '#',
@@ -1,3 +1,3 @@
1
1
  module ForemanDatacenter
2
- VERSION = '1.19.4'.freeze
2
+ VERSION = '1.19.5'.freeze
3
3
  end
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.19.4
4
+ version: 1.19.5
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-05-20 00:00:00.000000000 Z
12
+ date: 2019-06-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: prawn