ManageIQ/manageiq-ui-classic

View on GitHub
app/presenters/tree_builder_resource_pools.rb

Summary

Maintainability
A
0 mins
Test Coverage
F
42%
class TreeBuilderResourcePools < TreeBuilderAlertProfileAssign
  ANCESTRY_TYPE = ResourcePool

  def override(node, object)
    node.selectable = false
    node.checkable = true if object.kind_of?(ResourcePool)
    node.hide_checkbox = true unless object.kind_of?(ResourcePool)
    node.checked = @selected_nodes&.include?("ResourcePool_#{object[:id]}")
  end
end