419 lines
12 KiB
Plaintext
419 lines
12 KiB
Plaintext
{
|
|
"custom": {
|
|
"tabsConfig": {
|
|
"tabs": [
|
|
"Status",
|
|
"Control",
|
|
"Config",
|
|
"Trend",
|
|
"Meta",
|
|
"Wiki"
|
|
]
|
|
},
|
|
"trendConfig": {
|
|
"selectedPens": []
|
|
}
|
|
},
|
|
"params": {
|
|
"auth": "view.params.auth.control",
|
|
"objectName": "Valve M",
|
|
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/ValveM 1"
|
|
},
|
|
"propConfig": {
|
|
"custom.tabsConfig": {
|
|
"persistent": true
|
|
},
|
|
"custom.tabsConfig.showConfig": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"1": "{view.params.tagPath}"
|
|
},
|
|
"tagPath": "{1}/Config"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"expression": "coalesce({value},false) !\u003d false",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
}
|
|
},
|
|
"custom.tabsConfig.showControl": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"1": "{view.params.tagPath}"
|
|
},
|
|
"tagPath": "{1}/Control"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"expression": "coalesce({value},false) !\u003d false",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
}
|
|
},
|
|
"custom.trendConfig": {
|
|
"persistent": true
|
|
},
|
|
"params.auth": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.objectName": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.tagPath": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Status"
|
|
},
|
|
"propConfig": {
|
|
"position.tabIndex": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{parent.props.tabs}"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn value.indexOf(self.meta.name)",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.params.objectName": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.objectName"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.params.tagPath": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.tagPath"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"loading": {
|
|
"order": "with-parent"
|
|
},
|
|
"path": "Library/Templates/Info"
|
|
},
|
|
"type": "ia.display.view"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Trend"
|
|
},
|
|
"propConfig": {
|
|
"position.tabIndex": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{parent.props.tabs}"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn value.indexOf(self.meta.name)",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.params.selectedPens": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.trendConfig.selectedPens"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.params.tagPath": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.tagPath"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"loading": {
|
|
"order": "with-parent"
|
|
},
|
|
"path": "Library/Templates/Trends"
|
|
},
|
|
"type": "ia.display.view"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Config"
|
|
},
|
|
"propConfig": {
|
|
"position.tabIndex": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{parent.props.tabs}"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn value.indexOf(self.meta.name)",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.params.auth": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.auth"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.params.tagPath": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.tagPath"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.path": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Config\u0027)"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"loading": {
|
|
"order": "with-parent"
|
|
}
|
|
},
|
|
"type": "ia.display.view"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Meta"
|
|
},
|
|
"propConfig": {
|
|
"position.tabIndex": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{parent.props.tabs}"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn value.indexOf(self.meta.name)",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.params.auth": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.auth"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.params.objectName": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.objectName"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.params.tagPath": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.tagPath"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"path": "Library/Templates/Meta"
|
|
},
|
|
"type": "ia.display.view"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Wiki"
|
|
},
|
|
"propConfig": {
|
|
"position.tabIndex": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{parent.props.tabs}"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn value.indexOf(self.meta.name)",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.params.auth": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.auth"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.params.tagPath": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.tagPath"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"path": "Library/Framework/Tag Notes/View Notes"
|
|
},
|
|
"type": "ia.display.view"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Control"
|
|
},
|
|
"propConfig": {
|
|
"position.tabIndex": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{parent.props.tabs}"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn value.indexOf(self.meta.name)",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.params.auth": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.auth"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.params.tagPath": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.tagPath"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.path": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Control\u0027)"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"loading": {
|
|
"order": "with-parent"
|
|
}
|
|
},
|
|
"type": "ia.display.view"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "TabContainer"
|
|
},
|
|
"position": {
|
|
"basis": "300px",
|
|
"grow": 1
|
|
},
|
|
"propConfig": {
|
|
"props.tabs": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{view.custom.tabsConfig}"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\ttabs \u003d value[\u0027tabs\u0027]\n\tshowConfig \u003d value[\u0027showConfig\u0027]\n\tshowControl \u003d value[\u0027showControl\u0027]\n\tif not showConfig:\n\t\ttabs.pop(tabs.indexOf(\u0027Config\u0027))\n\tif not showControl:\n\t\ttabs.pop(tabs.indexOf(\u0027Control\u0027))\n\t\n\treturn tabs",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"contentStyle": {
|
|
"backgroundColor": "var(--container)"
|
|
},
|
|
"currentTabIndex": 2
|
|
},
|
|
"type": "ia.container.tab"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "root"
|
|
},
|
|
"props": {
|
|
"direction": "column"
|
|
},
|
|
"scripts": {
|
|
"customMethods": [],
|
|
"extensionFunctions": null,
|
|
"messageHandlers": [
|
|
{
|
|
"messageType": "enableDisablePen",
|
|
"pageScope": true,
|
|
"script": "\t# When a pen is selected or de-selected on the trends page, this handler is\n\t# responsible for appending or removing the pen name from the proper trend\n\t# config list.\n\t\n\tname \u003d payload[\u0027name\u0027]\n\tenabledOrDisabled \u003d payload[\u0027enabledOrDisabled\u0027]\n\tgroup \u003d payload[\u0027group\u0027]\n\t\n\tif enabledOrDisabled \u003d\u003d True:\n\t\tif name not in self.view.custom.trendConfig[\u0027selectedPens\u0027]:\n\t\t\tself.view.custom.trendConfig[\u0027selectedPens\u0027].append(name)\n\telse:\n\t\tif name in self.view.custom.trendConfig[\u0027selectedPens\u0027]:\n\t\t\tself.view.custom.trendConfig[\u0027selectedPens\u0027].remove(name)",
|
|
"sessionScope": false,
|
|
"viewScope": false
|
|
}
|
|
]
|
|
},
|
|
"type": "ia.container.flex"
|
|
}
|
|
} |