regPluginBlock({
settings
});
settings. JSON object with parameters for plugin registration.
The following parameters are available:
Parameter name | Type | Brief description |
Mandatory parameters: | ||
Id | string | Plugin block identifier. |
Name | string | Plugin block name. |
View | string | Visualizer class name. |
Master | string | Master class name. |
Js | string | Path to *.js file for dynamic loading of script with plugin implementation. |
Optional parameters: | ||
Icon | string | Path to plugin icon (16*16). |
SourceClass | number | Value of data source object type for object filtering on data source selection. The default value is 2827 - Time series analysis. If the value is not set (null) or is equal to -1, the plugin does not use data source. |
Props | object | Additional plugin parameters for setting default values. |
The regPluginBlock method registers plugin of dashboard.
It is used to connect plugin to dashboard in the web application.
To register plugin:
Make sure that the *.js file of the plugin contains a registration block.
Open the dashboard in the web application.
Execute the Kap.regPluginBlock method in the browser console:
Kap.regPluginBlock({
Id: "SOURCELABEL", //id that is used to link plugin block with its implementation
Name: "Sourcelabel", //block type name
View: "PP.Ui.MyLabel", //visualizer class or visualizer class name
Master: "PP.Ui.MyMaster", //master class or master class name
Icon: "../build/img/app/MainIcon.png", //path to plugin icon (16*16), optional parameter
SourceClass: 2561, //data source class code; if it is not set, dashboard designer will not provide data source for plugin
Js: "http://test/fp_App_v10.x/plugins/SourceLabel.js " //for dynamic loading of script with plugin implementation
});
After executing the operations the plugin is registered in the web application and connected during method call.
IMPORTANT. When the plugin is registered, all dashboard settings changes are valid until the browser page is refreshed.
The method use is given in the Comments section.
See also: