509 lines
16 KiB
Plaintext
509 lines
16 KiB
Plaintext
{
|
|
"custom": {},
|
|
"params": {
|
|
"deviceType": "",
|
|
"props": {
|
|
"config": {
|
|
"enableHighlight": true,
|
|
"isClickable": false
|
|
},
|
|
"status": {
|
|
"color": "#aaa",
|
|
"showAlways": true,
|
|
"tagPath": "",
|
|
"tooltip": ""
|
|
}
|
|
}
|
|
},
|
|
"propConfig": {
|
|
"params.deviceType": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.props": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {
|
|
"defaultSize": {
|
|
"height": 280,
|
|
"width": 877
|
|
}
|
|
},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"events": {
|
|
"component": {
|
|
"onRowDoubleClick": {
|
|
"config": {
|
|
"script": "\tscreen \u003d alarms.resolveScreenBySource(event.value.source)\n\tif screen \u003c\u003e \"\":\n\t\twindow \u003d \"Windows/GraphicsWrapper\"\n\t\tparams \u003d {\"view\": screen}\n\t\tsystem.perspective.navigate(\"/\")\n\t\tsystem.perspective.navigate(view\u003dwindow, params\u003dparams)\n\t\tsystem.perspective.closePopup(\"\")"
|
|
},
|
|
"scope": "G",
|
|
"type": "script"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"name": "Table"
|
|
},
|
|
"position": {
|
|
"height": "100%",
|
|
"width": "100%"
|
|
},
|
|
"propConfig": {
|
|
"props.columns[3].visible": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": " {view.params.deviceType}\u003d\"conveyor\"\r\n||{view.params.deviceType}\u003d\"conveyorycurve\"\r\n||{view.params.deviceType}\u003d\"gaylord\"\r\n||{view.params.deviceType}\u003d\"chutedestination\"\r\n||{view.params.deviceType}\u003d\"spiralchute\"\r\n||{view.params.deviceType}\u003d\"divchute\"\r\n||{view.params.deviceType}\u003d\"rrchute\"\r\n||{view.params.deviceType}\u003d\"mcp\""
|
|
},
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.data": {
|
|
"binding": {
|
|
"config": {
|
|
"parameters": {
|
|
"priority": "0",
|
|
"tagPath": "if(\t {view.params.deviceType}\u003d\"conveyor\"\r \t||{view.params.deviceType}\u003d\"conveyorycurve\"\r \t||{view.params.deviceType}\u003d\"gaylord\"\r \t||{view.params.deviceType}\u003d\"mcp\",\r \t// Give parent folder:\r\tsubstring(\r\t\treplace({view.params.props.status.tagPath}, \"/Graphics\", \"\"),\r\t\t0,\r\t\tlastIndexOf(\r\t\t\treplace({view.params.props.status.tagPath}, \"/Graphics\", \"\"),\r\t\t\t\"/\"\r\t\t)\r\t),\r\t{view.params.props.status.tagPath}\r )\r "
|
|
},
|
|
"queryPath": "Alarms/DeviceHistory"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\toutput_json \u003d []\n\t# Transform dataset into json:\n\tfor row in range(value.getRowCount()):\n\t\trow_object \u003d {\"value\": {}}\n\t\t# Populate row values:\n\t\tfor col in range(value.getColumnCount()):\n\t\t\trow_object[\"value\"][value.getColumnName(col)] \u003d value.getValueAt(row, col)\n\t\t\t# Check if endtime isn\u0027t reached:\n\t\t\tif value.getColumnName(col) \u003d\u003d \u0027endtime\u0027 and value.getValueAt(row, col) in [None, \"\"]:\n\t\t\t\trow_object[\u0027style\u0027] \u003d {\"background\": \"#F4B084\"}\n\t\t# Append to json output:\n\t\toutput_json.append(row_object)\n\t# Return as json:\n\treturn output_json",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "query"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"cells": {
|
|
"style": {
|
|
"borderBottomColor": "#D5D5D5",
|
|
"borderBottomStyle": "solid",
|
|
"borderBottomWidth": "1px",
|
|
"borderRightColor": "#D5D5D5",
|
|
"borderRightStyle": "solid",
|
|
"borderRightWidth": "1px",
|
|
"fontFamily": "Helvetica",
|
|
"fontSize": "16px"
|
|
}
|
|
},
|
|
"columns": [
|
|
{
|
|
"align": "center",
|
|
"boolean": "checkbox",
|
|
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
|
"editable": false,
|
|
"field": "starttime",
|
|
"footer": {
|
|
"align": "center",
|
|
"justify": "center",
|
|
"style": {
|
|
"classes": ""
|
|
},
|
|
"title": ""
|
|
},
|
|
"header": {
|
|
"align": "center",
|
|
"justify": "center",
|
|
"style": {
|
|
"classes": "table/column-header"
|
|
},
|
|
"title": "Start Timestamp"
|
|
},
|
|
"justify": "center",
|
|
"number": "value",
|
|
"numberFormat": "0,0.##",
|
|
"progressBar": {
|
|
"bar": {
|
|
"color": "#62A3F6",
|
|
"linecap": "round",
|
|
"width": 5
|
|
},
|
|
"max": 100,
|
|
"track": {
|
|
"color": "#DADADA",
|
|
"linecap": "round",
|
|
"width": 2
|
|
},
|
|
"value": {
|
|
"color": "#7D7D7D",
|
|
"show": true
|
|
}
|
|
},
|
|
"render": "auto",
|
|
"resizable": false,
|
|
"sortable": true,
|
|
"strictWidth": true,
|
|
"style": {
|
|
"classes": ""
|
|
},
|
|
"toggleSwitch": {
|
|
"color": {
|
|
"selected": "#2196F3",
|
|
"unselected": "#FFFFFF"
|
|
}
|
|
},
|
|
"viewParams": {},
|
|
"viewPath": "",
|
|
"visible": true,
|
|
"width": 175
|
|
},
|
|
{
|
|
"align": "center",
|
|
"boolean": "checkbox",
|
|
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
|
"editable": false,
|
|
"field": "endtime",
|
|
"footer": {
|
|
"align": "center",
|
|
"justify": "center",
|
|
"style": {
|
|
"classes": ""
|
|
},
|
|
"title": ""
|
|
},
|
|
"header": {
|
|
"align": "center",
|
|
"justify": "center",
|
|
"style": {
|
|
"classes": "table/column-header"
|
|
},
|
|
"title": "End Timestamp"
|
|
},
|
|
"justify": "center",
|
|
"number": "value",
|
|
"numberFormat": "0,0.##",
|
|
"progressBar": {
|
|
"bar": {
|
|
"color": "#62A3F6",
|
|
"linecap": "round",
|
|
"width": 5
|
|
},
|
|
"max": 100,
|
|
"track": {
|
|
"color": "#DADADA",
|
|
"linecap": "round",
|
|
"width": 2
|
|
},
|
|
"value": {
|
|
"color": "#7D7D7D",
|
|
"show": true
|
|
}
|
|
},
|
|
"render": "auto",
|
|
"resizable": false,
|
|
"sortable": true,
|
|
"strictWidth": true,
|
|
"style": {
|
|
"classes": ""
|
|
},
|
|
"toggleSwitch": {
|
|
"color": {
|
|
"selected": "#2196F3",
|
|
"unselected": "#FFFFFF"
|
|
}
|
|
},
|
|
"viewParams": {},
|
|
"viewPath": "",
|
|
"visible": true,
|
|
"width": 175
|
|
},
|
|
{
|
|
"align": "center",
|
|
"boolean": "checkbox",
|
|
"dateFormat": "MM/DD/YYYY",
|
|
"editable": false,
|
|
"field": "duration",
|
|
"footer": {
|
|
"align": "center",
|
|
"justify": "center",
|
|
"style": {
|
|
"classes": ""
|
|
},
|
|
"title": ""
|
|
},
|
|
"header": {
|
|
"align": "center",
|
|
"justify": "center",
|
|
"style": {
|
|
"classes": "table/column-header"
|
|
},
|
|
"title": "Duration"
|
|
},
|
|
"justify": "center",
|
|
"number": "value",
|
|
"numberFormat": "0,0.##",
|
|
"progressBar": {
|
|
"bar": {
|
|
"color": "#62A3F6",
|
|
"linecap": "round",
|
|
"width": 5
|
|
},
|
|
"max": 100,
|
|
"track": {
|
|
"color": "#DADADA",
|
|
"linecap": "round",
|
|
"width": 2
|
|
},
|
|
"value": {
|
|
"color": "#7D7D7D",
|
|
"show": true
|
|
}
|
|
},
|
|
"render": "auto",
|
|
"resizable": false,
|
|
"sortable": true,
|
|
"strictWidth": true,
|
|
"style": {
|
|
"classes": ""
|
|
},
|
|
"toggleSwitch": {
|
|
"color": {
|
|
"selected": "#2196F3",
|
|
"unselected": "#FFFFFF"
|
|
}
|
|
},
|
|
"viewParams": {},
|
|
"viewPath": "",
|
|
"visible": true,
|
|
"width": 100
|
|
},
|
|
{
|
|
"align": "center",
|
|
"boolean": "checkbox",
|
|
"dateFormat": "MM/DD/YYYY",
|
|
"editable": false,
|
|
"field": "device",
|
|
"footer": {
|
|
"align": "center",
|
|
"justify": "center",
|
|
"style": {
|
|
"classes": ""
|
|
},
|
|
"title": ""
|
|
},
|
|
"header": {
|
|
"align": "center",
|
|
"justify": "center",
|
|
"style": {
|
|
"classes": "table/column-header"
|
|
},
|
|
"title": "Device"
|
|
},
|
|
"justify": "center",
|
|
"number": "value",
|
|
"numberFormat": "0,0.##",
|
|
"progressBar": {
|
|
"bar": {
|
|
"color": "#62A3F6",
|
|
"linecap": "round",
|
|
"width": 5
|
|
},
|
|
"max": 100,
|
|
"track": {
|
|
"color": "#DADADA",
|
|
"linecap": "round",
|
|
"width": 2
|
|
},
|
|
"value": {
|
|
"color": "#7D7D7D",
|
|
"show": true
|
|
}
|
|
},
|
|
"render": "auto",
|
|
"resizable": false,
|
|
"sortable": true,
|
|
"strictWidth": true,
|
|
"style": {
|
|
"classes": ""
|
|
},
|
|
"toggleSwitch": {
|
|
"color": {
|
|
"selected": "#2196F3",
|
|
"unselected": "#FFFFFF"
|
|
}
|
|
},
|
|
"viewParams": {},
|
|
"viewPath": "",
|
|
"width": 175
|
|
},
|
|
{
|
|
"align": "center",
|
|
"boolean": "checkbox",
|
|
"dateFormat": "MM/DD/YYYY",
|
|
"editable": false,
|
|
"field": "description",
|
|
"footer": {
|
|
"align": "center",
|
|
"justify": "left",
|
|
"style": {
|
|
"classes": ""
|
|
},
|
|
"title": ""
|
|
},
|
|
"header": {
|
|
"align": "center",
|
|
"justify": "left",
|
|
"style": {
|
|
"classes": "table/column-header"
|
|
},
|
|
"title": "Description"
|
|
},
|
|
"justify": "auto",
|
|
"number": "value",
|
|
"numberFormat": "0,0.##",
|
|
"progressBar": {
|
|
"bar": {
|
|
"color": "#62A3F6",
|
|
"linecap": "round",
|
|
"width": 5
|
|
},
|
|
"max": 100,
|
|
"track": {
|
|
"color": "#DADADA",
|
|
"linecap": "round",
|
|
"width": 2
|
|
},
|
|
"value": {
|
|
"color": "#7D7D7D",
|
|
"show": true
|
|
}
|
|
},
|
|
"render": "auto",
|
|
"resizable": true,
|
|
"sort": "none",
|
|
"sortable": true,
|
|
"strictWidth": false,
|
|
"style": {
|
|
"classes": "",
|
|
"minWidth": "250px"
|
|
},
|
|
"toggleSwitch": {
|
|
"color": {
|
|
"selected": "#2196F3",
|
|
"unselected": "#FFFFFF"
|
|
}
|
|
},
|
|
"viewParams": {},
|
|
"viewPath": "",
|
|
"visible": true,
|
|
"width": 250
|
|
},
|
|
{
|
|
"align": "center",
|
|
"boolean": "checkbox",
|
|
"dateFormat": "MM/DD/YYYY",
|
|
"editable": false,
|
|
"field": "source",
|
|
"footer": {
|
|
"align": "center",
|
|
"justify": "left",
|
|
"style": {
|
|
"classes": ""
|
|
},
|
|
"title": ""
|
|
},
|
|
"header": {
|
|
"align": "center",
|
|
"justify": "left",
|
|
"style": {
|
|
"classes": ""
|
|
},
|
|
"title": ""
|
|
},
|
|
"justify": "auto",
|
|
"number": "value",
|
|
"numberFormat": "0,0.##",
|
|
"progressBar": {
|
|
"bar": {
|
|
"color": "",
|
|
"style": {
|
|
"classes": ""
|
|
}
|
|
},
|
|
"max": 100,
|
|
"min": 0,
|
|
"track": {
|
|
"color": "",
|
|
"style": {
|
|
"classes": ""
|
|
}
|
|
},
|
|
"value": {
|
|
"enabled": true,
|
|
"format": "0,0.##",
|
|
"justify": "center",
|
|
"style": {
|
|
"classes": ""
|
|
}
|
|
}
|
|
},
|
|
"render": "auto",
|
|
"resizable": true,
|
|
"sort": "none",
|
|
"sortable": true,
|
|
"strictWidth": false,
|
|
"style": {
|
|
"classes": ""
|
|
},
|
|
"toggleSwitch": {
|
|
"color": {
|
|
"selected": "",
|
|
"unselected": ""
|
|
}
|
|
},
|
|
"viewParams": {},
|
|
"viewPath": "",
|
|
"visible": false,
|
|
"width": ""
|
|
}
|
|
],
|
|
"pager": {
|
|
"bottom": false
|
|
},
|
|
"rows": {
|
|
"highlight": {
|
|
"enabled": false
|
|
},
|
|
"striped": {
|
|
"enabled": false
|
|
},
|
|
"style": {
|
|
"classes": "table/highlight"
|
|
}
|
|
},
|
|
"style": {
|
|
"fontFamily": "Helvetica",
|
|
"fontSize": "16px",
|
|
"fontWeight": "bold",
|
|
"zoom": 1
|
|
}
|
|
},
|
|
"scripts": {
|
|
"customMethods": [],
|
|
"extensionFunctions": null,
|
|
"messageHandlers": [
|
|
{
|
|
"messageType": "export-data",
|
|
"pageScope": true,
|
|
"script": "\tname \u003d utils.extractName(self.view.params.props.status)\n\tutils.downloadCSV(self, \"[\"+name+\"]Alarm History\")",
|
|
"sessionScope": false,
|
|
"viewScope": false
|
|
}
|
|
]
|
|
},
|
|
"type": "ia.display.table"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "root"
|
|
},
|
|
"type": "ia.container.coord"
|
|
}
|
|
} |