diff options
Diffstat (limited to 'app/controllers/foreman_params_tab/hosts_controller.rb')
-rw-r--r-- | app/controllers/foreman_params_tab/hosts_controller.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/controllers/foreman_params_tab/hosts_controller.rb b/app/controllers/foreman_params_tab/hosts_controller.rb new file mode 100644 index 0000000..1359329 --- /dev/null +++ b/app/controllers/foreman_params_tab/hosts_controller.rb @@ -0,0 +1,22 @@ +module ForemanParamsTab + class HostsController < ::HostsController + + #before_action :find_resource, :only => [:parameters] + + def parameters + @host = find_resource + render :partial => 'parameters' + rescue ActionView::Template::Error => exception + process_ajax_error exception, 'fetch parameters' + end + + def action_permission + case params[:action] + when 'parameters' + :view + else + super + end + end + end +end |