Skip to content

Commit

Permalink
Do not display child services in the services tree
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalis committed Mar 15, 2017
1 parent 2ee6e81 commit 1bc9257
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/service_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def get_node_info(treenodeid)
process_show_list(:where_clause => "ancestry is null")
@right_cell_text = _("Active Services")
else
process_show_list(:where_clause => "retired is true")
process_show_list(:where_clause => "retired is true and ancestry is null")
@right_cell_text = _("Retired Services")
end
else # Get list of child Catalog Items/Services of this node
Expand Down
3 changes: 1 addition & 2 deletions app/presenters/tree_builder_services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ class TreeBuilderServices < TreeBuilder
def tree_init_options(_tree_name)
{
:leaf => "Service",
:full_ids => true,
:add_root => false
}
end
Expand Down Expand Up @@ -37,7 +36,7 @@ def x_get_tree_roots(count_only, _options)
end

def x_get_tree_custom_kids(object, count_only, _options)
services = Rbac.filtered(Service.where(:retired => object[:id] != 'asrv'))
services = Rbac.filtered(Service.where(:retired => object[:id] != 'asrv', :ancestry => [nil, ""]))
if count_only
services.size
else
Expand Down

0 comments on commit 1bc9257

Please sign in to comment.