ManageIQ/manageiq-ui-classic

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

Summary

Maintainability
A
0 mins
Test Coverage
B
85%
module TreeNode
  class MiqScsiTarget < Node
    set_attributes(:text, :tooltip) do
      text = if @object.iscsi_name.blank?
               _("SCSI Target %{target}") % {:target => @object.target}
             else
               _("SCSI Target %{target} (%{name})") % {:target => @object.target, :name => @object.iscsi_name}
             end
      [text, _("Target: %{text}") % {:text => text}]
    end
  end
end