foreman_datacenter 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6fc83e395328d48f6dc9160a273e8476a0f5c83
4
- data.tar.gz: 8d71e626185ffee750baab610ad9aafaaffcf09f
3
+ metadata.gz: 3ff4d0b2d2000fb2aa1e8b6a6ba3da274379859e
4
+ data.tar.gz: ca7ace88b9521efe4c7072f891fb5db11a7357eb
5
5
  SHA512:
6
- metadata.gz: 789e13b2b62ec7fcfc495f5b5d3a7859e1a3057ed9d106f51332cc594c5cfb15a5788eb441fb42d521a1c62c7e0344cf95d4dca52e6ef37f3e64d06f9039ebd2
7
- data.tar.gz: e7aa5cff41809aeeb0f5492abd272b7b85075286a19c22892b7be6038ec3d4150a3c6f43bd167e41db1c63490945548c40d964c80c28a18052b7b08e8285ac95
6
+ metadata.gz: c11a6e059f32873fab653ae5b665c338b4edaf9ea553280b9b938170a18f56806c4d249b6ac18b74c7763aa9d0bfa39304eb6017675518920aece7b2af2b79ed
7
+ data.tar.gz: 5cd651979dad5b3c59daae133eb8bfd8ce42331813a8a062939134505eac76dc202eb7fc2cd056d07feba544d4192578eacddab86cd8dd2799cfa30aa0914a71
@@ -1,6 +1,6 @@
1
1
  $(function () {
2
2
  function onSend() {
3
- foreman.tools.showSpinner();
3
+ tfm.tools.showSpinner();
4
4
  }
5
5
 
6
6
  function onSuccess() {
@@ -8,7 +8,7 @@ $(function () {
8
8
  }
9
9
 
10
10
  function onComplete() {
11
- foreman.tools.hideSpinner();
11
+ tfm.tools.hideSpinner();
12
12
  }
13
13
 
14
14
  var selectors = 'a[data-action="connected"], a[data-action="planned"], a[data-action="destroy"]';
@@ -4,13 +4,13 @@ function connectionsNewRackSelected(item) {
4
4
  if (rack === '') {
5
5
  return false;
6
6
  } else {
7
- foreman.tools.showSpinner();
7
+ tfm.tools.showSpinner();
8
8
  var url = $item.data('url');
9
9
  var params = $.param({ rack_id: rack });
10
10
  var $container = $('#devices-container');
11
11
  $container.load(url, params, function () {
12
12
  $container.find('select').select2({allowClear: true});
13
- foreman.tools.hideSpinner();
13
+ tfm.tools.hideSpinner();
14
14
  });
15
15
  }
16
16
  }
@@ -4,13 +4,13 @@ function devicesNewManufacturerSelected(item) {
4
4
  if (manufacturer === '') {
5
5
  return false;
6
6
  } else {
7
- foreman.tools.showSpinner();
7
+ tfm.tools.showSpinner();
8
8
  var url = $item.data('url');
9
9
  var params = $.param({ manufacturer_id: manufacturer });
10
10
  var $container = $('#device-types-container');
11
11
  $container.load(url + ' #device-types', params, function () {
12
12
  $container.find('select').select2({allowClear: true});
13
- foreman.tools.hideSpinner();
13
+ tfm.tools.hideSpinner();
14
14
  });
15
15
  }
16
16
  }
@@ -21,13 +21,13 @@ function devicesNewSiteSelected(item) {
21
21
  if (site === '') {
22
22
  return false;
23
23
  } else {
24
- foreman.tools.showSpinner();
24
+ tfm.tools.showSpinner();
25
25
  var url = $item.data('url');
26
26
  var params = $.param({ site_id: site });
27
27
  var $container = $('#sites-container');
28
28
  $container.load(url + ' #sites', params, function () {
29
29
  $container.find('select').select2({allowClear: true});
30
- foreman.tools.hideSpinner();
30
+ tfm.tools.hideSpinner();
31
31
  });
32
32
  }
33
33
  }
@@ -4,13 +4,13 @@ function racksNewSiteSelected(item) {
4
4
  if (site === '') {
5
5
  return false;
6
6
  } else {
7
- foreman.tools.showSpinner();
7
+ tfm.tools.showSpinner();
8
8
  var url = $item.data('url');
9
9
  var params = $.param({ site_id: site });
10
10
  var $container = $('#rack-groups-container');
11
11
  $container.load(url + ' #rack-groups', params, function () {
12
12
  $container.find('select').select2({allowClear: true});
13
- foreman.tools.hideSpinner();
13
+ tfm.tools.hideSpinner();
14
14
  });
15
15
  }
16
16
  }
@@ -10,10 +10,10 @@ function newDeviceSelected(item) {
10
10
  if (fragment) url += ' ' + fragment;
11
11
  var params = $.param({device_id: id});
12
12
  var $targetContainer = $($mainContainer.data('target'));
13
- foreman.tools.showSpinner();
13
+ tfm.tools.showSpinner();
14
14
  $targetContainer.load(url, params, function () {
15
15
  $targetContainer.find('select').select2({allowClear: true});
16
- foreman.tools.hideSpinner();
16
+ tfm.tools.hideSpinner();
17
17
  });
18
18
  }
19
19
  }
@@ -9,9 +9,11 @@ module ForemanDatacenter
9
9
  end
10
10
 
11
11
  def update_device_on_destroy
12
- new_device_name = "Unassigned device (former: #{name})"
13
- device.update(name: new_device_name)
14
- device.interfaces.clear
12
+ if device.exist?
13
+ new_device_name = "Unassigned device (former: #{name})"
14
+ device.update(name: new_device_name)
15
+ # device.interfaces.clear
16
+ end
15
17
  end
16
18
 
17
19
  def fact_value_by_name(name)
@@ -1,3 +1,3 @@
1
1
  module ForemanDatacenter
2
- VERSION = '0.1.9'.freeze
2
+ VERSION = '0.1.10'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_datacenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Ivanov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-07 00:00:00.000000000 Z
11
+ date: 2017-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -101,6 +101,9 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
+ - LICENSE
105
+ - README.md
106
+ - Rakefile
104
107
  - app/assets/javascripts/foreman_datacenter/ajax.js
105
108
  - app/assets/javascripts/foreman_datacenter/console_ports.js
106
109
  - app/assets/javascripts/foreman_datacenter/device_interface_connections.js
@@ -310,17 +313,14 @@ files:
310
313
  - db/migrate/20160906205605_rename_field_in_management_devices.rb
311
314
  - db/migrate/20160909205537_add_name_index_to_racks.rb
312
315
  - db/migrate/20160920221011_remove_index_from_devices.rb
316
+ - lib/foreman_datacenter.rb
313
317
  - lib/foreman_datacenter/engine.rb
314
318
  - lib/foreman_datacenter/version.rb
315
- - lib/foreman_datacenter.rb
316
319
  - lib/tasks/foreman_datacenter_tasks.rake
320
+ - locale/Makefile
317
321
  - locale/en/foreman_datacenter.po
318
322
  - locale/foreman_datacenter.pot
319
323
  - locale/gemspec.rb
320
- - locale/Makefile
321
- - LICENSE
322
- - Rakefile
323
- - README.md
324
324
  - test/factories/foreman_datacenter_factories.rb
325
325
  - test/test_plugin_helper.rb
326
326
  - test/unit/foreman_datacenter_test.rb
@@ -343,11 +343,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
343
343
  version: '0'
344
344
  requirements: []
345
345
  rubyforge_project:
346
- rubygems_version: 2.0.14
346
+ rubygems_version: 2.6.12
347
347
  signing_key:
348
348
  specification_version: 4
349
349
  summary: A plugin that lets you document your servers in a datacenter
350
350
  test_files:
351
+ - test/unit/foreman_datacenter_test.rb
351
352
  - test/factories/foreman_datacenter_factories.rb
352
353
  - test/test_plugin_helper.rb
353
- - test/unit/foreman_datacenter_test.rb