aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/foreman_params_tab/hosts_controller.rb
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-08-10 20:30:42 +0200
committerGuido Günther <agx@sigxcpu.org>2016-08-10 20:41:05 +0200
commit74e39b8ffaeea5ff360e7290a0a90e4e967e46fc (patch)
tree572168a3e007bb95731689d0fbaa709d368b101f /app/controllers/foreman_params_tab/hosts_controller.rb
Initial commitHEADmaster
Diffstat (limited to 'app/controllers/foreman_params_tab/hosts_controller.rb')
-rw-r--r--app/controllers/foreman_params_tab/hosts_controller.rb22
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