Skip to content

Commit

Permalink
Merge pull request ManageIQ#3435 from hstastna/Filters_Workloads_disp…
Browse files Browse the repository at this point in the history
…lay_until_refresh

Make filters saved in Workloads displayed in accordion
  • Loading branch information
martinpovolny authored Mar 29, 2018
2 parents 755efe4 + e6682ad commit 796d2c5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
21 changes: 19 additions & 2 deletions app/controllers/application_controller/advanced_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,13 @@ def adv_search_redraw_left_div
tree_type = x_active_tree.to_s.sub(/_tree/, '').to_sym
builder = TreeBuilder.class_for_type(tree_type)
tree = builder.new(x_active_tree, tree_type, @sb)
adv_search_redraw_tree_and_main(tree)
return
if tree_for_building_accordions?
@explorer = true
build_accordions_and_trees
else
adv_search_redraw_tree_and_main(tree)
return
end
elsif %w(ems_cloud ems_infra).include?(@layout)
build_listnav_search_list(@view.db)
else
Expand All @@ -204,6 +209,18 @@ def adv_search_redraw_left_div
adv_search_redraw_listnav_and_main
end

def tree_for_building_accordions?
%w(automation_manager_cs_filter_tree
configuration_scripts_tree
images_filter_tree
instances_filter_tree
svcs_tree
storage_tree
templates_filter_tree
vms_filter_tree
vms_instances_filter_tree).include?(x_active_tree.to_s)
end

def adv_search_redraw_search_partials(display_mode = nil)
render :update do |page|
page << javascript_prologue
Expand Down
1 change: 0 additions & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,6 @@ def render_listnav_filename
retired
security_group
service
storage
templates
vm).include?(@layout) && !@in_a_form
"show_list"
Expand Down

0 comments on commit 796d2c5

Please sign in to comment.