The modules are used to provide information of different types to the user. All enabled modules are displayed in the top menu bellow the ''Search'' input. The current version of ADEI by default implements: * ''WiKi'' module provides user-defined information about the system and previews of charts * ''Graph'' module is a main ADEI component providing data plots and easy navigation * ''Control'' module provides access to the control information It is possible to register new modules providing additional system-specific information. For this, it is necessary to create module file in ADEI ''modules/'' subdirectory. This file should include 3 mandatory methods (the ''module'' prefix should be replaced with actual module name. For example, for alarms module instead of ''$module_title'', the ''$alarms_tittle'' should be used): * The variable ''module_title'' contains the module name (as it should be shown to the users in menu): {{{$module_title = _("Title of the Module")}}} * The function ''moduleJS'' contains JavaScript initialization code * The function ''modulePage'' contains HTML code of the page Since, the modules are normally dynamically updated during the ADEI execution. The real HTML context should not be set by ''modulesPage'' functions, but provided using services. The ''moduleJS'' function should initialize JavaScript object which will take care of context updating and return the name of this object. When the module is ready it should be enabled in the configuration file ''config.php'' (or in the appropriate ''setup'' if it should be used optionally). The ADEI includes several JavaScript classes providing standard use-cases. They are described bellow. == XML Module == This module uses an ''ADEI service'' generating XML content and XSLT stylesheet to update information on the page. The ''modulePage'' function should just define a single ''div'' element: {{{
Loading...
}}} The ''moduleJS'' function initializes new XMLMODULE object supplying the id of div created in ''modulePage'' function: {{{ module_object = new XMLMODULE("module_div"); }}} and returns the name of created object: {{{ return "module_object"; }}} Complete example (alarms module): {{{ $alarms_title = _("Alarms"); function alarmsJS() { echo 'alarms = new XMLMODULE("alarms_div");'; return "alarms"; } function alarmsPage() { echo '
Loading...
'; } }}}