261 lines
7.3 KiB
Plaintext
261 lines
7.3 KiB
Plaintext
{
|
|
"custom": {
|
|
"AlarmSeverity": 0,
|
|
"value": null
|
|
},
|
|
"params": {
|
|
"EU": "°F",
|
|
"embedded": true,
|
|
"objectName": "AnalogInRS485",
|
|
"tagPath": "[Ignition_Common_IO_Gtwy]DH1/SATB1_DH1_PNL22_C1_TT01"
|
|
},
|
|
"propConfig": {
|
|
"custom.AlarmSeverity": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"tagPath": "{view.params.tagPath}"
|
|
},
|
|
"tagPath": "{tagPath}/AlarmSummary/ActiveAlarms"
|
|
},
|
|
"enabled": false,
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn alarm.summary.calcMaxPriority(self.view.params.tagPath)",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.value": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "direct",
|
|
"tagPath": "[default]simulator/DH/Temp6"
|
|
},
|
|
"type": "tag"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"params.EU": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.embedded": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.objectName": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.tagPath": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {
|
|
"defaultSize": {
|
|
"height": 50,
|
|
"width": 100
|
|
}
|
|
},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Value"
|
|
},
|
|
"position": {
|
|
"basis": "100%"
|
|
},
|
|
"propConfig": {
|
|
"props.style.backgroundColor": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "session.props.theme"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"fallback": null,
|
|
"inputType": "scalar",
|
|
"mappings": [
|
|
{
|
|
"input": "stream-light",
|
|
"output": "var(--containerNested)"
|
|
},
|
|
{
|
|
"input": "stream-dark",
|
|
"output": "lightgray"
|
|
}
|
|
],
|
|
"outputType": "scalar",
|
|
"type": "map"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.style.outlineColor": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.AlarmSeverity"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"fallback": "none",
|
|
"inputType": "scalar",
|
|
"mappings": [
|
|
{
|
|
"input": -1,
|
|
"output": "white"
|
|
},
|
|
{
|
|
"input": 0,
|
|
"output": "white"
|
|
},
|
|
{
|
|
"input": 1,
|
|
"output": "var(--coolpurple)"
|
|
},
|
|
{
|
|
"input": 2,
|
|
"output": "var(--goldenyellow)"
|
|
},
|
|
{
|
|
"input": 3,
|
|
"output": "var(--sunsetorange)"
|
|
},
|
|
{
|
|
"input": 4,
|
|
"output": "var(--alarmred)"
|
|
}
|
|
],
|
|
"outputType": "scalar",
|
|
"type": "map"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.style.outlineStyle": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.AlarmSeverity"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"fallback": "None",
|
|
"inputType": "scalar",
|
|
"mappings": [
|
|
{
|
|
"input": -1,
|
|
"output": "None"
|
|
},
|
|
{
|
|
"input": 0,
|
|
"output": "None"
|
|
},
|
|
{
|
|
"input": 1,
|
|
"output": "Solid"
|
|
},
|
|
{
|
|
"input": 2,
|
|
"output": "Solid"
|
|
},
|
|
{
|
|
"input": 3,
|
|
"output": "Solid"
|
|
},
|
|
{
|
|
"input": 4,
|
|
"output": "Solid"
|
|
}
|
|
],
|
|
"outputType": "scalar",
|
|
"type": "map"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "concat(numberFormat({view.custom.value}, \"0.0\"), \" \", {view.params.EU})"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"overflow": "visible"
|
|
},
|
|
"textStyle": {
|
|
"color": "var(--tagvalue-color)",
|
|
"fontSize": 16,
|
|
"format": "##0.0#",
|
|
"textAlign": "center"
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "AlarmIcons"
|
|
},
|
|
"position": {
|
|
"basis": "0.1%"
|
|
},
|
|
"propConfig": {
|
|
"props.params.AlarmSeverity": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.AlarmSeverity"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"path": "Library/Alarms/Icons",
|
|
"style": {
|
|
"marginLeft": -7,
|
|
"marginTop": -10,
|
|
"overflow": "visible"
|
|
},
|
|
"useDefaultViewHeight": true,
|
|
"useDefaultViewWidth": true
|
|
},
|
|
"type": "ia.display.view"
|
|
}
|
|
],
|
|
"events": {
|
|
"dom": {
|
|
"onClick": {
|
|
"config": {
|
|
"script": "\tif(self.view.params.embedded \u003d\u003d True):\n\t\tpageId \u003d self.page.props.pageId\n\t\tsystem.perspective.print(\u0027pageId: {}\u0027.format(pageId))\n\t\n\t\ttagPath \u003d self.view.params.tagPath\n\t\tobjectName \u003d self.view.params.objectName\n\t\tutils.nav.openEQPopup(objectName, tagPath)\n\telse:\n\t\ttagPath \u003d self.view.params.tagPath\n\t\tobjectName \u003d self.view.params.objectName\n\t\tpayload\u003d{\n\t\t\t\u0027objectName\u0027: objectName,\n\t\t\t\u0027tagPath\u0027: tagPath,\n\t\t\t\u0027modal\u0027: False,\n\t\t\t\u0027resizable\u0027: True,\n\t\t\t\u0027draggable\u0027: True,\n\t\t\t\u0027position\u0027: {\n\t#\t\t\t\u0027left\u0027:\u00270\u0027,\n\t#\t\t\t\u0027top\u0027:\u00270\u0027,\n\t\t\t\u0027width\u0027: \u00271000px\u0027,\n\t\t\t\u0027height\u0027: \u0027800px\u0027\n\t\t\t}\n\t\t}\n\t\tutils.nav.eqPopupMsg(self, payload)\t"
|
|
},
|
|
"scope": "G",
|
|
"type": "script"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"name": "root"
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"overflow": "visible"
|
|
}
|
|
},
|
|
"type": "ia.container.flex"
|
|
}
|
|
} |