ManageIQ/manageiq-ui-classic

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

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module TreeNode
  class ExtManagementSystem < Node
    set_attribute(:tooltip) do
      # # TODO: This should really leverage .base_model on an EMS
      prefix_model = case @object
                     when EmsCloud then "EmsCloud"
                     when EmsInfra then "EmsInfra"
                     else               "ExtManagementSystem"
                     end
      "#{ui_lookup(:model => prefix_model)}: #{@object.name}"
    end
  end
end