262 lines
6.4 KiB
Plaintext
262 lines
6.4 KiB
Plaintext
{
|
|
"custom": {},
|
|
"params": {
|
|
"dataType": "Boolean",
|
|
"display": true,
|
|
"displaySelection": 0,
|
|
"format": "0,0",
|
|
"heart": false,
|
|
"instancePosition": 2,
|
|
"name": "OpenClosed",
|
|
"numDecimals": 4,
|
|
"options": [
|
|
"closed",
|
|
"open"
|
|
],
|
|
"tagPath": "[Ignition_Common_IO_Gtwy]ChillerFltCodes/CP08[0]",
|
|
"visible": true
|
|
},
|
|
"propConfig": {
|
|
"params.dataType": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.display": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.displaySelection": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.format": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.heart": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.instancePosition": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.name": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.numDecimals": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.options": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.tagPath": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.visible": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {
|
|
"defaultSize": {
|
|
"height": 40
|
|
}
|
|
},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Name",
|
|
"tooltip": {
|
|
"enabled": true
|
|
}
|
|
},
|
|
"position": {
|
|
"basis": "50%"
|
|
},
|
|
"propConfig": {
|
|
"meta.tooltip.text": {
|
|
"binding": {
|
|
"config": {
|
|
"struct": {
|
|
"path": "{view.params.tagPath}"
|
|
},
|
|
"waitOnAll": true
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn value[\u0027path\u0027]",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr-struct"
|
|
}
|
|
},
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.name"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Value",
|
|
"tooltip": {
|
|
"enabled": true
|
|
}
|
|
},
|
|
"propConfig": {
|
|
"meta.tooltip.text": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"tagPath": "{view.params.tagPath}"
|
|
},
|
|
"tagPath": "{tagPath}.OpcItemPath"
|
|
},
|
|
"type": "tag"
|
|
}
|
|
},
|
|
"position.display": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "!{view.params.heart}"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"struct": {
|
|
"current": "tag({view.params.tagPath})",
|
|
"displaySelection": "toBoolean({view.params.displaySelection})",
|
|
"numDecimals": "{view.params.numDecimals}",
|
|
"options": "{view.params.options}"
|
|
},
|
|
"waitOnAll": true
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\toption \u003d value[\"options\"]\t\n\tif not self.view.params.displaySelection:\n\t\tif value[\"current\"] is None:\n\t\t\ttag \u003d str(value[\"current\"])\n\t\telse:\n\t\t\t\n\t\t\tformat_specifier \u003d \"%%.%df\" % value[\u0027numDecimals\u0027]\n\t\t\ttag \u003d format_specifier % value[\"current\"]\n\t\t\ttag \u003d tag.rstrip(\u00270\u0027).rstrip(\u0027.\u0027)\n\telse:\n\t\ttag \u003d option[value[\"current\"]]\n\treturn tag",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr-struct"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"textStyle": {
|
|
"color": "var(--tagvalue-color)"
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Icon"
|
|
},
|
|
"position": {
|
|
"basis": "30px"
|
|
},
|
|
"propConfig": {
|
|
"custom.tag": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"tagPath": "{view.params.tagPath}"
|
|
},
|
|
"tagPath": "{tagPath}"
|
|
},
|
|
"type": "tag"
|
|
}
|
|
},
|
|
"position.display": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{view.params.heart}"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.path": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "if({this.custom.tag},\"material/favorite\",\"material/favorite_border\")"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"color": "#E42626",
|
|
"style": {
|
|
"strokeWidth": "1px"
|
|
}
|
|
},
|
|
"type": "ia.display.icon"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Units"
|
|
},
|
|
"propConfig": {
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"1": "{view.params.tagPath}"
|
|
},
|
|
"tagPath": "{1}.engUnit"
|
|
},
|
|
"type": "tag"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"textStyle": {
|
|
"color": "var(--units-color)"
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "root"
|
|
},
|
|
"propConfig": {
|
|
"meta.visible": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.visible"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"gap": "10px",
|
|
"padding": "0 10px"
|
|
}
|
|
},
|
|
"type": "ia.container.flex"
|
|
}
|
|
} |