foreman_azure 1.1.0 → 1.1.1

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: 2ea76c38a3b8a43fb02dc75f6151da9c33a9e44a
4
- data.tar.gz: d36db15142dd1e3f71ec94731c83fbc157a47dce
3
+ metadata.gz: c423d706f2ee1849a1524d2cfac17f3b5e0576ab
4
+ data.tar.gz: 1f5145596fe51e1958da017b64b9cc99f4ddc75a
5
5
  SHA512:
6
- metadata.gz: 50deb54b6d1dc4358d8f355555b53f31201d4402e0ec21e770ed66a20b1272c5cffb628b3f227a28d283f28b09e835255d0b8dc27f52f900927645f05a55591a
7
- data.tar.gz: 9c1f72740bbe9a7aca370a97d393cc05d6e61e658b9422fd778809032e907c038f248996d67623bc6ef9322c569404a45ee3281391e92536459d7cf6f0378e13
6
+ metadata.gz: 8542d5a51b205fb7b0ff9824e35885c8992e9bf74aed80612574c1e039a00ce32a4decce4d68418e24a73a7e15dff3a0cc49c6aa445805629751728dcc7fc509
7
+ data.tar.gz: b6828bed9fef643e5e454b1c1c71240504e527cba638c651bc9f28ba3dbda453cec44920e904b266c02e82a0bf894bd3cbfa8af68dad3a85df8e670f3aa846f8
@@ -3,7 +3,12 @@ function azure_image_selected() {
3
3
  var imageId = $('#host_compute_attributes_image_id').val();
4
4
  var azure_locations = $('#azure_locations');
5
5
  var locations_spinner = $('#azure_locations_spinner');
6
- tfm.tools.showSpinner();
6
+ if (typeof tfm == 'undefined') { // earlier than 1.13
7
+ foreman.tools.showSpinner();
8
+ } else {
9
+ tfm.tools.showSpinner();
10
+ }
11
+
7
12
  locations_spinner.removeClass('hide');
8
13
  $.ajax({
9
14
  data: { "image_id": imageId },
@@ -12,7 +17,11 @@ function azure_image_selected() {
12
17
  complete: function(){
13
18
  reloadOnAjaxComplete('#host_compute_attributes_image_id');
14
19
  locations_spinner.addClass('hide');
15
- tfm.tools.hideSpinner();
20
+ if (typeof tfm == 'undefined') { // earlier than 1.13
21
+ foreman.tools.hideSpinner();
22
+ } else {
23
+ tfm.tools.hideSpinner();
24
+ }
16
25
  },
17
26
  error: function(request, status, error) {
18
27
  },
@@ -2,6 +2,9 @@ module ForemanAzure
2
2
  class Azure < ComputeResource
3
3
  alias_attribute :subscription_id, :user
4
4
  alias_attribute :certificate_path, :url
5
+ if ::Foreman::Version.new.major.to_i == 1 && ::Foreman::Version.new.minor.to_i <= 13
6
+ attr_accessible :subscription_id, :certificate_path
7
+ end
5
8
 
6
9
  before_create :test_connection
7
10
 
@@ -6,9 +6,12 @@ module ForemanAzure
6
6
 
7
7
  initializer 'foreman_azure.register_plugin', :before => :finisher_hook do
8
8
  Foreman::Plugin.register :foreman_azure do
9
- requires_foreman '>= 1.8'
9
+ requires_foreman '>= 1.11'
10
10
  compute_resource(Azure)
11
- parameter_filter(ComputeResource, :subscription_id, :certificate_path)
11
+ foreman_version = ::Foreman::Version.new
12
+ if foreman_version.major.to_i == 1 && foreman_version.minor.to_i >= 13
13
+ parameter_filter(ComputeResource, :subscription_id, :certificate_path)
14
+ end
12
15
  end
13
16
  end
14
17
 
@@ -1,3 +1,3 @@
1
1
  module ForemanAzure
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_azure
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato Garcia