Class: Y2Network::Presenters::S390GroupDeviceSummary
- Inherits:
-
Object
- Object
- Y2Network::Presenters::S390GroupDeviceSummary
- Includes:
- InterfaceStatus, Yast::I18n
- Defined in:
- src/lib/y2network/presenters/s390_group_device_summary.rb
Overview
This class converts a connection config configuration object into a string to be used in an AutoYaST summary or in a table.
Instance Attribute Summary collapse
- #name ⇒ String readonly
Instance Method Summary collapse
-
#initialize(name, config) ⇒ S390GroupDeviceSummary
constructor
Constructor.
- #text ⇒ Object
Methods included from InterfaceStatus
Constructor Details
#initialize(name, config) ⇒ S390GroupDeviceSummary
Constructor
40 41 42 43 44 |
# File 'src/lib/y2network/presenters/s390_group_device_summary.rb', line 40 def initialize(name, config) textdomain "network" @name = name @config = config end |
Instance Attribute Details
#name ⇒ String (readonly)
34 35 36 |
# File 'src/lib/y2network/presenters/s390_group_device_summary.rb', line 34 def name @name end |
Instance Method Details
#text ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'src/lib/y2network/presenters/s390_group_device_summary.rb', line 46 def text device = @config.s390_devices.by_id(@name) hardware = device.hardware descr = hardware ? hardware.description : "" rich = Yast::HTML.Bold(descr) + "<br>" rich << "<b>ID: </b>" << device.id << "<br>" rich << "<b>Type: </b>" << device.type.short_name << "<br><br>" rich << "<p>" rich << _("The device is not enable. Press <b>Edit</b>\nto enable it.\n") rich << "</p>" rich end |