YaST2 Developers Documentation: Configuration of http-server

Configuration of http-server

modules/HttpServerWidgets.ycp
Widgets used by HTTP server configuration
  • Jiri Srain
  • Stanislav Visnovsky

This module has an unstable interface.

This module is for internal use only.

Imports

  • Arch
  • CWMFirewallInterfaces
  • CWMServiceStart
  • Confirm
  • DNS
  • Directory
  • DnsServerAPI
  • FileUtils
  • Hostname
  • HttpServer
  • IP
  • IP
  • Label
  • LogView
  • Map
  • Mode
  • Package
  • PackageSystem
  • Popup
  • Punycode
  • Report
  • Service
  • String
  • SuSEFirewall
  • TablePopup
  • YaST::HTTPDData

Includes

  • http-server/helps.ycp

Global Variables

Global Functions

Local Functions

local CheckCommonServerCertificate () -> boolean

Validate certificate

Return value:
certificate valid
global get_host_value (string keyword, list< map<string, any> > host, any defaultvalue) -> any

Get host value

Parameters:
keyword string
host list< map >
defaultvalue any
Return value:
host value
global set_host_value (string keyword, list< map<string, any> > host, any value) -> list< map<string,any> >

Set host value

Parameters:
keyword string
host list< map >
value any
Return value:
host map
global validate_servername (string value) -> boolean

Validate server name

Parameters:
value
Return value:
valid servername
global validate_serverip (any id, any key, map event) -> boolean

Validate IP for host

Parameters:
id any
key any
event map
Return value:
is IP valid
global validate_server (string hostid, list < map<string,any> > server) -> boolean

Function for validate server entries

Parameters:
hostid string
server list < map >
Return value:
valid server
global ReloadServer () -> void

Reload server

local showAccessLogPopup (any key, map event) -> symbol

Handle function of the access log button (the first defined access log file)

Parameters:
key any key of the widget
event map event that occured
Return value:
value for wizard sequencer, always nil
local showErrorLogPopup (any key, map event) -> symbol

Handle function of the error log button

Parameters:
key any key of the widget
event map event that occured
Return value:
value for wizard sequencer, always nil
local OverviewHandle (string table, map event) -> symbol

Handle overview (listen) widget

Parameters:
table string
event map
Return value:
(access/error popup)
local AskNewInfo (string servername, string ip) -> map<string,string>

Parameters:
servername string
ip string
Return value:
servername:ip
global HostsContents (map descr) -> list

Hosts contents

Parameters:
descr map
Return value:
host list
global HostsDelete (any opt_id, string opt_key) -> boolean

Widget for delete host

Parameters:
opt_id any
opt_key string
Return value:
delete success
global HostName (any key, string id) -> string

Get server name for host

Parameters:
key any
id string
Return value:
server name
global HostDocumentRootSummary (any key, string id) -> string

Get document root for host

Parameters:
key any
id string
Return value:
document root
global HostIsDefault (any widget, string key) -> boolean

Is that host default?

Parameters:
widget any
key string
Return value:
is_default?
global HostsHandle (string table, map event) -> symbol

Handle host widget

Parameters:
table string
event map
Return value:
(`add, `edit)
global HostsInit (string widget) -> void

Initialize hosts table widget

Parameters:
widget string
global popups -> map<string,map>

Map of popups for CWM

global HostInit (string key) -> void

Initialize host widget

Parameters:
key string
global getHostOptions (boolean mainhost) -> map

Get host options

Parameters:
mainhost
Return value:
host options
local getSSLOptions () -> map

Get SSL options

Return value:
ssl options
global DirInit (string widget) -> void

Initialize directory table

Parameters:
widget string
global getDirOptions () -> map

Get directory options

Return value:
directory options
global handleDirTable (string key, map event) -> symbol

Handle directory table

Parameters:
key string
event map
Return value:
tablehandle
global DirPopupInit (any option_id, string option_type) -> void

Initialize directory popup

Parameters:
option_id any
option_type string
global DirStore (string key, map event) -> void

Store directory map

Parameters:
key string
event map
global widgets -> map<string, map <string, any> >

Map of widgets for CWM

global handleSSLTable (string key, map event) -> symbol

Handle SSL widget table

Parameters:
key string
event map
Return value:
sslhandle
global SSLInit (string widget) -> void

Initialize SSL widget

Parameters:
widget string
global SSLStore (string key, map event) -> void

Store SSL setting

Parameters:
key string
event map
global listen2item (map<string,any> arg, integer id) -> term

Convert a Listen string to an item for table. Splits by the colon.

Parameters:
arg the Listen map
id the id of this item
Return value:
term for the table
local AskListen (string network, string port) -> map<string,string>

Show a popup for editing Listen statement.

Parameters:
network string initial value for the network part of the statement If empty or _("All Addresses"), considered for all Listen for all interfaces.
port string initial value for a port number
Return value:
the new Listen statement or nil if Cancel was pressed
global validate_server_fnc (string id, map key) -> boolean

Validate server function

Parameters:
id string
key map
Return value:
validate
global HostId2Key (map desc, any option_id) -> string

Get value from id

Parameters:
desc map
option_id any
Return value:
value
local checkLoadedModuleFor (string new) -> void

find modules of all directives and check if are loaded

Parameters:
new string
global HostStore (string key, map event) -> void

Store host settings

Parameters:
key string
event map
global setHostOptions (map < integer, map < string,any > > new_options) -> void

Set host options

Parameters:
new_options map < integer, map < string,any > >
global HostTableContents (map descr) -> list

Function for getting contents of the default host table

Parameters:
descr map description map of the table
Return value:
of items for the table
global SSLTableContents (map descr) -> list

Function for getting contents of the default host table

Parameters:
descr map description map of the table
Return value:
of items for the table
global HostTableEntryDelete (any opt_id, string opt_key) -> boolean

Delete function of the global table

Parameters:
opt_id any option id of selected option
opt_key any option key of selected option
Return value:
true if was really deleted
global handleHostTable (string key, map event) -> symbol

Handler for editing default host. Handles additional buttons, like logs and modules. Rest is passed to TablePopup::TableHandle.

Parameters:
key the key modified
event event description
Return value:
the result of the handling
global DefaultHostPopupInit (any option_id, string option_type) -> void

Fallback initialization function of a table entry / popup

Parameters:
option_id any unique option id
option_type string the name of the key in the option list description
global DefaultHostPopupStore (any option_id, string option_type) -> void

Fallback store function of a table entry / popup

Parameters:
option_id any option id
option_type string option key
global HostTableEntrySummary (any option_id, string option_type) -> string

Fallback summary function of a table entry / popup

Parameters:
option_id any option unique id
option_type string option type
Return value:
table entry summary
global SSLTypeStore (any option_id, string option_type) -> void

Store SSL type

Parameters:
option_id any
option_type string
global DirTableContents (map descr) -> list

Contents of host table

Parameters:
descr map
Return value:
host contents
global initModules (string key) -> void

Initialize function of a widget

Parameters:
key any widget key of widget that is processed
global handleModules (string key, map event) -> symbol

Handle function of a widget

Parameters:
key any widget key of widget that is processed
event any event that occured
Return value:
symbol for WS or nil
global initListenSettings (string key) -> void

Initialize function of a widget

Parameters:
key any widget key of widget that is processed
global handleListenSettings (string key, map event) -> symbol

Handle function of a widget

Parameters:
key any widget key of widget that is processed
event map event that occured
Return value:
symbol for WS or nil
global initServiceStatus (string key) -> void

Initialize function of a widget

Parameters:
key any widget key of widget that is processed
global storeServiceStatus (string key, map event) -> void

Store function of a widget

Parameters:
key any widget key of widget that is processed
event map event that occured
global handleServiceStatus (string key, map event) -> symbol

Handling service status

Parameters:
key string
event map
Return value:
(`overview_table, `edit. `menu)
global initOpenPort (string key) -> void

Initialize open port

Parameters:
key string
global handleOpenPort (string key, map event) -> symbol

Handling open port

Parameters:
key string
event map
Return value:
nil
global validateOpenPort (string key, map event) -> boolean

Validation open port

Parameters:
key string
event string
Return value:
validate open port
global initListenInterfaces (string key) -> void

Initialize listen interfaces

Parameters:
key string
global validateListenInterfaces (string key, map event) -> boolean

Parameters:
key string
event map
Return value:
validate interfaces
local initScriptModules (string key) -> void

Initialization of checkboxes

Parameters:
key string
global handleExpertConf (string key, map event) -> symbol

Handler for expert configuration

Parameters:
key string
event map
Return value:
(nil, `expert)
local getServiceAutoStart () -> boolean

Get service start

Return value:
status boolean
local setServiceAutoStart (boolean status) -> void

Set service start

Parameters:
status boolean
local initSummaryText (string key) -> void

Initialize widget with summary text

Parameters:
key string