Adding plugins to your development environment
To add a i2 Notebook plugin to your deployment of i2 Analyze, you must develop an i2 Notebook SDK plugin. For more information about developing plugins, see i2 Notebook SDK.
To use i2 Notebook, you must configure the following:
- To access i2 Notebook, a user must have the
i2:Notebookcommand access control permission. To add thei2:Notebookpermission to thecommand-access-control.xmlfile, see Enabling access to the i2 Notebook web client. The deployment must contain the Chart Store or Information Store. Ensure that the
DEPLOYMENT_PATTERNvariable in the<config_name>/utils/variables.conffile is set to a pattern that includes one of these stores.
For example:DEPLOYMENT_PATTERN="istore"
Process overview:
- Add a plugin to the environment
- Update the config to reference plugins
- Deploy the config
Adding a plugin
An i2 Notebook plugin consists of:
- The plugin manifest, which is a JSON file that contains configuration details.
- The plugin entry point, which is a JavaScript file that is loaded directly into i2 Notebook.
Additionally, a plugin can include:
- HTML pages and associated JavaScript, CSS, or image files that provide a user interface. For more information, see tool views.
- Create a directory for the plug-in inside the
i2a-pluginsdirectory. The name of the directory in the name for the plugin. Do not use spaces or special characters in the name. Copy your plugin files into the directory. The entry point and manifest at the top level in your
<plugin_name>directory. The directory structure is:- i2a-plugins - <plugin_name> - plugin.json - entrypoint.js - ...
Referencing a plugin in a config
In the configuration you want to deploy your plugin with, update the
/configs/<config_name>/configuration/plugin-references.jsonfile and add the name of your plugin in thepluginsarray.
For example, to add the plugin namedexample-plugin, theplugin-references.jsonfile contains the following:{ "plugins": [ { "name": "example-plugin" } ] }
Redeploying
Use the deploy command to deploy the config with the plugin.
deploy
If you have multiple configs, specify the config name with -c <config-name>.