ManageIQ/manageiq-ui-classic

View on GitHub
app/presenters/tree_node/service_template_catalog.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module TreeNode
  class ServiceTemplateCatalog < Node
    set_attribute(:text) do
      if @object.tenant.present? && @object.tenant.ancestors.present?
        "#{@object.name} (#{@object.tenant.name})"
      else
        @object.name
      end
    end
  end
end