foreman_bootdisk 19.0.0 → 19.0.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c39668300d2a5a68390be2bda58d3559441a09d1b25e1b7d061bde4231ee7e9c
|
4
|
+
data.tar.gz: 4068117bc381e9014aaa52d0b7ebb773d356c3307b2a08ec66a633b5455b22e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1b23054266e36961e187c1013a4d0efa63adb4a66b93cdfc23cb93796c41fe3cccc5f77cad15ede3023a26a7d99c28c2ab14c144ea661be0b4d800a8df82ebc
|
7
|
+
data.tar.gz: 5a55ed870b9c65bf6019695e1562fc28bf50672ef523d87170979374d5baed59d47c3be55e29fb177c88a44bfab5a7978f79f2482985c4f8fcd7e197c0b2060b
|
@@ -76,8 +76,8 @@ module ForemanBootdisk
|
|
76
76
|
format.json do
|
77
77
|
render json: {
|
78
78
|
bootdiskOptions: {
|
79
|
-
bootdiskDownloadable: !!host
|
80
|
-
architectureName: host
|
79
|
+
bootdiskDownloadable: !!host&.bootdisk_downloadable?,
|
80
|
+
architectureName: host&.architecture&.name,
|
81
81
|
actions: bootdisk_allowed_actions(host),
|
82
82
|
},
|
83
83
|
}, status: :ok
|
@@ -106,7 +106,7 @@ module ForemanBootdisk
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def bootdisk_allowed_actions(host)
|
109
|
-
return [] unless host
|
109
|
+
return [] unless host&.bootdisk_downloadable?
|
110
110
|
|
111
111
|
allowed = %w[host full_host].each_with_object([]) do |action, actions|
|
112
112
|
opts = {
|
@@ -1,14 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class ChangeTemplatekindToBootdisk < ActiveRecord::Migration[4.2]
|
4
|
+
class FakeConfigTemplate < ApplicationRecord
|
5
|
+
self.table_name = if defined? ConfigTemplate
|
6
|
+
'config_templates'
|
7
|
+
else
|
8
|
+
'templates'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
4
12
|
def self.up
|
5
13
|
kind = TemplateKind.where(name: 'Bootdisk').first_or_create
|
6
14
|
|
7
15
|
tmpl_h = Setting.find_by(name: 'bootdisk_host_template').try(:value)
|
8
16
|
tmpl_g = Setting.find_by(name: 'bootdisk_generic_host_template').try(:value)
|
9
17
|
|
10
|
-
(
|
11
|
-
|
18
|
+
(FakeConfigTemplate.unscoped.where('name LIKE ?', '%Boot disk%') |
|
19
|
+
FakeConfigTemplate.unscoped.where(name: [tmpl_h, tmpl_g].compact)).each do |tmpl|
|
12
20
|
tmpl.update_attribute(:template_kind_id, kind.id)
|
13
21
|
end
|
14
22
|
end
|
@@ -18,6 +26,6 @@ class ChangeTemplatekindToBootdisk < ActiveRecord::Migration[4.2]
|
|
18
26
|
new_kind = TemplateKind.find_by(name: 'iPXE')
|
19
27
|
return unless old_kind.present? && new_kind.present?
|
20
28
|
|
21
|
-
|
29
|
+
FakeConfigTemplate.unscoped.where(template_kind_id: old_kind.id).update_all(template_kind_id: new_kind.id)
|
22
30
|
end
|
23
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_bootdisk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 19.0.
|
4
|
+
version: 19.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominic Cleal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: theforeman-rubocop
|
@@ -170,7 +170,7 @@ files:
|
|
170
170
|
- webpack/src/extensions/host/HostBootdiskButtonsSelectors.js
|
171
171
|
- webpack/src/extensions/host/__tests__/HostBootdiskButtonsSelectors.test.js
|
172
172
|
- webpack/src/extensions/host/__tests__/__snapshots__/HostBootdiskButtonsSelectors.test.js.snap
|
173
|
-
homepage:
|
173
|
+
homepage: https://github.com/theforeman/foreman_bootdisk
|
174
174
|
licenses:
|
175
175
|
- GPL-3.0
|
176
176
|
metadata: {}
|