diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 86a8b2a9..d805e4b5 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -12,7 +12,7 @@ jobs: uses: theforeman/actions/.github/workflows/rubocop.yml@v0 with: command: bundle exec rubocop --parallel --format github - + test: name: Ruby needs: rubocop diff --git a/app/views/discovered_hosts/welcome.html.erb b/app/views/discovered_hosts/welcome.html.erb index a31c0bb8..e9468ec5 100644 --- a/app/views/discovered_hosts/welcome.html.erb +++ b/app/views/discovered_hosts/welcome.html.erb @@ -1,10 +1,3 @@ -<% content_for(:javascripts) do %> - <%= webpacked_plugins_js_for :'foreman_discovery' %> -<% end %> -<% content_for(:stylesheets) do %> - <%= webpacked_plugins_css_for :'foreman_discovery' %> -<% end %> - <% content_for(:title, _("Discovered Hosts")) %> <% content_for(:content) do %> diff --git a/app/views/discovery_rules/welcome.html.erb b/app/views/discovery_rules/welcome.html.erb index c085f50f..d7c1d7b8 100644 --- a/app/views/discovery_rules/welcome.html.erb +++ b/app/views/discovery_rules/welcome.html.erb @@ -1,10 +1,3 @@ -<% content_for(:javascripts) do %> - <%= webpacked_plugins_js_for :'foreman_discovery' %> -<% end %> -<% content_for(:stylesheets) do %> - <%= webpacked_plugins_css_for :'foreman_discovery' %> -<% end %> - <% content_for(:title, _("Discovered Rules")) %> <% content_for(:content) do %> diff --git a/lib/foreman_discovery/engine.rb b/lib/foreman_discovery/engine.rb index 0326130f..d44b02cf 100644 --- a/lib/foreman_discovery/engine.rb +++ b/lib/foreman_discovery/engine.rb @@ -75,11 +75,10 @@ class Engine < ::Rails::Engine setting "discovery_hostname", type: :array, default: ["discovery_bootif"], + validate: { presence: true }, full_name: N_("Hostname facts"), description: N_("List of facts to use for the hostname (first wins)") - validates "discovery_hostname", presence: true - setting "discovery_auto", type: :boolean, default: false, @@ -95,11 +94,10 @@ class Engine < ::Rails::Engine setting "discovery_prefix", type: :string, default: "mac", + validate: { presence: true }, full_name: N_("Hostname prefix"), description: N_("The default prefix to use for the host name, must start with a letter") - validates "discovery_prefix", presence: true - setting "discovery_fact_column", type: :array, default: [],