
functions
files
intro
|
|
Common widget manipulation, firewall interfaces widget |
modules/CWMFirewallInterfaces.ycp |
| Routines for selecting interfaces opened in firewall |
|
|
|
Imports
- CWM
- Label
- Mode
- NetworkDevices
- Popup
- SuSEFirewall
Global Functions
- CreateInterfacesWidget (map<string,any> settings)
- CreateOpenFirewallWidget (map<string,any> settings)
- DisableOpenFirewallWidget ()
- DisplayDetailsPopup (map<string,any> settings)
- EnableOpenFirewallWidget ()
- InitAllowedInterfaces (list<string> services)
- InterfacesHandle (map<string,any> widget, string key, map event)
- InterfacesHandleWrapper (string key, map event)
- InterfacesInit (map<string,any> widget, string key)
- InterfacesInitWrapper (string key)
- InterfacesStore (map<string,any> widget, string key, map event)
- InterfacesStoreWrapper (string key, map event)
- InterfacesValidate (map<string,any> widget, string key, map event)
- InterfacesValidateWrapper (string key, map event)
- Modified ()
- OpenFirewallHandle (map<string,any> widget, string key, map event)
- OpenFirewallHandleWrapper (string key, map event)
- OpenFirewallHelp (boolean restart_displayed)
- OpenFirewallHelpTemplate (boolean restart_displayed)
- OpenFirewallInit (map<string,any> widget, string key)
- OpenFirewallInitWrapper (string key)
- OpenFirewallModified (string key)
- OpenFirewallStore (map<string,any> widget, string key, map event)
- OpenFirewallStoreWrapper (string key, map event)
- StoreAllowedInterfaces (list<string> services)
Local Variables
Local Functions
|
|
|
|
local all_interfaces -> list<string>
|
|
List of all interfaces relevant for firewall settings
|
local interface_items -> list
|
|
List of all items of interfaces to the selection box
|
local allowed_interfaces -> list<string>
|
|
List of interfaces that are allowed
|
local configuration_changed -> boolean
|
|
Information if configuration was changed by user
|
local EnableOrDisableFirewallDetails () -> void
|
|
Enable or disable the firewall details widget according to the status
of "open firewall" checkbox
|
local SetFirewallLabel (symbol status) -> void
|
|
Set the firewall status label
- Parameters:
|
status |
symbol one of `off, `closed, `open_all, `custom |
|
local InitAllInterfacesList () -> void
|
|
Initialize the list of all known interfaces
|
local UpdateFirewallStatus () -> void
|
|
Update the firewall status label according to the current status
|
local Selected2Opened (list<string> ifaces) -> list<string>
|
|
Get the list of all interfaces that will be selected
- Parameters:
|
ifaces |
a list of interfaces selected by the user |
- Return value:
|
|
a list of interfaces that will be opened |
|
local DisplayFirewallDetailsPopupHandler (map<string,any> widget) -> void
|
|
Display popup with firewall settings details
- Parameters:
|
global InitAllowedInterfaces (list<string> services) -> void
|
|
Initialize the list of allowed interfaces
Changes the internal variables
- Parameters:
|
services |
a list of services |
|
global StoreAllowedInterfaces (list<string> services) -> void
|
|
Store the list of allowed interfaces
Users the internal variables
- Parameters:
|
services |
a list of services |
|
global InterfacesInit (map<string,any> widget, string key) -> void
|
|
Init function of the widget
- Parameters:
|
widget |
|
|
key |
strnig the widget key |
|
global InterfacesHandle (map<string,any> widget, string key, map event) -> symbol
|
|
Handle function of the widget
- Parameters:
|
widget |
|
|
key |
strnig the widget key |
|
event |
map event to be handled |
- Return value:
|
|
for wizard sequencer or nil |
|
global InterfacesStore (map<string,any> widget, string key, map event) -> void
|
|
Store function of the widget
- Parameters:
|
widget |
|
|
key |
strnig the widget key |
|
event |
map that caused widget data storing |
|
global InterfacesValidate (map<string,any> widget, string key, map event) -> boolean
|
|
Validate function of the widget
- Parameters:
|
widget |
|
|
key |
strnig the widget key |
|
event |
map event that caused the validation |
- Return value:
|
|
true if validation succeeded, false otherwise |
|
global InterfacesInitWrapper (string key) -> void
|
|
Init function of the widget
- Parameters:
|
key |
strnig the widget key |
|
global InterfacesHandleWrapper (string key, map event) -> symbol
|
|
Handle function of the widget
- Parameters:
|
key |
strnig the widget key |
|
event |
map event to be handled |
- Return value:
|
|
for wizard sequencer or nil |
|
global InterfacesStoreWrapper (string key, map event) -> void
|
|
Store function of the widget
- Parameters:
|
key |
strnig the widget key |
|
event |
map that caused widget data storing |
|
global InterfacesValidateWrapper (string key, map event) -> boolean
|
|
Validate function of the widget
- Parameters:
|
key |
strnig the widget key |
|
event |
map event that caused the validation |
- Return value:
|
|
true if validation succeeded, false otherwise |
|
global CreateInterfacesWidget (map<string,any> settings) -> map<string,any>
|
|
Get the widget description map
- Parameters:
|
settings |
a map of all parameters needed to create the widget properly
Behavior manipulating functions (mandatory)
- "get_allowed_interfaces" : list() -- function that returns
the list of allowed network interfaces
- "set_allowed_interfaces" : void (list) -- function that sets
the list of allowed interfaces
Additional settings:
- "help" : string -- help to the whole widget. If not specified, generic help
is used (button labels are patched correctly)
|
- Return value:
|
|
the widget description map |
|
global DisplayDetailsPopup (map<string,any> settings) -> symbol
|
|
Display the firewall interfaces selection as a popup
- Parameters:
- Return value:
|
|
return value of the dialog |
|
global OpenFirewallInit (map<string,any> widget, string key) -> void
|
|
Initialize the open firewall widget
- Parameters:
|
widget |
a map describing the whole widget |
|
key |
|
|
global OpenFirewallStore (map<string,any> widget, string key, map event) -> void
|
|
Store function of the widget
- Parameters:
|
widget |
|
|
key |
strnig the widget key |
|
event |
map that caused widget data storing |
|
global OpenFirewallHandle (map<string,any> widget, string key, map event) -> symbol
|
|
Handle the immediate start and stop of the service
- Parameters:
|
widget |
a map describing the widget |
|
key |
strnig the widget key |
|
event |
|
- Return value:
|
global OpenFirewallInitWrapper (string key) -> void
|
|
Init function of the widget
- Parameters:
|
key |
strnig the widget key |
|
global OpenFirewallStoreWrapper (string key, map event) -> void
|
|
Store function of the widget
- Parameters:
|
key |
strnig the widget key |
|
event |
map that caused widget data storing |
|
global OpenFirewallHandleWrapper (string key, map event) -> symbol
|
|
Handle the immediate start and stop of the service
- Parameters:
|
key |
strnig the widget key |
|
event |
|
- Return value:
|
global OpenFirewallModified (string key) -> boolean
|
|
Check if the widget was modified
- Parameters:
|
key |
strnig the widget key |
- Return value:
|
|
true if widget was modified |
|
global EnableOpenFirewallWidget () -> void
|
|
Enable the whole firewal widget
|
global DisableOpenFirewallWidget () -> void
|
|
Disable the whole firewal widget
|
global OpenFirewallHelpTemplate (boolean restart_displayed) -> string
|
|
Get the template for the help text to the firewall opening widget
- Parameters:
|
restart_displayed |
shold be true if "Save and restart" is displayed |
- Return value:
|
|
help text template with %1 and %2 placeholders |
|
global OpenFirewallHelp (boolean restart_displayed) -> string
|
|
Get the help text to the firewall opening widget
- Parameters:
|
restart_displayed |
shold be true if "Save and restart" is displayed |
- Return value:
|
global CreateOpenFirewallWidget (map<string,any> settings) -> map<string,any>
|
|
Get the widget description map of the firewall enablement widget
- Parameters:
|
settings |
a map of all parameters needed to create the widget properly
- "services" : list -- services identifications for the Firewall.ycp
module
- "display_details" : boolean -- true if the details button should be
displayed
- "firewall_details_handler" : symbol () -- function to handle the firewall
details button. If returns something else than nil, dialog is
exited with the returned symbol as value for wizard sequencer.
If not specified, but "display_details" is true, common popup
is used.
- "open_firewall_checkbox" : string -- label of the check box
- "firewall_details_button" : string -- label of the push button for
changing firewall details
- "help" : string -- help to the widget. If not specified, generic help
is used
|
- Return value:
|
|
the widget description map |
|
global Modified () -> boolean
|
|
Check if settings were modified by the user
- Return value:
|
|
true if settings were modified |
|