app/presenters/tree_builder_iso_datastores.rb
class TreeBuilderIsoDatastores < TreeBuilder
has_kids_for Storage, %i[x_get_tree_iso_datastore_kids]
private
def tree_init_options
{:lazy => true}
end
def root_options
{
:text => t = _("All ISO Datastores"),
:tooltip => t
}
end
# Get root nodes count/array for explorer tree
def x_get_tree_roots
count_only_or_objects(false, Storage.supporting(:iso_datastore), "name")
end
def x_get_tree_iso_datastore_kids(object, count_only)
count_only_or_objects(count_only, object.iso_images, "name")
end
end