
functions
files
intro
|
|
Common widget manipulation, service start widget |
modules/CWMServiceStart.ycp |
| Routines for service start widget handling |
|
|
|
Imports
- CWM
- Mode
- ProductFeatures
- Service
Global Functions
- AutoStartHelp ()
- AutoStartHelpTemplate ()
- AutoStartInit (map<string,any> widget, string key)
- AutoStartInitWrapper (string key)
- AutoStartStore (map<string,any> widget, string key, map event)
- AutoStartStoreWrapper (string key, map event)
- CreateAutoStartWidget (map<string,any> settings)
- CreateLdapWidget (map<string,any> settings)
- CreateStartStopWidget (map<string,any> settings)
- EnableLdapHelp ()
- EnableLdapHelpTemplate ()
- LdapHandle (map<string,any> widget, string key, map event)
- LdapHandleWrapper (string key, map event)
- LdapInit (map<string,any> widget, string key)
- LdapInitWrapper (string key)
- StartStopHandle (map<string,any> widget, string key, map event)
- StartStopHandleWrapper (string key, map event)
- StartStopHelp (boolean restart_displayed)
- StartStopHelpTemplate (boolean restart_displayed)
- StartStopInit (map<string,any> widget, string key)
- StartStopInitWrapper (string key)
Local Variables
Local Functions
|
|
|
|
local service_is_running -> string
|
|
Label saying that service is running
|
local service_is_stopped -> string
|
|
Label saying that service is stopped
|
local last_status -> boolean
|
|
Last status of the service
|
local UpdateServiceStatusWidget (map<string,any> widget) -> void
|
|
Update the displayed status of the service
- Parameters:
|
widget |
a map describing the widget |
|
local UpdateLdapWidget (map<string,any> widget) -> void
|
|
Update the widget displaying if LDAP support is active
- Parameters:
|
widget |
a map describing the widget |
|
local HandleLdap (map<string,any> widget, any event_id) -> void
|
|
Handle the "Use LDAP" check box
- Parameters:
|
widget |
a map describing the widget
param event_id any the ID of the occurred event |
|
event_id |
|
|
global AutoStartInit (map<string,any> widget, string key) -> void
|
|
Init function of the widget
- Parameters:
|
widget |
|
|
key |
strnig the widget key |
|
global AutoStartStore (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 AutoStartInitWrapper (string key) -> void
|
|
Init function of the widget
- Parameters:
|
key |
strnig the widget key |
|
global AutoStartStoreWrapper (string key, map event) -> void
|
|
Store function of the widget
- Parameters:
|
key |
strnig the widget key |
|
event |
map that caused widget data storing |
|
global AutoStartHelpTemplate () -> string
|
|
Get the template for the help text to the auto start widget
- Return value:
|
|
help text template with %1 and %2 placeholders |
|
global AutoStartHelp () -> string
|
|
Get the help text to the auto start widget
- Return value:
|
global CreateAutoStartWidget (map<string,any> settings) -> map<string,any>
|
|
Get the widget description map of the widget for service auto starting
settings
- Parameters:
|
settings |
a map of all parameters needed to create the widget properly
- "get_service_auto_start" : boolean () -- function that returns if the
service is set for automatical start-up
- "set_service_auto_start" : void (boolean) -- function that takes as
an argument boolean value saying if the service is started
automatically during booting
- "start_auto_button" : string -- label of the radio button to start
the service automatically when booting
- "start_manual_button" : string -- label of the radio button to start
the service only manually
- "help" : string -- custom help for the widget. If not specified, generic
help is used
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 StartStopHandle (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 StartStopInit (map<string,any> widget, string key) -> void
|
|
Init function of the widget
- Parameters:
|
widget |
|
|
key |
strnig the widget key |
|
global StartStopHandleWrapper (string key, map event) -> symbol
|
|
Handle the immediate start and stop of the service
- Parameters:
|
key |
strnig the widget key |
|
event |
|
- Return value:
|
global StartStopInitWrapper (string key) -> void
|
|
Init function of the widget
- Parameters:
|
key |
strnig the widget key |
|
global StartStopHelpTemplate (boolean restart_displayed) -> string
|
|
Get the template for the help text to the start/stop widget
- Parameters:
|
restart_displayed |
shold be true if "Save and restart" is displayed |
- Return value:
|
|
help text template with %1 and %2 placeholders |
|
global StartStopHelp (boolean restart_displayed) -> string
|
|
Get the help text to the start/stop widget
- Parameters:
|
restart_displayed |
shold be true if "Save and restart" is displayed |
- Return value:
|
global CreateStartStopWidget (map<string,any> settings) -> map<string,any>
|
|
Get the widget description map for immediate service start/stop
and appropriate actions
- Parameters:
|
settings |
a map of all parameters needed to create the widget properly
- "service_id" : string -- service identifier for Service:: functions.
If not specified, immediate actions buttons are not displayed.
- "save_now_action" : void () -- function that causes saving of all settings
and restarting the service. If key is missing, the button
is not displayed
- "start_now_action" : void () -- function that causes starting the service
If not specified, generic function using "service_id" is used
instead
- "stop_now_action" : void () -- function that causes stopping the service
If not specified, generic function using "service_id" is used
instead
- "service_running_label" : string -- label to be displayed if the service
is running.
- "service_not_running_label" : string -- label to be displayed if the
service is stopped.
- "start_now_button" : string -- label for the push button for immediate
service start
- "stop_now_button" : string -- label for the push button for immediate
service stop
- "save_now_button" : string -- label for the push button for immediate
settings saving and service restarting
- "help" : string -- help to the widget. If not specified, generic help
is used (button labels are patched correctly)
|
- Return value:
|
|
the widget description map |
|
global LdapInit (map<string,any> widget, string key) -> void
|
|
Init function of the widget
- Parameters:
|
widget |
|
|
key |
strnig the widget key |
|
global LdapHandle (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 LdapInitWrapper (string key) -> void
|
|
Init function of the widget
- Parameters:
|
key |
strnig the widget key |
|
global LdapHandleWrapper (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 EnableLdapHelpTemplate () -> string
|
|
Get the template for the help text to the LDAP enablement widget
- Return value:
|
|
help text template with %1 and %2 placeholders |
|
global EnableLdapHelp () -> string
|
|
Get the help text to the LDAP enablement widget
- Return value:
|
global CreateLdapWidget (map<string,any> settings) -> map<string,any>
|
|
Get the widget description map of the LDAP enablement widget
TODO: Find a file to move to
- Parameters:
|
settings |
a map of all parameters needed to create the widget properly
LDAP support:
- "get_use_ldap" : boolean () -- function to return current status
of the LDAP support. If not set, LDAP check-box is not shown.
- "set_use_ldap" : void (boolean) -- function to set the LDAP usage
and report errors in case of fails. Status will be rechecked
via "get_use_ldap". If not set, LDAP check-box is not shown.
- "use_ldap_checkbox" : string -- label of the chcek box to set if LDAP
support is active.
- "help" : string -- help to the widget. If not specified, generic help
is used (button labels are patched correctly)
|
- Return value:
|
|
the widget description map |
|