Began Framework start
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"scope": "G",
|
||||
"version": 1,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"view.json",
|
||||
"thumbnail.png"
|
||||
],
|
||||
"attributes": {
|
||||
"lastModificationSignature": "3f0d9c2773e3a2c1c17206bb99a4d40a7fb550fd0be9f08d098bfdb1048158d0",
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-12-17T16:24:07Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
@@ -0,0 +1,122 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"deviceType": "vsd",
|
||||
"tagPath": "[TestingPlatform]DFW2_DC1_PLC_01_A11/R0"
|
||||
},
|
||||
"propConfig": {
|
||||
"params.deviceType": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"data": "{parent.custom.data}",
|
||||
"dims": "{parent.custom.viewDims}",
|
||||
"width": "{page.props.dimensions.primaryView.width}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\twidth \u003d value[\"width\"]\n#\tusing the viewport width to create a media query\n\n\tif width \u003e\u003d 0 and width \u003c (3.05 * value[\"dims\"][\"width\"]):\n\t\tgridWidth \u003d 2\n\telif width \u003e\u003d (3.05 * value[\"dims\"][\"width\"]) and width \u003c (4.05 * value[\"dims\"][\"width\"]):\n\t\tgridWidth \u003d 3\n\telif width \u003e\u003d (4.05 * value[\"dims\"][\"width\"]) and width \u003c (5.05 * value[\"dims\"][\"width\"]):\n\t\tgridWidth \u003d 4\n\telse:\n\t\tgridWidth \u003d 5\n\t\n#\tretrieve the original dataset in the root \n\ttheData \u003d value[\"data\"]\n\t\n#\tinitialize 2D array\n\tfinalData \u003d []\n\tdataRow \u003d []\n\t\n#\tenumerate in python lets you loop through an array with each index and value \n\tfor idx, val in enumerate(theData):\n\t\n#\tusing modulo with the index and gridWith \n\t\tif ((idx + 1) % gridWidth \u003d\u003d 0):\n\t\t\tdataRow.append(val)\n\t\t\tinstance \u003d {\u0027data\u0027: dataRow}\n\t\t\tfinalData.append(instance)\n\t\t\tdataRow \u003d []\n\t\t\t\n\t\telse:\n\t\t\tdataRow.append(val)\n\t\t\t\n#\t\t\tremaining data and blanks\n\t\t\tif idx \u003d\u003d len(theData)-1 and len(dataRow) !\u003d 0:\n\t\t\t\tblanks \u003d gridWidth - len(dataRow)\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tinstance \u003d {\u0027data\u0027: dataRow}\t\n\t\t\t\tfinalData.append(instance)\n\t\n#\tself.props.instances \u003d []\n\treturn finalData",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"elementPosition": {
|
||||
"basis": "auto",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"path": "dynamicGrid/gridRow",
|
||||
"style": {
|
||||
"margin": 1
|
||||
},
|
||||
"useDefaultViewWidth": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tpath \u003d value\n\n\tpathList \u003d system.tag.browse(path, filter\u003d{\"recursive\": True, \"tagType\":\"UdtInstance\"})\n\tdevice \u003d \"\"\n\tdata \u003d []\n\tindex \u003d 1\n\tsortedData \u003d []\n\tdims \u003d self.custom.viewDims\n\t\n\tif path !\u003d \"\":\n\t\tfor result in pathList.getResults():\n\t\t\ttypeID \u003d str(result[\"typeId\"])\n\t\t\tfullPath \u003d str(result[\"fullPath\"])\n\t\n\t\t\tif (\"Library\" in typeID) and (device in typeID):\n\t\t\t\tprint result\n\t\t\t\taddressBrowse \u003d system.tag.browse(fullPath, filter \u003d{\"recursive\":True, \"name\":\"Address\"})\n\t\t\t\taddressPath \u003d str(addressBrowse[0][\"fullPath\"])\n\t\t\n\t\t\t\taddressRead \u003d system.tag.readBlocking([addressPath])\n\t\t\t\tioAddress \u003d addressRead[0].value\n\t\n\t\t\t\tpointData \u003d {\n\t\t\t\t\t\t\t\t\"tagPath\": fullPath,\n\t\t\t\t\t\t\t\t\"address\": ioAddress,\n\t\t\t\t\t\t\t\t\"dims\": dims,\n\t\t\t\t\t\t\t\t\"index\" : index\n\t\t\t\t\t\t\t\t}\n\t\t\t\tindex \u003d index + 1\n\t\t\t\t\n\t\t\t\tdata.append(pointData)\n\t\tsortedData \u003d sorted(data, key\u003dlambda x: x[\"address\"])\n\t\t\n\t\t\n\tfor i in range(0, len(sortedData)):\n\t\tsortedData[i][\"index\"] \u003d i\n\treturn sortedData",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"custom.key": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tpath \u003d value\n#\tlibPath \u003d \"[TestingPlatform]System/Library\"\n#\tlibValue \u003d system.tag.readBlocking([libPath])[0].value\n#\tlibValue \u003d system.dataset.toPyDataSet(libValue)\n\tpathList \u003d system.tag.browse(path, filter\u003d{\"recursive\": True, \"tagType\":\"UdtInstance\"})\n\t\n\tdata \u003d []\n\tindex \u003d 1\n\tsortedData \u003d []\n\tdims \u003d self.custom.viewDims\n\t\n\tif path !\u003d \"\":\n\t\tfor result in pathList.getResults():\n\t\t\ttypeID \u003d str(result[\"typeId\"])\n\t\t\tfullPath \u003d str(result[\"fullPath\"])\n\t\t\tif \"Points\" not in typeID:\n\t\t\t\taddressBrowse \u003d system.tag.browse(fullPath, filter \u003d{\"recursive\":True, \"name\":\"Address\"})\n\t\t\t\taddressPath \u003d str(addressBrowse[0][\"fullPath\"])\n\t\t\n\t\t\t\taddressRead \u003d system.tag.readBlocking([addressPath])\n\t\t\t\tioAddress \u003d addressRead[0].value\n\t\n\t\t\t\tpointData \u003d {\n\t\t\t\t\t\t\t\t\"tagPath\": fullPath,\n\t\t\t\t\t\t\t\t\"address\": ioAddress,\n\t\t\t\t\t\t\t\t\"dims\": dims,\n\t\t\t\t\t\t\t\t\"index\" : index\n\t\t\t\t\t\t\t\t}\n\t\t\t\tindex \u003d index + 1\n\t\t\t\t\n\t\t\t\tdata.append(pointData)\n\t\t\tsortedData \u003d sorted(data, key\u003dlambda x: x[\"address\"])\n\t\t\n\t\t\n\tfor i in range(0, len(sortedData)):\n\t\tsortedData[i][\"index\"] \u003d i\n\treturn sortedData",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"custom.viewDims": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.deviceType"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tdims \u003d {}\n\ttagPath \u003d self.view.params.tagPath\n\tif value \u003d\u003d \"ValveC\" or value \u003d\u003d \"ValveMO\":\n\t\twidth \u003d 500\n\t\theight \u003d 450\n\telif value \u003d\u003d \"VSD\":\n\t\twidth \u003d 500\n\t\theight \u003d 600\n\telif value \u003d\u003d \"Motor\":\n\t\twidth \u003d 500\n\t\theight \u003d 400\n\telif value \u003d\u003d \"\" and tagPath is not None:\n\t\twidth \u003d 500\n\t\theight \u003d 600\n\telse:\n\t\twidth \u003d 400\n\t\theight \u003d 250\n\t\n\tdims[\"width\"] \u003d width\n\tdims[\"height\"] \u003d height\n\t\n\treturn dims",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"backgroundColor": "--neutral-30"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"scope": "G",
|
||||
"version": 1,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"view.json",
|
||||
"thumbnail.png"
|
||||
],
|
||||
"attributes": {
|
||||
"lastModificationSignature": "8829169e531bf5aafb667e48c19db322b6a222fa85c31290aad03c183d98c6f5",
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-12-17T16:24:07Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"custom": {
|
||||
"key": {
|
||||
"address": "Default",
|
||||
"dims": {
|
||||
"height": 250,
|
||||
"width": 400
|
||||
},
|
||||
"index": 0,
|
||||
"tagPath": "[TestingPlatform]DFW2_DC1_PLC_01_A11/VSD/DFW2_DC1_CHWP_1RT40_A11"
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"dims": {
|
||||
"height": 550,
|
||||
"width": 500
|
||||
},
|
||||
"index": "value",
|
||||
"tagPath": "[TestingPlatform]DFW2_DC1_PLC_01_A11/VSD/DFW2_DC1_CHWP_1RT40_A11"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.key": {
|
||||
"persistent": true
|
||||
},
|
||||
"params.dims": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.index": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"props.defaultSize.height": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.dims.height"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.defaultSize.width": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.dims.width"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.params.tagPath}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tconfig \u003d system.tag.getConfiguration(value, False)\n\n\tviewPath \u003d \"Objects/\" + config[0][\"typeId\"]\n\treturn viewPath",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"index": "value"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"backgroundColor": "--neutral-10",
|
||||
"borderBottomLeftRadius": 10,
|
||||
"borderBottomRightRadius": 10,
|
||||
"borderColor": "--neutral-100",
|
||||
"borderStyle": "solid",
|
||||
"borderTopLeftRadius": 10,
|
||||
"borderTopRightRadius": 10,
|
||||
"borderWidth": 1,
|
||||
"margin": 5
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"scope": "G",
|
||||
"version": 1,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"view.json",
|
||||
"thumbnail.png"
|
||||
],
|
||||
"attributes": {
|
||||
"lastModificationSignature": "21d095ba70153289ae6383a0b9143e4bb26ed08a492158d062237d8a0414005a",
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-12-17T16:24:07Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"data": [
|
||||
{
|
||||
"address": "Default",
|
||||
"dims": {
|
||||
"height": 250,
|
||||
"width": 400
|
||||
},
|
||||
"index": 0,
|
||||
"tagPath": "[TestingPlatform]DFW2_DC1_PLC_01_A11/VSD/DFW2_DC1_CHWP_1RT40_A11"
|
||||
}
|
||||
],
|
||||
"index": "value"
|
||||
},
|
||||
"propConfig": {
|
||||
"params.data": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.index": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"props.defaultSize.height": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.data[0].dims.height"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isGood({value}),{value},300)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1024
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.data"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elementPosition": {
|
||||
"shrink": 0
|
||||
},
|
||||
"path": "dynamicGrid/PointItem",
|
||||
"style": {
|
||||
"borderStyle": "none"
|
||||
},
|
||||
"useDefaultViewHeight": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"alignContent": "center",
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user