foreman_discovery 24.0.1 → 25.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/api/v2/discovered_hosts_controller.rb +1 -1
- data/app/helpers/discovered_hosts_helper.rb +1 -1
- data/app/models/host/discovered.rb +1 -1
- data/app/views/discovered_hosts/show.html.erb +23 -21
- data/app/views/discovery_rules/_form.html.erb +0 -6
- data/config/initializers/inflections.rb +5 -0
- data/db/migrate/20141223142759_fill_discovery_attribute_sets_for_existing_hosts.rb +1 -1
- data/db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb +1 -1
- data/lib/foreman_discovery/engine.rb +300 -305
- data/lib/foreman_discovery/version.rb +1 -1
- data/lib/foreman_discovery.rake +1 -5
- data/locale/ca/foreman_discovery.edit.po +64 -64
- data/locale/cs_CZ/foreman_discovery.edit.po +64 -64
- data/locale/de/foreman_discovery.edit.po +64 -64
- data/locale/en/foreman_discovery.edit.po +64 -64
- data/locale/en_GB/foreman_discovery.edit.po +64 -64
- data/locale/es/foreman_discovery.edit.po +64 -64
- data/locale/foreman_discovery.pot +68 -68
- data/locale/fr/foreman_discovery.edit.po +64 -64
- data/locale/gl/foreman_discovery.edit.po +64 -64
- data/locale/it/foreman_discovery.edit.po +64 -64
- data/locale/ja/foreman_discovery.edit.po +64 -64
- data/locale/ka/foreman_discovery.edit.po +64 -64
- data/locale/ko/foreman_discovery.edit.po +64 -64
- data/locale/pt_BR/foreman_discovery.edit.po +64 -64
- data/locale/ru/foreman_discovery.edit.po +64 -64
- data/locale/sv_SE/foreman_discovery.edit.po +64 -64
- data/locale/zh_CN/foreman_discovery.edit.po +64 -64
- data/locale/zh_TW/foreman_discovery.edit.po +64 -64
- data/package.json +0 -2
- data/test/functional/discovered_hosts_controller_test.rb +1 -1
- metadata +14 -15
- data/test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb.orig +0 -81
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8eee62d61a02887b7fae697853ef06410a24f4a364b3ded2d5f1ae8e6c8037e2
|
4
|
+
data.tar.gz: 1270edfbdd2a140773f7d5673ee399d0037bc1b5a5b140873284632236f1323d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02ad926fda08a7bba1f0d479beb6905779903890dc0364975ccd16958767c6fd76b94dbc699951347783d55cd952735a4f591a4d98563cb2cb776c2d2bc56cdf
|
7
|
+
data.tar.gz: 66d2015d31098d376ab4e747bf72d5b46fb097740723d36823e032d6fb72b7ee1fdf38cda29c6f6f75260e9d59a3815e64d500a788759fbe53b572cc528f0569
|
@@ -162,7 +162,7 @@ module Api
|
|
162
162
|
|
163
163
|
total_count = 0
|
164
164
|
overall_errors = ""
|
165
|
-
Host::Discovered.all.
|
165
|
+
Host::Discovered.all.find_each do |discovered_host|
|
166
166
|
if rule = find_discovery_rule(discovered_host)
|
167
167
|
result &= perform_auto_provision(discovered_host, rule)
|
168
168
|
unless discovered_host.errors.empty?
|
@@ -222,7 +222,7 @@ class Host::Discovered < ::Host::Base
|
|
222
222
|
end
|
223
223
|
|
224
224
|
def self.normalize_string_for_hostname(hostname)
|
225
|
-
hostname = hostname.to_s.downcase.gsub(/(^[^a-z0-9]*|[^a-z0-9
|
225
|
+
hostname = hostname.to_s.downcase.gsub(/(^[^a-z0-9]*|[^a-z0-9-]|[^a-z0-9]*$)/,'')
|
226
226
|
raise(::Foreman::Exception.new(N_("Invalid hostname: Could not normalize the hostname"))) unless hostname && hostname.present?
|
227
227
|
hostname
|
228
228
|
end
|
@@ -96,28 +96,30 @@
|
|
96
96
|
</div>
|
97
97
|
</div>
|
98
98
|
|
99
|
-
|
100
|
-
|
101
|
-
$(
|
102
|
-
|
99
|
+
<% content_for(:javascripts) do -%>
|
100
|
+
<script type="text/javascript" charset="utf-8">
|
101
|
+
$(document).ready(function(){
|
102
|
+
$("table").css('padding', '0');
|
103
|
+
$("table").css("cssText", 'margin-bottom: 0 !important;');
|
103
104
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
105
|
+
provision_class = 'active'
|
106
|
+
primary_class = 'active'
|
107
|
+
var flag_primary = '<i class="glyphicon glyphicon glyphicon-tag primary-flag '+ primary_class +'" title="" data-original-title="'+ __('Primary') +'"></i>';
|
108
|
+
var flags_provision = '<i class="glyphicon glyphicon glyphicon-hdd provision-flag '+ provision_class +'" title="" data-original-title="'+ __('Provisioning') +'"></i>';
|
108
109
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
110
|
+
$('.flag-primary').html(flag_primary);
|
111
|
+
$('.flag-provision').append(flags_provision);
|
112
|
+
$('.primary-flag').tooltip();
|
113
|
+
$('.provision-flag').tooltip();
|
113
114
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
115
|
+
expand_all_toggle_action = { 'Expand All': 'show', 'Collapse All': 'hide' };
|
116
|
+
$('#expand_all').on('click', function () {
|
117
|
+
$(this).text(function(i, text){
|
118
|
+
$('#accordion .panel-collapse').collapse(expand_all_toggle_action[text]);
|
119
|
+
return text === "Expand All" ? "Collapse All" : "Expand All";
|
120
|
+
})
|
121
|
+
});
|
121
122
|
|
122
|
-
|
123
|
-
</script>
|
123
|
+
});
|
124
|
+
</script>
|
125
|
+
<% end %>
|
@@ -4,7 +4,7 @@ end
|
|
4
4
|
|
5
5
|
class FillDiscoveryAttributeSetsForExistingHosts < ActiveRecord::Migration[4.2]
|
6
6
|
def up
|
7
|
-
FakeDiscoveredHost.where(:type => "Host::Discovered").all.
|
7
|
+
FakeDiscoveredHost.where(:type => "Host::Discovered").all.find_each do |host|
|
8
8
|
begin
|
9
9
|
say "Populating attribute set for discovered host #{host.name}"
|
10
10
|
ForemanDiscovery::ImportHooks::DiscoveryAttribute.new(host: host, facts: host.facts_hash).after_populate
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class RemoveOldDiscoveryReaderPermissions < ActiveRecord::Migration[4.2]
|
2
2
|
def up
|
3
|
-
Permission.where("name like '%_discovery_rules' and resource_type is null").
|
3
|
+
Permission.where("name like '%_discovery_rules' and resource_type is null").find_each do |permission|
|
4
4
|
permission.update(:resource_type => 'DiscoveryRule')
|
5
5
|
end
|
6
6
|
end
|