app/presenters/tree_builder_pxe_customization_templates.rb
def x_get_tree_custom_kids(object, count_only, _options)
    nodes = object[:full_id] ? object[:full_id].split('-') : object[:id].split('-')
    pxe_img_id = if nodes[1] == "system" || nodes[2] == "system"
                   # root node was clicked or if folder node was clicked
                   # System templates
                   nil
                 else
                   # root node was clicked or if folder node was clicked
                   get_pxe_image_id(nodes)
                 end
    objects = CustomizationTemplate.where(:pxe_image_type_id => pxe_img_id)
    count_only_or_objects(count_only, objects, "name")
  end
# Handle custom tree nodes (object is a Hash)
Handle custom tree nodes (object is a Hash)
Handle custom tree nodes ( object is a Hash )
def x_get_tree_custom_kids(object, count_only, _options)
    nodes = object[:full_id] ? object[:full_id].split('-') : object[:id].split('-')
    pxe_img_id = if nodes[1] == "system" || nodes[2] == "system"
                   nil
                 else
                   get_pxe_image_id(nodes)
                 end
    objects = CustomizationTemplate.where(:pxe_image_type_id => pxe_img_id)
    count_only_or_objects(count_only, objects, "name")
  end
def x_get_tree_custom_kids ( object , count_only , _options ) nodes = object [ :full_id ] ? object [ :full_id ] . split ( '-' ) : object [ :id ] . split ( '-' ) pxe_img_id = if nodes [ 1 ] == "system" || nodes [ 2 ] == "system" nil else get_pxe_image_id ( nodes ) end objects = CustomizationTemplate . where ( :pxe_image_type_id => pxe_img_id ) count_only_or_objects ( count_only , objects , "name" ) end
Handle custom tree nodes (object is a Hash)
Handle custom tree nodes ( object is a Hash )
# root node was clicked or if folder node was clicked # System templates # root node was clicked or if folder node was clicked
object
count_only
_options