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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c423d706f2ee1849a1524d2cfac17f3b5e0576ab
|
4
|
+
data.tar.gz: 1f5145596fe51e1958da017b64b9cc99f4ddc75a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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
|
|
data/lib/foreman_azure/engine.rb
CHANGED
@@ -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.
|
9
|
+
requires_foreman '>= 1.11'
|
10
10
|
compute_resource(Azure)
|
11
|
-
|
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
|
|