foreman_fog_proxmox 0.13.1 → 0.13.2

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
  SHA256:
3
- metadata.gz: 6ee2ea48049134a2a429baa88bd6f3299c321f38a5f3532c8c17d1a3012dc277
4
- data.tar.gz: 246a3ee1a5bb9f7f99e55b7f97f637cae3b49b12e7917667444238ae007e21e6
3
+ metadata.gz: f47c6b4425f06c4b7b7547bf71e3e985c66d660bdb54328370a6c196135c9791
4
+ data.tar.gz: 902aa40b81589de604ae8cf3670c1af7762e8700b11eb3065b649c38ae6b2e36
5
5
  SHA512:
6
- metadata.gz: b7ba0a9c31049f222e8cd06fd411356ae1302dcf1b9b0acfe0be8498d514c39e3c54373d8603484183c01318bff6c9ad4b18c8366f28916ffa05976e87b62914
7
- data.tar.gz: 66d723e3135509e731e663438fa5d5cd3f79464641e4470c7b8f7908d744ba04d069a579c334140acc1b927c408208fa91cac5e30daf27998cb64f91575b9fc8
6
+ metadata.gz: 3fe6bd7f8ba0c72d7bf04348d7463dd5611465b77fbd6de93258d10433e4736eb20f89b97cf9f2842069fd69e0ec5928124b5598cdbcd72aefa0dfa9b1c80bcb
7
+ data.tar.gz: 9d341aa011e5b5a3f1738e05ff72d02c0caa97149c57fa1918506c8051524304ccbe87a76ec6e07d26444a7f4fc2f2fdd8a0e2a119224fc58f13acaad6e32c94
@@ -36,14 +36,14 @@ function sslVerifyPeerSelected() {
36
36
  }
37
37
  }
38
38
 
39
- function enableField(id) {
40
- $(id).show();
41
- $(id).removeAttr('disabled');
39
+ function enableField(item) {
40
+ $(item).show();
41
+ $(item).removeAttr('disabled');
42
42
  }
43
43
 
44
- function disableField(id) {
45
- $(id).hide();
46
- $(id).attr('disabled','disabled');
44
+ function disableField(item) {
45
+ $(item).hide();
46
+ $(item).attr('disabled','disabled');
47
47
  }
48
48
 
49
49
  function toggleFieldset(method, selected){
@@ -39,17 +39,17 @@ function vmTypeSelected() {
39
39
  return false;
40
40
  }
41
41
 
42
- function volumeButtonAddId(id){
43
- return $("a[data-association='" + id + "_volumes']");
42
+ function volumeButtonAddId(item){
43
+ return $("a[data-association='" + item + "_volumes']");
44
44
  }
45
45
 
46
- function volumeFieldsetId(id, type){
47
- return $("fieldset[id^='" + type + "_volume_"+ id +"']").not("fieldset[id$='_new_" + id +"_volumes']");
46
+ function volumeFieldsetId(item, type){
47
+ return $("fieldset[id^='" + type + "_volume_"+ item +"']").not("fieldset[id$='_new_" + item +"_volumes']");
48
48
  }
49
49
 
50
- function indexByIdAndType(id, storage_type, vm_type){
50
+ function indexByIdAndType(item, storage_type, vm_type){
51
51
  let regex = new RegExp(`${vm_type}_volume_${storage_type}_(\\d+)`);
52
- return id.match(regex)[1];
52
+ return item.match(regex)[1];
53
53
  }
54
54
 
55
55
  function volidByIndexAndTag(index, tag){
@@ -58,9 +58,9 @@ function volidByIndexAndTag(index, tag){
58
58
 
59
59
  function hasCloudinit(){
60
60
  result = false;
61
- let id = volumeFieldsetId('cloud_init', 'server').attr('id');
62
- if (id !== undefined){
63
- let index = indexByIdAndType(id, 'cloud_init', 'server');
61
+ let volume_id = volumeFieldsetId('cloud_init', 'server').attr('id');
62
+ if (volume_id !== undefined){
63
+ let index = indexByIdAndType(volume_id, 'cloud_init', 'server');
64
64
  let volid = volidByIndexAndTag(index, 'input');
65
65
  result = volid.includes("cloudinit");
66
66
  }
@@ -69,9 +69,9 @@ function hasCloudinit(){
69
69
 
70
70
  function hasCdrom(){
71
71
  result = false;
72
- let id = volumeFieldsetId('cdrom', 'server').attr('id');
73
- if (id !== undefined){
74
- let index = indexByIdAndType(id, 'cdrom', 'server');
72
+ let volume_id = volumeFieldsetId('cdrom', 'server').attr('id');
73
+ if (volume_id !== undefined){
74
+ let index = indexByIdAndType(volume_id, 'cdrom', 'server');
75
75
  let checked = $("input[id^='host_compute_attributes_volumes_attributes_" + index + "_cdrom']:checked").val();
76
76
  let isCdrom = checked === 'cdrom';
77
77
  result = isCdrom;
@@ -84,27 +84,27 @@ function hasCdrom(){
84
84
  return result;
85
85
  }
86
86
 
87
- function cloudinit(id){
88
- return id === 'cloud_init' && hasCloudinit();
87
+ function cloudinit(item){
88
+ return item === 'cloud_init' && hasCloudinit();
89
89
  }
90
90
 
91
- function cdrom(id){
92
- return id === 'cdrom' && hasCdrom();
91
+ function cdrom(item){
92
+ return item === 'cdrom' && hasCdrom();
93
93
  }
94
94
 
95
- function enableVolume(id, type){
96
- volumeFieldsetId(id, type).show();
97
- volumeButtonAddId(id).show();
98
- if (cloudinit(id) || cdrom(id)){
99
- volumeButtonAddId(id).hide();
95
+ function enableVolume(volume_id, type){
96
+ volumeFieldsetId(volume_id, type).show();
97
+ volumeButtonAddId(volume_id).show();
98
+ if (cloudinit(volume_id) || cdrom(volume_id)){
99
+ volumeButtonAddId(volume_id).hide();
100
100
  }
101
- volumeFieldsetId(id, type).removeAttr('disabled');
101
+ volumeFieldsetId(volume_id, type).removeAttr('disabled');
102
102
  }
103
103
 
104
- function disableVolume(id, type){
105
- volumeFieldsetId(id, type).hide();
106
- volumeButtonAddId(id).hide();
107
- volumeFieldsetId(id, type).attr('disabled','disabled');
104
+ function disableVolume(volume_id, type){
105
+ volumeFieldsetId(volume_id, type).hide();
106
+ volumeButtonAddId(volume_id).hide();
107
+ volumeFieldsetId(volume_id, type).attr('disabled','disabled');
108
108
  }
109
109
 
110
110
  function volumes(type){
@@ -115,44 +115,44 @@ function volume(type){
115
115
  return type === 'qemu' ? 'server' : 'container';
116
116
  }
117
117
 
118
- function toggleVolume(id, type1, type2){
119
- type1 === type2 ? enableVolume(id, volume(type1)) : disableVolume(id, volume(type1));
118
+ function toggleVolume(volume_id, type1, type2){
119
+ type1 === type2 ? enableVolume(volume_id, volume(type1)) : disableVolume(volume_id, volume(type1));
120
120
  }
121
121
 
122
122
  function toggleVolumes(selected){
123
123
  ['qemu', 'lxc'].forEach(function(type){
124
- volumes(type).forEach(function(id){
125
- toggleVolume(id, selected, type);
124
+ volumes(type).forEach(function(volume_id){
125
+ toggleVolume(volume_id, selected, type);
126
126
  });
127
127
  });
128
128
  }
129
129
 
130
- function enableFieldset(id, fieldset) {
130
+ function enableFieldset(fieldsetId, fieldset) {
131
131
  if (fieldset.toggle && fieldset.new_vm){
132
- fieldset_id(id, fieldset).show();
132
+ fieldset_id(fieldsetId, fieldset).show();
133
133
  }
134
- fieldset_id(id, fieldset).removeAttr('disabled');
135
- input_hidden_id(id).removeAttr('disabled');
134
+ fieldset_id(fieldsetId, fieldset).removeAttr('disabled');
135
+ input_hidden_id(fieldsetId).removeAttr('disabled');
136
136
  }
137
137
 
138
- function disableFieldset(id, fieldset) {
138
+ function disableFieldset(fieldsetId, fieldset) {
139
139
  if (fieldset.toggle && fieldset.new_vm){
140
- fieldset_id(id, fieldset).hide();
140
+ fieldset_id(fieldsetId, fieldset).hide();
141
141
  }
142
- fieldset_id(id, fieldset).attr('disabled','disabled');
143
- input_hidden_id(id).attr('disabled','disabled');
142
+ fieldset_id(fieldsetId, fieldset).attr('disabled','disabled');
143
+ input_hidden_id(fieldsetId).attr('disabled','disabled');
144
144
  }
145
145
 
146
- function toggleFieldset(id, fieldset, type1, type2) {
147
- type1 === type2 ? enableFieldset(id, fieldset) : disableFieldset(id, fieldset);
146
+ function toggleFieldset(fieldsetId, fieldset, type1, type2) {
147
+ type1 === type2 ? enableFieldset(fieldsetId, fieldset) : disableFieldset(fieldsetId, fieldset);
148
148
  }
149
149
 
150
- function input_hidden_id(id){
151
- return $("div[id^='"+ id +"_volumes']" + " + input:hidden");
150
+ function input_hidden_id(volume_id){
151
+ return $("div[id^='"+ volume_id +"_volumes']" + " + input:hidden");
152
152
  }
153
153
 
154
- function fieldset_id(id, fieldset){
155
- return $("fieldset[id^='" + id + "_"+fieldset.id+"']");
154
+ function fieldset_id(fieldsetId, fieldset){
155
+ return $("fieldset[id^='" + fieldsetId + "_"+fieldset.id+"']");
156
156
  }
157
157
 
158
158
  function fieldsets(type){
@@ -163,8 +163,8 @@ function toggleFieldsets(fieldset){
163
163
  var removable_input_hidden = $("div.removable-item[style='display: none;']" + " + input:hidden");
164
164
  removable_input_hidden.attr('disabled','disabled');
165
165
  ['qemu', 'lxc'].forEach(function(type){
166
- fieldsets(type).forEach(function(id){
167
- toggleFieldset(id, fieldset, fieldset.selected, type);
166
+ fieldsets(type).forEach(function(fieldsetId){
167
+ toggleFieldset(fieldsetId, fieldset, fieldset.selected, type);
168
168
  });
169
169
  });
170
170
  }
@@ -190,18 +190,18 @@ function nodeSelected(item) {
190
190
  }
191
191
  }
192
192
 
193
- function emptySelect(select){
194
- $(select).empty();
195
- $(select).append($("<option></option>").val('').text(''));
196
- $(select).val('');
193
+ function emptySelect(select_id){
194
+ $(select_id).empty();
195
+ $(select_id).append($("<option></option>").val('').text(''));
196
+ $(select_id).val('');
197
197
  }
198
198
 
199
199
  function initOptions(select_ids){
200
200
  console.log('initOptions(' + select_ids[0] + ')');
201
201
  select_ids.forEach(emptySelect);
202
- select_ids.forEach(function(select){
203
- $(select + ' option:selected').prop('selected',false);
204
- $(select).val('');
202
+ select_ids.forEach(function(select_id){
203
+ $(select_id + ' option:selected').prop('selected',false);
204
+ $(select_id).val('');
205
205
  });
206
206
  }
207
207
 
@@ -24,9 +24,9 @@ function volumesAttributesSelector(profile,index,selector) {
24
24
  }
25
25
 
26
26
  function getIndex(item) {
27
- var id = $(item).attr('id');
27
+ var index_id = $(item).attr('id');
28
28
  var pattern = /(host_compute_attributes_volumes_attributes_||compute_attribute_vm_attrs_volumes_attributes_)(\d+)[_](.*)/i;
29
- pattern_a = pattern.exec(id);
29
+ pattern_a = pattern.exec(index_id);
30
30
  var index = pattern_a[2];
31
31
  return index;
32
32
  }
@@ -16,24 +16,24 @@
16
16
  // along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>.
17
17
 
18
18
  function getIndex(item) {
19
- var id = $(item).attr('id');
19
+ var index_id = $(item).attr('id');
20
20
  var pattern = /(host_compute_attributes_volumes_attributes_||compute_attribute_vm_attrs_volumes_attributes_)(\d+)[_](.*)/i;
21
- pattern_a = pattern.exec(id);
21
+ pattern_a = pattern.exec(index_id);
22
22
  var index = pattern_a[2];
23
23
  return index;
24
24
  }
25
25
 
26
26
  function volumeId(type,index){
27
- let id = '#volume_' + type + '_' + index;
28
- return id;
27
+ let volume_id = '#volume_' + type + '_' + index;
28
+ return volume_id;
29
29
  }
30
30
 
31
- function enableField(id) {
32
- $(id).show();
33
- $(id).removeAttr('disabled');
31
+ function enableField(item) {
32
+ $(item).show();
33
+ $(item).removeAttr('disabled');
34
34
  }
35
35
 
36
- function disableField(id) {
37
- $(id).hide();
38
- $(id).attr('disabled','disabled');
36
+ function disableField(item) {
37
+ $(item).hide();
38
+ $(item).attr('disabled','disabled');
39
39
  }
@@ -18,5 +18,5 @@
18
18
  # along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  module ForemanFogProxmox
21
- VERSION = '0.13.1'
21
+ VERSION = '0.13.2'
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_fog_proxmox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tristan Robert
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-03-17 00:00:00.000000000 Z
12
+ date: 2021-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: deface