diff --git a/app/controllers/provider_foreman_controller.rb b/app/controllers/provider_foreman_controller.rb index 37e2f06879b..827bf706111 100644 --- a/app/controllers/provider_foreman_controller.rb +++ b/app/controllers/provider_foreman_controller.rb @@ -448,18 +448,20 @@ def explorer if params[:button] @miq_after_onload = "miqAjax('/#{controller_name}/x_button?pressed=#{params[:button]}');" end + + build_accordions_and_trees + params.instance_variable_get(:@parameters).merge!(session[:exp_parms]) if session[:exp_parms] # Grab any explorer parm overrides session.delete(:exp_parms) @in_a_form = false + if params[:id] # If a tree node id came in, show in one of the trees nodetype, id = params[:id].split("-") # treebuilder initializes x_node to root first time in locals_for_render, # need to set this here to force & activate node when link is clicked outside of explorer. @reselect_node = self.x_node = "#{nodetype}-#{to_cid(id)}" + get_node_info(x_node) end - - build_accordions_and_trees - render :layout => "application" end diff --git a/app/controllers/service_controller.rb b/app/controllers/service_controller.rb index 615bf53a874..34ac25cf7ec 100644 --- a/app/controllers/service_controller.rb +++ b/app/controllers/service_controller.rb @@ -74,13 +74,14 @@ def explorer return end + build_accordions_and_trees + if params[:id] # If a tree node id came in, show in one of the trees nodetype, id = params[:id].split("-") self.x_node = "#{nodetype}-#{to_cid(id)}" + get_node_info(x_node) end - build_accordions_and_trees - params.instance_variable_get(:@parameters).merge!(session[:exp_parms]) if session[:exp_parms] # Grab any explorer parm overrides session.delete(:exp_parms) @in_a_form = false