49.5. External components
In Business Central, you can add external components to a page. The components are disabled by default. To enable the external components, change the value of dashbuilder.components.enable system property to true.
The external component location is set and configured with the dashbuilder.components.dir system property. The default value of this system property is /tmp/dashbuilder/components. You must set the component under the components directory with a parent directory, which is used as the component ID. For example, if the component ID is mycomp and the component directory is /tmp/dashbuilder/components, then the component base directory is /tmp/dashbuilder/components/mycomp.
Business Central checks the manifest.json file in the components directory. The manifest.json must contain at least one name text parameter.
| Parameter | Description |
|---|---|
|
| Name of the component displayed under Components section. |
|
| Icon of the component displayed under Components section. |
|
| A flag that indicates that the component does not require a data set. |
|
|
The list of parameters are using |
Sample manifest.json file
{
"name": "Heat Map Experiment",
"icon": "fa fa-bell-o",
"parameters": [
{
"name": "svg",
"type": "text",
"defaultValue": "",
"label": "SVG XML",
"category": "SVG Content"
"mandatory": true
},
{
"name": "svgUrl",
"type": "text",
"defaultValue": "",
"label": "SVG URL",
"category": "SVG URL"
"mandatory": true
}
,
{
"name": "ksProcessId",
"type": "text",
"defaultValue": "",
"label": "Process ID",
"category": "Kie Server"
"mandatory": true
}
]
}
49.5.1. Creating external components リンクのコピーリンクがクリップボードにコピーされました!
The following procedure describes how to create and add the external components to a page:
Procedure
Set the component under components directory with a parent directory.
For example, if the component ID is
mycompand the component directory is/tmp/dashbuilder/components, then the component base directory is/tmp/dashbuilder/components/mycomp.-
Create the
manifest.jsonfile in the component directory. -
Create
index.htmlfile with HTML content. -
In a terminal application, navigate to
EAP_HOME/bin. To enable the external components, set the value of
dashbuilder.components.enablesystem property totrue:$ ~/EAP_HOME/bin/standalone.sh -c standalone-full.xml -Ddashbuilder.components.dir={component directory base path} -Ddashbuilder.components.enable=trueStart Business Central, go to Menu
Design Pages. External Components is available under Components pane.
- In the Components pane, expand the External Components and drag the required component types to the canvas.
- Click Save.