Scenario
Scenario¶
Only available for Insight-Explorer.
With the scenario
configuration actions can be grouped together, independed of the use-case they are in.
Actions with the same scenario
use the same tab and don't open new tabs over and over. If no tab exists for the scenario
a new one is created, all following actions will reuse that tab then.
A scenario
can be configured on on any action or on the top of the tree configuration. If configured on the tree level the scenario
will handed down to every action below it.
Overwriting a tree-level scenario
on an action is possible.
Examples¶
Same scenario from two trees both use the same tab¶
tree-asset.json
"menus": [
{
"label": "Details",
"icon": "icon-tab",
"scenario": "asset_workorder_details",
"action": "details"
}
]
tree-workorder.json
"menus": [
{
"label": "Details",
"icon": "icon-tab",
"scenario": "asset_workorder_details",
"action": "details"
}
]
Defining a scenario on tree-level¶
management-massnahmen.json
{
"name": "management-massnahmen",
"title": "Maßnahmen",
"icon": "icon-equalizer",
"order": 10,
"module": "02Management",
"scenario": "massnahmen",
}
Defining a scenario on tree-level and overriding on action¶
management-massnahmen.json
{
"name": "management-massnahmen",
"title": "Maßnahmen",
"icon": "icon-equalizer",
"order": 10,
"module": "02Management",
"scenario": "massnahmen",
...
"root": {
...
"menus": [
{
"label": "Details",
"icon": "icon-tab",
"scenario": "not_massnahmen",
"action": "details"
}
]
}
}