Changes between Version 4 and Version 5 of adeiNewModule

Show
Ignore:
Author:
csa (IP: 141.52.232.84)
Timestamp:
07/16/09 17:53:19 (15 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • adeiNewModule

    v4 v5  
    1 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: 
    2  * ''WiKi'' module provides user-defined information about the system and previews of charts 
    3  * ''Graph'' module is a main ADEI component providing data plots and easy navigation 
     1The modules are used to provide various information to the user. All enabled modules are displayed in the top menu bellow the ''Search'' input. The current version of ADEI by default implements: 
     2 * ''WiKi'' module provides user-defined information about the system and preview charts 
     3 * ''Graph'' module is a main ADEI component providing data plots and easy navigation capabilities 
    44 * ''Control'' module provides access to the control information 
    55 
    6 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 file name without php extension, called the module name. For example, for alarms module instead of ''$module_title'', the ''$alarms_tittle'' should be used): 
     6It is possible to register new modules which will provide additional setup-specific information. First, the name of the module should be defined. Then, it is necessary to create a module initialization file (''module_name.php'') in ADEI ''modules/'' subdirectory. This file should include 3 mandatory methods (the ''module'' prefix must be replaced with the module name. For example, for alarms module instead of ''$module_title'', the ''$alarms_tittle'' should be used): 
    77 * The variable ''module_title'' contains the module name (as it should be shown to the users in menu): 
    88    {{{$module_title = _("Title of the Module")}}} 
    1313object.  
    1414 
    15 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). 
     15When the module is ready it should be enabled in the configuration file ''config.php'' (or in the appropriate ''setup''). 
    1616 
    1717The ADEI includes several JavaScript classes providing standard use-cases. They are described bellow. 
    3838}}} 
    3939 
    40 By default, the service ''module_name'' is used to obtain XML document and stylesheet ''module_name'' 
    41 is used to covert XML into the HTML. The service should reside in the ''services/'' subdirectory (read about creating services [wiki:adeiNewService here]). The XSLT stylesheet should be placed in the ''xslt'' folder. However, it is possible to have more elaborated service configuration. For that it is necessary to define special ''update'' service. This service should be created in ''services/update'' directory and be named ''module_name.php''. It should contain a single function, called ''ADEIServiceGetUpdateInfo'', which accept a ''REQUEST'' object as a parameter and return associative array with two elements: 
    42  * ''xml'' - specifying the full URL of update service along with all properties (the current options could be obtained and modified using ''GetQueryString'' method of ''REQUEST'' object, see example bellow) 
     40By default, the service ''module_name.php'' is used to obtain XML document and stylesheet ''module_name.xsl''is used to covert XML into the HTML. The service should reside in the ''services/'' subdirectory (read about creating services [wiki:adeiNewService here]). The XSLT stylesheet should be placed in the ''xslt'' folder. However, it is possible to have more elaborated service configuration. For that it is necessary to define special ''update'' service. This service should be created in ''services/update'' directory and be named ''module_name.php''. It should contain a single function, called ''ADEIServiceGetUpdateInfo'', which accept a ''REQUEST'' object as a parameter and return associative array with two elements: 
     41 * ''xml'' - specifying the full URL of the ADEI service along with all properties (the current options could be obtained and modified using ''GetQueryString'' method of ''REQUEST'' object, see example bellow) 
    4342 * ''xslt'' - specifying the name of XSLT stylesheet (without extension) 
    4443 
    45 The function is executed on each update and, therefore, can dinamically select the appropriate service depending on some of request parameters. 
     44The function is executed on each update and, therefore, can dynamically select the appropriate service depending on some of request parameters. 
    4645 
    47 Example, the ''alarams'' update service (it uses ''control.php'' service to get XML data and adds two additional parameters to the REQUEST properties): 
     46Example, the ''alarms'' update service (it uses ''control.php'' service to get XML data and adds two additional parameters to the REQUEST properties): 
    4847{{{ 
    4948  function ADEIServiceGetUpdateInfo(REQUEST $req) {