You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Orchestrator/ControlPanel/CP_Test.py

34 lines
1.2 KiB

# !ATTENTION - Current Control panel works only from pyOpenRPA v1.2.0!
from pyOpenRPA import Orchestrator
def CPRender(inGSettings):
lJSCheckVersion="""
lT = 9;
lY="123";
console.log(lT+1);
if (lT==9) {
alert(123)
}
"""
lResultDict={
"HeaderLeftText":"CP_TEST",
"HeaderRightText":"NAME",
"DataStorageKey":"", #Use key for set current dict in mGlobal.DataStorage["DataStorageKey"] on client side
"SubheaderText":"",
"BodyKeyValueList":[
{"Key": "HTMLLinkURL", "Value": Orchestrator.Web.Basic.HTMLLinkURL(inURLStr="test",inColorStr="orange")},
{"Key": "HTMLLinkJSOnClick", "Value": Orchestrator.Web.Basic.HTMLLinkJSOnClick(inJSOnClickStr=lJSCheckVersion, inTitleStr="!Click me!",inColorStr="green")},
],
"FooterText":"",
"FooterButtonX2List":[],
"FooterButtonX1List":[],
"GlobalStorage": "" # UNCOMMENT FOR DEBUG PURPOSE TO WATCH inGSettings on client side
}
return lResultDict
# Check in control panel, that process is runnning
#Orchestrator settings
def SettingsUpdate(inGSettings):
inGSettings["ControlPanelDict"]["RobotList"].append({"RenderFunction": CPRender, "KeyStr": "TEST"})
return inGSettings