495 lines
13 KiB
JSON
495 lines
13 KiB
JSON
{
|
|
"custom": {},
|
|
"params": {
|
|
"Status": "",
|
|
"tagProps": [
|
|
"MCM02",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value"
|
|
]
|
|
},
|
|
"propConfig": {
|
|
"params.Status": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.tagProps": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {
|
|
"defaultSize": {
|
|
"height": 212,
|
|
"width": 336
|
|
}
|
|
},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Label"
|
|
},
|
|
"position": {
|
|
"basis": "400px"
|
|
},
|
|
"propConfig": {
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "/root.custom.MCM"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"textIndent": "10px"
|
|
},
|
|
"textStyle": {
|
|
"textIndent": "10px"
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "JAM",
|
|
"tooltip": {
|
|
"enabled": true,
|
|
"text": "Jams"
|
|
}
|
|
},
|
|
"position": {
|
|
"basis": "24px",
|
|
"shrink": 0
|
|
},
|
|
"props": {
|
|
"path": "autStand/Equipment/JAM",
|
|
"style": {
|
|
"marginRight": "5px"
|
|
}
|
|
},
|
|
"type": "ia.display.view"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Label_0"
|
|
},
|
|
"position": {
|
|
"basis": "10px",
|
|
"grow": 1
|
|
},
|
|
"propConfig": {
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "/root.custom.totalJams"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"marginRight": "20px",
|
|
"overflow": "visible",
|
|
"textAlign": "end"
|
|
},
|
|
"textStyle": {
|
|
"textAlign": "end"
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "FlexContainer"
|
|
},
|
|
"position": {
|
|
"basis": "60px"
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"backgroundColor": "#555555"
|
|
}
|
|
},
|
|
"type": "ia.container.flex"
|
|
},
|
|
{
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Label_0"
|
|
},
|
|
"position": {
|
|
"basis": "50px"
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"fontFamily": "Roboto",
|
|
"fontSize": 12,
|
|
"marginLeft": 10
|
|
},
|
|
"text": "AREA",
|
|
"textStyle": {
|
|
"fontFamily": "Roboto",
|
|
"fontSize": 12
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Label"
|
|
},
|
|
"position": {
|
|
"basis": "195px"
|
|
},
|
|
"propConfig": {
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "/root.custom.area_display"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"fontSize": 12,
|
|
"marginLeft": 50
|
|
},
|
|
"textStyle": {
|
|
"fontSize": 12
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "FlexContainer_0"
|
|
},
|
|
"position": {
|
|
"basis": "80px"
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"borderBottomColor": "#555555",
|
|
"borderBottomStyle": "solid",
|
|
"borderBottomWidth": 0.5,
|
|
"borderLeftColor": "#555555",
|
|
"borderLeftStyle": "none",
|
|
"borderLeftWidth": 0.5,
|
|
"borderRightColor": "#555555",
|
|
"borderRightStyle": "none",
|
|
"borderRightWidth": 0.5,
|
|
"borderTopColor": "#555555",
|
|
"borderTopStyle": "solid",
|
|
"borderTopWidth": 0.5
|
|
}
|
|
},
|
|
"type": "ia.container.flex"
|
|
},
|
|
{
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Label_0"
|
|
},
|
|
"position": {
|
|
"basis": "50px"
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"fontFamily": "Roboto",
|
|
"fontSize": 12,
|
|
"marginLeft": 10
|
|
},
|
|
"text": "STATUS",
|
|
"textStyle": {
|
|
"fontFamily": "Roboto",
|
|
"fontSize": 12
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "EmbeddedView"
|
|
},
|
|
"position": {
|
|
"basis": "200px"
|
|
},
|
|
"propConfig": {
|
|
"props.params.value.tagProps[0]": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{view.params.tagProps[0]}"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"params": {
|
|
"value": {
|
|
"tagProps": [
|
|
null,
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value"
|
|
]
|
|
}
|
|
},
|
|
"path": "autStand/Equipment/Controller-Views/CommandControlStatus"
|
|
},
|
|
"type": "ia.display.view"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "FlexContainer_1"
|
|
},
|
|
"position": {
|
|
"basis": "80px"
|
|
},
|
|
"props": {
|
|
"justify": "space-around",
|
|
"style": {
|
|
"borderBottomColor": "#555555",
|
|
"borderBottomStyle": "solid",
|
|
"borderBottomWidth": 0.5
|
|
}
|
|
},
|
|
"type": "ia.container.flex"
|
|
},
|
|
{
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Icon"
|
|
},
|
|
"position": {
|
|
"basis": "25px"
|
|
},
|
|
"propConfig": {
|
|
"props.color": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "/root.custom.counts"
|
|
},
|
|
"enabled": false,
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"color": "#FFF9F9",
|
|
"path": "material/notifications_active",
|
|
"style": {
|
|
"classes": "",
|
|
"marginLeft": 10
|
|
}
|
|
},
|
|
"type": "ia.display.icon"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Label"
|
|
},
|
|
"position": {
|
|
"basis": "100px"
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"fontFamily": "Roboto",
|
|
"fontSize": 12,
|
|
"marginLeft": 10
|
|
},
|
|
"text": "ACTIVE ALARMS",
|
|
"textStyle": {
|
|
"fontFamily": "Roboto",
|
|
"fontSize": 12
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "FlexContainer_3"
|
|
},
|
|
"position": {
|
|
"basis": "80px"
|
|
},
|
|
"type": "ia.container.flex"
|
|
},
|
|
{
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "EmbeddedView"
|
|
},
|
|
"position": {
|
|
"basis": "100px",
|
|
"grow": 1
|
|
},
|
|
"propConfig": {
|
|
"props.params.value.tagProps[0]": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{view.params.tagProps[0]}"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"params": {
|
|
"classes": "Text-Styles/Ariel-Bold-White-12pt",
|
|
"value": {
|
|
"tagProps": [
|
|
null,
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value"
|
|
]
|
|
}
|
|
},
|
|
"path": "autStand/Equipment/Controller-Views/CommandControlAlarms"
|
|
},
|
|
"type": "ia.display.view"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "FlexContainer_2"
|
|
},
|
|
"position": {
|
|
"basis": "80px"
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"marginBottom": 5,
|
|
"marginLeft": 10,
|
|
"marginRight": 10
|
|
}
|
|
},
|
|
"type": "ia.container.flex"
|
|
}
|
|
],
|
|
"events": {
|
|
"dom": {
|
|
"onClick": {
|
|
"config": {
|
|
"script": "\n\tpage \u003d self.view.params.tagProps[0]\n\t\n\tsystem.perspective.navigate(\"/\"+ page)"
|
|
},
|
|
"scope": "G",
|
|
"type": "script"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"name": "root"
|
|
},
|
|
"propConfig": {
|
|
"custom.MCM": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.tagProps[0]"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"custom.area_display": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "jsonGet({this.custom.plc_dict}, \"Area\")"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"custom.plc_dict": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"fc": "{session.custom.fc}"
|
|
},
|
|
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"expression": "jsonGet({value}, {view.params.tagProps[0]})",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
}
|
|
},
|
|
"custom.totalJams": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "direct",
|
|
"tagPath": "[BNA8_SCADA_TAG_PROVIDER]System/Queries/Alarms/ActiveAlarmsTable"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\t# value is a dataset returned from your SQL query\n\tfrom java.util import HashSet\n\t\n\tunique_devices \u003d HashSet()\n\t\n\t# iterate rows\n\tfor rowIndex in range(value.getRowCount()):\n\t device \u003d value.getValueAt(rowIndex, \"Description\")\n\t tag \u003d value.getValueAt(rowIndex, \"Tag\")\n\t location \u003d value.getValueAt(rowIndex, \"Location\")\n\t\n\t # match for TPE devices that are jammed and match MCM area\n\t if (\n\t device\n\t and tag\n\t and \"TPE\" in str(device)\n\t and \"Jammed\" in str(tag)\n\t and str(location) \u003d\u003d str(self.custom.MCM)\n\t ):\n\t unique_devices.add(device)\n\t\n\t# return total unique jammed device count\n\treturn unique_devices.size()",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
}
|
|
},
|
|
"meta.visible": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "if({session.custom.covert} \u003d False \u0026\u0026 {this.custom.status} \u003d 5, False, True)"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"direction": "column",
|
|
"style": {
|
|
"animationFillMode": "both",
|
|
"borderBottomLeftRadius": 10,
|
|
"borderBottomRightRadius": 10,
|
|
"borderColor": "#555555",
|
|
"borderStyle": "solid",
|
|
"borderTopLeftRadius": 10,
|
|
"borderTopRightRadius": 10,
|
|
"borderWidth": 1,
|
|
"box-shadow": "5px 5px 5px grey",
|
|
"classes": "Background-Styles/Controller",
|
|
"cursor": "pointer"
|
|
}
|
|
},
|
|
"type": "ia.container.flex"
|
|
}
|
|
} |