|
|
@ -1,4 +1,5 @@
|
|
|
|
import json
|
|
|
|
import json
|
|
|
|
|
|
|
|
import copy
|
|
|
|
from inspect import signature # For detect count of def args
|
|
|
|
from inspect import signature # For detect count of def args
|
|
|
|
#ControlPanelDict
|
|
|
|
#ControlPanelDict
|
|
|
|
from desktopmagic.screengrab_win32 import (
|
|
|
|
from desktopmagic.screengrab_win32 import (
|
|
|
@ -55,7 +56,7 @@ def HiddenCPDictGenerate(inRequest, inGSettings):
|
|
|
|
|
|
|
|
|
|
|
|
# Return {"Key":{"",""}}
|
|
|
|
# Return {"Key":{"",""}}
|
|
|
|
def HiddenRDPDictGenerate(inRequest, inGSettings):
|
|
|
|
def HiddenRDPDictGenerate(inRequest, inGSettings):
|
|
|
|
lRDPDict = {}
|
|
|
|
lRDPDict = {"HandlebarsList":[]}
|
|
|
|
# Iterate throught the RDP list
|
|
|
|
# Iterate throught the RDP list
|
|
|
|
for lRDPSessionKeyStrItem in inGSettings["RobotRDPActive"]["RDPList"]:
|
|
|
|
for lRDPSessionKeyStrItem in inGSettings["RobotRDPActive"]["RDPList"]:
|
|
|
|
lRDPConfiguration = inGSettings["RobotRDPActive"]["RDPList"][
|
|
|
|
lRDPConfiguration = inGSettings["RobotRDPActive"]["RDPList"][
|
|
|
@ -68,8 +69,26 @@ def HiddenRDPDictGenerate(inRequest, inGSettings):
|
|
|
|
"FullScreenRDPSessionKeyStr"] else False # Check the full screen for rdp window
|
|
|
|
"FullScreenRDPSessionKeyStr"] else False # Check the full screen for rdp window
|
|
|
|
lDataItemDict["IsIgnoredBool"] = lRDPConfiguration["SessionIsIgnoredBool"] # Is ignored
|
|
|
|
lDataItemDict["IsIgnoredBool"] = lRDPConfiguration["SessionIsIgnoredBool"] # Is ignored
|
|
|
|
lRDPDict[lDataItemDict["SessionKeyStr"]].append(lDataItemDict)
|
|
|
|
lRDPDict[lDataItemDict["SessionKeyStr"]].append(lDataItemDict)
|
|
|
|
|
|
|
|
lHandlebarsDataItemDict = copy.deepcopy(lDataItemDict)
|
|
|
|
|
|
|
|
lHandlebarsDataItemDict["SessionKeyStr"]=lDataItemDict["SessionKeyStr"]
|
|
|
|
|
|
|
|
lRDPDict["HandlebarsList"].append(lHandlebarsDataItemDict)
|
|
|
|
return lRDPDict
|
|
|
|
return lRDPDict
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Return {"HostNameUpperStr;UserUpperStr":{"IsListenBool":True}, "HandlebarsList":[{"HostnameUpperStr":"","UserUpperStr":"","IsListenBool":True}]}
|
|
|
|
|
|
|
|
def HiddenAgentDictGenerate(inRequest, inGSettings):
|
|
|
|
|
|
|
|
lAgentDict = {"HandlebarsList":[]}
|
|
|
|
|
|
|
|
# Iterate throught the RDP list
|
|
|
|
|
|
|
|
for lAgentItemKeyStrItem in inGSettings["AgentDict"]:
|
|
|
|
|
|
|
|
lKeyStr = f"{lAgentItemKeyStrItem[0]};{lAgentItemKeyStrItem[1]}" # turple ("HostNameUpperStr","UserUpperStr") > Str "HostNameUpperStr;UserUpperStr"
|
|
|
|
|
|
|
|
lDataItemDict = inGSettings["AgentDict"][lAgentItemKeyStrItem]
|
|
|
|
|
|
|
|
lAgentDict[lKeyStr]=lDataItemDict
|
|
|
|
|
|
|
|
lHandlebarsDataItemDict = copy.deepcopy(lDataItemDict)
|
|
|
|
|
|
|
|
lHandlebarsDataItemDict["HostnameUpperStr"]=lAgentItemKeyStrItem[0]
|
|
|
|
|
|
|
|
lHandlebarsDataItemDict["UserUpperStr"]=lAgentItemKeyStrItem[1]
|
|
|
|
|
|
|
|
lAgentDict["HandlebarsList"].append(lHandlebarsDataItemDict)
|
|
|
|
|
|
|
|
return lAgentDict
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#v1.2.0 Send data container to the client from the server
|
|
|
|
#v1.2.0 Send data container to the client from the server
|
|
|
|
# /pyOpenRPA/ServerData return {"HashStr" , "ServerDataDict": {"CPKeyStr":{"HTMLStr":"", DataDict:{}}}}
|
|
|
|
# /pyOpenRPA/ServerData return {"HashStr" , "ServerDataDict": {"CPKeyStr":{"HTMLStr":"", DataDict:{}}}}
|
|
|
|
|
|
|
|
|
|
|
@ -90,7 +109,8 @@ def pyOpenRPA_ServerData(inRequest,inGSettings):
|
|
|
|
lServerDataDict = {
|
|
|
|
lServerDataDict = {
|
|
|
|
"CPDict": HiddenCPDictGenerate(inRequest=inRequest, inGSettings=inGSettings),
|
|
|
|
"CPDict": HiddenCPDictGenerate(inRequest=inRequest, inGSettings=inGSettings),
|
|
|
|
"RDPDict": HiddenRDPDictGenerate(inRequest=inRequest, inGSettings=inGSettings),
|
|
|
|
"RDPDict": HiddenRDPDictGenerate(inRequest=inRequest, inGSettings=inGSettings),
|
|
|
|
"UserDict": {"UACClientDict": inRequest.OpenRPA["DefUserRoleHierarchyGet"]()}
|
|
|
|
"AgentDict": HiddenAgentDictGenerate(inRequest=inRequest, inGSettings=inGSettings),
|
|
|
|
|
|
|
|
"UserDict": {"UACClientDict": inRequest.OpenRPA["DefUserRoleHierarchyGet"]()},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
# Create JSON
|
|
|
|
# Create JSON
|
|
|
|
lServerDataDictJSONStr = json.dumps(lServerDataDict)
|
|
|
|
lServerDataDictJSONStr = json.dumps(lServerDataDict)
|
|
|
|