foreman_setup 2.0.3 → 2.0.4

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: 0bf21d036debd554c2c8517fa5f90702d9c0582c
4
- data.tar.gz: 3f22698d58ca143812e14872ab06194e6f98045b
3
+ metadata.gz: 4650b2e87fc4a1a4860318ae3b1108f6438a228c
4
+ data.tar.gz: 8ed548254d9b7dfc97894d4d65a346610468f608
5
5
  SHA512:
6
- metadata.gz: 6c2045d0b9e7790f6704437cdfbee16c822951be1cfb670644cc93855e77d2bfdaf63a781ca24d84543d2d3133984fd9406e372c24bc734b573f121dfbd1b647
7
- data.tar.gz: d6fd914ffdc7f7686596682f3bcd7999d07b964bd7f201091f67687ac24f84d5e7548109d4bb2b9b960697a4b3f4d52935329811bbea3ac504105eb702e71212
6
+ metadata.gz: 85b66ca8fbaabc8e82dd15314af8473e02e29e79e3d63fe6b5725c209880fe295f027389cef5a139af1399c8ce3a1600ad2f8dfab3074db0d69e7ced28a77e28
7
+ data.tar.gz: 82c66e7488995bdc1dd8f2a78af5350e62e06a9893a7f3117cb047f065360c85215364713b1f2c209f5d3d92a00d24aba80881f7cb8631fa53eefc72b14462cd
data/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.0.4
4
+ * use foreman_url from settings, not browser URL for installer base URL
5
+ * associate finish templates
6
+ * remove JavaScript assets (#12)
7
+
3
8
  ## v2.0.3
4
9
  * fix Facter 2 compatibility
5
10
 
@@ -147,19 +147,19 @@ module ForemanSetup
147
147
  end
148
148
 
149
149
  # Associate templates with OS and vice-versa
150
- foreman14 = SETTINGS[:version].is_a? Foreman::Version
151
150
  if @provisioner.host.os.family == 'Redhat'
152
151
  tmpl_name = 'Kickstart'
153
152
  provision_tmpl_name = @provisioner.host.os.name == 'Redhat' ? 'RHEL Kickstart' : tmpl_name
154
153
  ipxe_tmpl_name = 'Kickstart'
155
- ptable_name = foreman14 ? 'Kickstart default' : 'RedHat default'
154
+ finish_tmpl_name = 'Kickstart default finish'
155
+ ptable_name = 'Kickstart default'
156
156
  elsif @provisioner.host.os.family == 'Debian'
157
157
  tmpl_name = provision_tmpl_name = 'Preseed'
158
- ptable_name = foreman14 ? 'Preseed default' : 'Ubuntu default'
158
+ finish_tmpl_name = 'Preseed default finish'
159
+ ptable_name = 'Preseed default'
159
160
  end
160
161
 
161
- ipxe_kind = foreman14 ? 'iPXE' : 'gPXE'
162
- {'provision' => provision_tmpl_name, 'PXELinux' => tmpl_name, ipxe_kind => ipxe_tmpl_name}.each do |kind_name, tmpl_name|
162
+ {'provision' => provision_tmpl_name, 'PXELinux' => tmpl_name, 'iPXE' => ipxe_tmpl_name, 'finish' => finish_tmpl_name}.each do |kind_name, tmpl_name|
163
163
  next if tmpl_name.blank?
164
164
  kind = TemplateKind.find_by_name(kind_name)
165
165
  tmpls = ConfigTemplate.where('name LIKE ?', "#{tmpl_name}%").where(:template_kind_id => kind.id)
@@ -23,7 +23,7 @@ foreman-installer \
23
23
  --foreman-proxy-dns-zone=<%= provisioner.domain.name %> \
24
24
  --foreman-proxy-dns-reverse=<%= provisioner.rdns_zone %> \
25
25
  <%= provisioner.dns_forwarders.map { |f| " --foreman-proxy-dns-forwarders=#{f} \\" }.join("\n") %>
26
- --foreman-proxy-foreman-base-url=<%= root_url(:only_path => false).chomp('/') %> \
26
+ --foreman-proxy-foreman-base-url=<%= Setting[:foreman_url] %> \
27
27
  --foreman-proxy-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
28
28
  --foreman-proxy-oauth-consumer-secret=<%= Setting[:oauth_consumer_secret] %>
29
29
  </pre>
@@ -41,7 +41,7 @@ foreman-installer \
41
41
  --foreman-proxy-dns-zone=<%= provisioner.domain.name %> \
42
42
  --foreman-proxy-dns-reverse=<%= provisioner.rdns_zone %> \
43
43
  <%= provisioner.dns_forwarders.map { |f| " --foreman-proxy-dns-forwarders=#{f} \\" }.join("\n") %>
44
- --foreman-proxy-foreman-base-url=<%= root_url(:only_path => false).chomp('/') %> \
44
+ --foreman-proxy-foreman-base-url=<%= Setting[:foreman_url] %> \
45
45
  --foreman-proxy-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
46
46
  --foreman-proxy-oauth-consumer-secret=<%= Setting[:oauth_consumer_secret] %>
47
47
  </pre>
@@ -1,4 +1,18 @@
1
- <%= javascript 'foreman_setup/provisioner' %>
1
+ <%= javascript_tag do %>
2
+ function setup_media_change(ele) {
3
+ if ($(ele).val() == 'spacewalk') {
4
+ $('[id$="medium_path"]').prop('disabled', true)
5
+ $('#spacewalk_hostname').prop('disabled', false)
6
+ } else {
7
+ $('#spacewalk_hostname').prop('disabled', true)
8
+ $('[id$="medium_path"]').prop('disabled', false)
9
+ }
10
+ }
11
+
12
+ function setup_media_create_change(ele) {
13
+ $('[id$="medium_id"]').val('')
14
+ }
15
+ <% end %>
2
16
 
3
17
  <%= form_for provisioner, :url => step4_update_foreman_setup_provisioner_path do |f| %>
4
18
  <%= base_errors_for provisioner %>
@@ -29,16 +29,6 @@ module ForemanSetup
29
29
  role "Provisioning setup", [:edit_provisioning]
30
30
  end
31
31
  end
32
-
33
- initializer 'foreman_setup.configure_assets', :group => :assets do
34
- SETTINGS[:setup] = {
35
- :assets => {
36
- :precompile => [
37
- 'foreman_setup/provisioner.js'
38
- ],
39
- }
40
- }
41
- end
42
32
  end
43
33
 
44
34
  def table_name_prefix
@@ -1,3 +1,3 @@
1
1
  module ForemanSetup
2
- VERSION = '2.0.3'
2
+ VERSION = '2.0.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_setup
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-24 00:00:00.000000000 Z
11
+ date: 2014-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -36,7 +36,6 @@ files:
36
36
  - CHANGES.md
37
37
  - LICENSE
38
38
  - README.md
39
- - app/assets/javascripts/foreman_setup/provisioner.js
40
39
  - app/controllers/foreman_setup/provisioners_controller.rb
41
40
  - app/helpers/foreman_setup/provisioner_helper.rb
42
41
  - app/models/foreman_setup/provisioner.rb
@@ -1,13 +0,0 @@
1
- function setup_media_change(ele) {
2
- if ($(ele).val() == 'spacewalk') {
3
- $('[id$="medium_path"]').prop('disabled', true)
4
- $('#spacewalk_hostname').prop('disabled', false)
5
- } else {
6
- $('#spacewalk_hostname').prop('disabled', true)
7
- $('[id$="medium_path"]').prop('disabled', false)
8
- }
9
- }
10
-
11
- function setup_media_create_change(ele) {
12
- $('[id$="medium_id"]').val('')
13
- }