Overview¶
menus: []
lists an array of menu items. Each item can be configured as follows with some parts of the configuration being dynamic:
property | description |
---|---|
label |
helps user to identify the meaning of a menu item (web, Context Menu, mobile Button in header of the detail section) |
icon |
specifies the icon of an action. (mobile, slide left/swipe on an entry in the list view) |
shortLabel |
(optional) (mobile, slide left/swipe on an entry in the list view) |
action |
specifies the type of action |
actionValues |
(optional) are specifying special parameters corresponding to the listed action |
roles |
(optional) Confines availability to the listed security roles |
visibleIn |
(optional) The visibility of a menu can be set to mobile or web. If not set, the menu is displayed. Possible values are mobile and web . Set as array of strings. |
swipeHidden |
(optional) Hides the menu action in insight-mobile's list swipe. Set as boolean. |
onlineOnly |
(optional) Menu actions with onlineOnly can only be executed online. Set as boolean. |
when |
(optional) specifies the moment an action can be triggered without user interaction, only valid for tree-level menu items |
onInit : the first time a tree is selected |
|
onSelect : every time a tree is selected |
|
scenario |
(optional) group actions together even when in separate trees. Insight Explorer only. |
tooltip |
(optional) Displays a tooltip when hovering over the menu action's button. Insight Explorer only. |
on |
(optional) specifies where the menu-entry should be placed. |
top : (optional) on table header and mobile buckets instead of context-menu/details/swipe |
|
wizard : (optional) on wizard header |
|
ifc : (optional) can be used by one menu to be execute on the IFC |
|
visible |
(optional) checks the attribute values of the record. If all hits the condition, the menu is visible. * is a wildcard for any value. Insight Explorer only. |
js |
(optional) can be used to implement a JavaScript validation function. Processing of the objects. Execute a Javascript function, that will get the objects as an array and return the object for the action as an array or a single object. If your js transforms multiple objects to one object and you want to call an action that does not support multiple objects please set an actionValue with "allowMultipleObjects" to true. |
"visible": {
"FOLDER": "true",
"USER": "${userData.personid}",
"GROUP": "*"
}
"visible": {
"js": "return true"
}
Menus and availability¶
menus | Short description | Mobile | Explorer |
---|---|---|---|
confirm | Shows a confirm dialog on which the user can decide to proceed. | x | x |
goto | Displays a dependent record in another tree. | x | x |
timeTrack | Starts a time tracker on the current object. | x | x |
browser | opens a new web page in a new browser tab. | x | x |
searchThis | searches the current object in other trees. | x | x |
request | Calls a remote REST/API endpoint. | x | x |
create | Creates a new node item of referenced node type | x | x |
refresh | Refreshes the current node. | x | x |
save | Assigns values to specified attributes and saves the record. | x | x |
saveDetails | Assigns values to specified attributes and saves the record and all children. | x | x |
staticContent | Shows a html page configured in the ClientConfiguration | x | x |
remove | Deletes an object. | x | x |
qr | Will render a QR code based on the given configuration. | x | x |
debug | Outputs all currently available information in the menu flow. | x | x |
form | Shows a dialog on which the user can make inputs. | x | x |
fileUpload | Attaches a file using the documents configuration. | x | x |
createSilent | Creates a new node item of referenced node type without a user input. | x | x |
createForm | Creates a new record without user input and does not save it. | x | x |
focus | Focus in currently open component automatically the record in question. | x | x |
downloadRecord | Downloads the current record to the mobile device. | x | |
deleteLocal | Reverts the changes of offline changed records. | x | |
listEdit | Opens the given node in an list edit mode. | x | |
online | Sets the app online. | x | |
offline | Sets the app offline. | x | |
filter | Sets a filter on the root node. | x | |
geo | Gets the current position of the device. | x | |
barcodeFilter | Forces a barcode scan and passes the value in a JavaScript-Function. | x | |
barcodeDeeplink | Opens the users camera module and scan barcodes. Automatically be handled as a deepLink. | x | |
barcodeScan | Opens the users camera module and scan a barcode. | x | |
nfcRead | Forces a NFC scan | x | |
scriptFilter | Can be used in then chains. The previous menu action passes the value object in a JavaScript-Function. |
x | |
select | Selects one record by a selectFromTree configuration. |
x | |
file-edit | Add or edit an attached file. | x | |
signature | Attaches a signature as a file or as Base64 data string. | x | |
js | Defines a custom JavaScript function which is executed. | x | |
refresh-profile | Refreshes the user profile without relogin. | x | |
flow | A guided form of the create menu. | x | |
listDialog | Displays a root list in a dialog. | x | |
createMulti | Creates multiple data records. | x | |
open | Opens specified application with current object. | x | |
details | Opens a detail dialog to present all of the listed attributes | x | |
select | Select one or multiple objects from a tree with root-nodes. | x | |
insert | new mbo as additional event after loading an application | x | |
kibanaOpen |
Please refer to: Kibana Dashboards trees. | x | |
matrixOpen | Visualize data by dynamic rows and columns. | x | |
tableOpen | Visualize rows of data. | x | |
tab | Controls the behaviour of tabs in the Explorer. | x | |
mapCreate | Create and edit maps from inside the Insight client as a user with a menu action. | x | |
gantt | Shows a Gantt diagram view based on data from a tree-configuration. | x | |
Chaining¶
You can chain menu actions. Each menu action can have a then
property, describing the next menu action to be executed, if the previous action was executed successfully. Any number of actions can be chained. Please note, that chained menu actions will only be executed, if the previous menu action was executed successfully, not if the previous menu action was rejected.
{
"label": "Save and back",
"icon": "icon-floppy-disk",
"action": "save",
"actionValues": [{}],
"then": {
"action": "goto",
"actionValues": [
{
"back": "-1"
}
]
}
}
Visible¶
You can dynamically hide and show menu actions with the visible
javascript function function. The visible.js
has access to several properties and callbacks:
properties | |
---|---|
object |
server representation of the current object, null if the menu is at tree level. |
userData |
Properties of the logged in user. (Working with variables/values)) |
swipe |
true if the menu is displayed as swipe action. |
isSet |
checks if the given property is set. |
replaceObject |
replaceObject of the current object. |
getTimeTracker |
gets the currently active timeTracker, if there is one. |
{
"label": "Save",
"icon": "icon-floppy-disk",
"action": "save",
"actionValues": [
{
"DESCRIPTION": "Documentation"
}
],
"visible": {
"js": "return userData.personId == 'Docu';"
}
}
Explorer Tab-Label¶
It is possible to configure the label of a tab, based on the common template syntax known from labels.
This is possible for the following actions: details
, insert
, mapOpen
, kibanaOpen
, tableOpen
To configure the tab-label the following part must be added to the first element of the actionValues. Possible variables are explained in the Working with variables/values chapter.
{
"label": "Show Details",
"icon": "icon-aim",
"action": "details",
"actionValues": [
{
"tab": {
"label": "Details: ${ASSETNUM}"
}
}
]
}