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": "76a78ddda3821d457961594b78cc7046b5c1e32521ea43f40e59cd5ac76112a1",
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-12-17T16:24:07Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"message": "value"
|
||||
},
|
||||
"propConfig": {
|
||||
"params.message": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 200,
|
||||
"width": 400
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.message"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"textStyle": {
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"scope": "G",
|
||||
"version": 1,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"view.json",
|
||||
"thumbnail.png"
|
||||
],
|
||||
"attributes": {
|
||||
"lastModificationSignature": "1f0bef29b4aa308d2535d3618ceaa93b48820c41686f14a4b09f38f22327f71e",
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-12-17T16:24:08Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
@@ -0,0 +1,245 @@
|
||||
{
|
||||
"custom": {},
|
||||
"events": {
|
||||
"system": {
|
||||
"onStartup": {
|
||||
"config": {
|
||||
"script": "\tself.getChild(\"root\").getChild(\"fcMain\").getChild(\"btnSave\").position.display \u003d False"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"plc": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.plc": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 250,
|
||||
"width": 400
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "lblHeader"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px",
|
||||
"grow": 0.5
|
||||
},
|
||||
"props": {
|
||||
"text": "Scenario For -\n",
|
||||
"textStyle": {
|
||||
"textAlign": "right"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "lblPLC"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.plc"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"textStyle": {
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "header"
|
||||
},
|
||||
"position": {
|
||||
"basis": "40px",
|
||||
"shrink": 0
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ddScenarios"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px",
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
"props.options": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.plc"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tplc \u003d value\n\tprovider \u003d Prime.Tools.basic.getDefaultProvider(True)\n\t\n\tscenarioPath \u003d provider + plc + \"/Scenarios\"\n\t\n\tresults \u003d system.tag.browse(scenarioPath)\n\t\n\toptions \u003d []\n\tnewOption \u003d { \"value\": \"New\", \"label\" : \"New Scenario\"}\n\toptions.append(newOption)\n\t\n\ttry:\n\t\tfor result in results.getResults():\n\t\t\toption \u003d {}\n\t\t\toption[\"value\"] \u003d str(result[\"name\"])\n\t\t\toption[\"label\"] \u003d str(result[\"name\"])\n\t\t\toptions.append(option)\n\t\treturn options\n\texcept:\n\t\treturn []\n\t\n\t",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.value": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tsystem.perspective.sendMessage(\"ButtonVisibility\", payload\u003d{}, scope\u003d\"view\")\n\t"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"placeholder": {
|
||||
"text": "Select Existing Scenario..."
|
||||
},
|
||||
"style": {
|
||||
"margin": 5
|
||||
}
|
||||
},
|
||||
"type": "ia.input.dropdown"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "tfScenarioName"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../ddScenarios.props.value"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tif \"New\" in value:\n\t\tretVal \u003d True\n\telse:\n\t\tretVal \u003d False\n\t\t\n\treturn retVal",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"deferUpdates": false,
|
||||
"placeholder": "New Scenario Name",
|
||||
"rejectUpdatesWhileFocused": false,
|
||||
"spellcheck": false,
|
||||
"style": {
|
||||
"classes": "Display/NumericEntry",
|
||||
"margin": 5,
|
||||
"marginTop": 0
|
||||
}
|
||||
},
|
||||
"type": "ia.input.text-field"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tplc \u003d self.view.params.plc\n\tddValue \u003d self.getSibling(\"ddScenarios\").props.value\n\tnewValue \u003d self.getSibling(\"tfScenarioName\").props.text\n\t\n\tif newValue !\u003d \"\":\n\t\tscenarioName \u003d newValue\n\telse:\n\t\tscenarioName \u003d ddValue\n\t\n\t\n\t\n\tPrime.PCTest.tools.savePLCScenario(plc, scenarioName)\n\t\n\tsystem.perspective.closePopup(\"SaveScenario\")"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "btnSave"
|
||||
},
|
||||
"position": {
|
||||
"basis": "70px",
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../tfScenarioName.props.text"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tscenarioVisibility \u003d self.getSibling(\"tfScenarioName\").position.display\n\texisting \u003d self.getSibling(\"ddScenarios\").props.value\n\t\n\tif (scenarioVisibility and (value !\u003d \"\")) or ((existing !\u003d \"New\") and (existing !\u003d \"\")):\n\t\treturn True\n\telse:\n\t\treturn False\n",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"margin": 10,
|
||||
"marginBottom": 15,
|
||||
"marginLeft": 15,
|
||||
"marginRight": 15
|
||||
},
|
||||
"text": "Save Scenario"
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "ButtonVisibility",
|
||||
"pageScope": false,
|
||||
"script": "\tself.refreshBinding(\"position.display\")\n\t# implement your handler here",
|
||||
"sessionScope": false,
|
||||
"viewScope": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "fcMain"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user