Class: Y2Network::Dialogs::Route
- Inherits:
-
CWM::Popup
- Object
- CWM::Popup
- Y2Network::Dialogs::Route
- Defined in:
- src/lib/y2network/dialogs/route.rb
Overview
Dialog to create or edit route.
Instance Method Summary collapse
- #contents ⇒ Object
-
#initialize(route, available_devices) ⇒ Route
constructor
A new instance of Route.
Constructor Details
#initialize(route, available_devices) ⇒ Route
Returns a new instance of Route.
37 38 39 40 41 42 |
# File 'src/lib/y2network/dialogs/route.rb', line 37 def initialize(route, available_devices) log.info "route dialog with route: #{route.inspect} " \ "and devices #{available_devices.inspect}" @route = route @available_devices = available_devices end |
Instance Method Details
#contents ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'src/lib/y2network/dialogs/route.rb', line 44 def contents devices = @available_devices.map(&:name) + [""] MinWidth( 60, VBox( HBox( HWeight(100, Widgets::Destination.new(@route)) ), HBox( HWeight(70, Widgets::Gateway.new(@route)), HSpacing(1), HWeight(30, Widgets::Devices.new(@route, devices)) ), Widgets::RouteOptions.new(@route) ) ) end |