Class: Y2Remote::Widgets::RemoteFirewall

Inherits:
CWM::CustomWidget
  • Object
show all
Defined in:
src/lib/y2remote/widgets/remote.rb

Overview

Widget for opening VNC services in the firewall

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRemoteFirewall

Constructor


182
183
184
185
186
187
188
# File 'src/lib/y2remote/widgets/remote.rb', line 182

def initialize
  textdomain "network"
  @cwm_interfaces = Yast::CWMFirewallInterfaces.CreateOpenFirewallWidget(
    "services"        => services,
    "display_details" => true
  )
end

Instance Attribute Details

#cwm_interfacesObject

Returns the value of attribute cwm_interfaces


179
180
181
# File 'src/lib/y2remote/widgets/remote.rb', line 179

def cwm_interfaces
  @cwm_interfaces
end

Instance Method Details

#contentsObject


198
199
200
# File 'src/lib/y2remote/widgets/remote.rb', line 198

def contents
  cwm_interfaces["custom_widget"]
end

#handle(event) ⇒ Object


206
207
208
# File 'src/lib/y2remote/widgets/remote.rb', line 206

def handle(event)
  Yast::CWMFirewallInterfaces.OpenFirewallHandle(cwm_interfaces, "", event)
end

#helpObject


202
203
204
# File 'src/lib/y2remote/widgets/remote.rb', line 202

def help
  cwm_interfaces["help"] || ""
end

#initObject


194
195
196
# File 'src/lib/y2remote/widgets/remote.rb', line 194

def init
  Yast::CWMFirewallInterfaces.OpenFirewallInit(cwm_interfaces, "")
end

#optObject


190
191
192
# File 'src/lib/y2remote/widgets/remote.rb', line 190

def opt
  [:notify]
end

#storeObject

Applies the configuration of the vnc services according to the allowed interfaces.


212
213
214
# File 'src/lib/y2remote/widgets/remote.rb', line 212

def store
  Yast::CWMFirewallInterfaces.StoreAllowedInterfaces(services)
end