...
Info | ||
---|---|---|
| ||
This requires opCharts-4.5.7 8 or later. |
Nodes
It is possible to supply user-defined fields when editing a node, for example:
...
Extra fields are controlled using the Form Schema feature. Create a new schema file: /usr/local/opmojo/conf/form_schemaschemas/admin_nodes.json
(adjust path to suit your installation location). The file name must correspond with the UI component: <application>_<form name>.json
The content of the file should look something like this:
Code Block |
---|
{ "label": "Custom node fields", "description": "Edit in conf/form_schemaschemas/admin_nodes.json", "component": ["confignodenode_admin"], "tags": ["node"], "schema": { "configuration.customerId": { "title": "Customer ID", "type": "Text" }, "configuration.contact": { "title": "Contact Person", "type": "Text" }, "configuration.service_level": { "title": "ContactService PersonLevel", "type": "Select", "type "options": "Text"["Aluminium", "Steel", "Carbon_Fiber", "Titanium"] } } } |
Note that each field key must have prefix 'configuration.'
Refer to the documentation on the Form Schema page for more information on available options: field types, field order, form validation etc.