Technical¶
Components in the Add-on Installer¶
The following components are included in the add-on installer:
- Web components
- Installer config
- Internal endpoints
Web Components¶
The add-on installer contains the web components to show the installer config form and the installation dialog. These components are automatically rendered in Lime Admin after successfully implementing it in an add-on as described here.
Installer Config¶
The installer config is stored in Lime Data under the key addon_installer_config
. The installer config is saved there to make it possible to populate the default value for corresponding properties in the runtime configuration. The add-on installer's BaseInstaller
class contains functions that can be used to fetch values from the installer config.
How the installer config works is described here.
Internal Endpoints¶
The following endpoints are used in this add-on:
Install¶
POST¶
/install/
This endpoint can both be used for analyzing and installing.
Analyze:
If is_analyze
is true
, an analysis is performed of the changes resulting from the installation data being applied to the database. The changes won't actually be applied.
If is_analyze
is false
the installation data will be applied to the database.
Payload:
{
installation_module: "<path/to/database-structure/module>",
storage_key: "<storage-key>",
installation_config: dict,
is_analyze: bool
}
Response:
{
"database_structure": {
"tables": [
{
"view": {}
}
],
"fields": [],
"relations": [],
"installed": true/false,
"views_installed": true/false
},
"security": {
"users": [],
"groups": [],
"installed": true/false
}
}