Skip to main content

Configuration


Widget

A top level configuration defining a 3DDASHBOARD widget app that could be added to the compass.

OverviewStructure
widget-overview.pngwidget-structure.png

Widget properties​

Prop NameDescriptionData TypeRequiredExample
columnsTable column definitions. Columnsobjectno"columns": { "title": { "label": "Title", "data": "title" } }
commandsCommand definitions. Commandsobjectno"commands": { "csvExport" : { "type": "export", "label": "CSV Export", "settings": { "columns": [ "title", "description" ], "excludeHiddenColumn": true } } }
defaultServiceParamsThis is used for support caching. Servicesobjectno"defaultServiceParams": { "enableCache": false, "cacheTimelimit": 1 }
descriptionVisible in admin UI widget liststringno
datasetsDataset definitions. Used to load data rom the graph into components (e.g. to a table) Data setsobjectno"datasets": { "ups-roots-example": { "type": "expand", "edgeStatement": "[type='VPMInstance']", "nodeStatement": "[type='VPMReference']" } }
extendsInherits from other configs to reuse common definitions.array stringno"extends" : ["dsapi-dseng.json", "presets.json"]
fieldsForm field definitions Fieldsobjectno"fields": { "title" : { "label": "Title", "data": "title", "type": "text" } }
formsForm definitions Formsobjectno
layouts
notificationsNotification appearance. Notificationsobjectno"notifications": { "colors": { "error": "#4a5568" } }
resourcesLoad additional resources for additional functionality.array stringno["plugin.js", "excelReport.js"]
requiresContextContextual widgets requires an object to be dropped and initially renders a drop zone.booleanno
rootThe main component (e.g. a layout, table, form)stringyes
servicesService definitions used to retrieve data Servicesobjectno"services": { "changeAction" : { "uri": "/resources/v1/modeler/dslc/changeaction/{{contextId}}", "transformer": { "name": "corpusgeneric", "inputs": { "identifier": ["id"] } } } }
tablesTable definitions Tablesobjectno"tables": { "myTable" : { "datasets": [ "contextNode" ], "columns": [ "title", "state" ] } }
tabs
titleWidget name displayed in the UIstringyes
toolbarsToolbar definitions Toolbarsobjectno
preferencesWidget preference definitions. Each preference creates a user-editable field in the widget preferences panel. Values can be injected anywhere in the config using {{pref.<name>}} macros. Preference macrosarray objectno"preferences": [{ "type": "text", "name": "promote-state", "label": "Promote To State" }]
{
"$schema": "https://widgets.technia.cloud/schema.json",
"title": "",
"description" : ""
"root" : "",
"requiresContext": true,
"resources": [],
"extends": [],
"preferences": [],
"tables" : {},
"forms" : {},
"layouts" : {},
"notifications": {},
"tabs" : {},
"charts" : {},
"columns": {},
"fields": {},
"datasets": {},
"toolbars": {},
"commands": {},
"services": {}
}

Notifications

Notification colours are configurable per type through the top level notifications.colors object. Every type keeps its default colour unless you override it, so only list the ones you want to change.

Prop NameDescriptionData TypeRequiredDefault
colors.errorColour of error notificationsstring objectnored gradient
colors.warningColour of warning notificationsstring objectnoorange gradient
colors.infoColour of info notificationsstring objectnoblue gradient
colors.successColour of success notificationsstring objectnogreen gradient

Each entry is either:

  • a string — any valid CSS background value (hex, rgb(), linear-gradient(...)), used as the notification background, or
  • an object { "background": ..., "color": ... }, where color also sets the text, icon, close button and progress bar. Use it when the background is light enough that the default white text would be unreadable.
{
"notifications": {
"colors": {
"error": "#4a5568",
"warning": { "background": "#fff8e1", "color": "#7a4f01" }
}
}
}

colors.error also covers the standalone alert used for errors raised outside a component — widget load failures, unhandled errors, and invalid context drops — so one setting covers every error surface.

Colours accept {{pref.<name>}} macros, so they can be exposed as user-editable widget preferences:

{
"preferences": [{ "type": "text", "name": "error-color", "label": "Error Notification Color" }],
"notifications": { "colors": { "error": "{{pref.error-color}}" } }
}