From 74c355f679ee9b0ae452b71a412e38e1cb714d78 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Thu, 5 Dec 2019 20:41:39 +0300 Subject: [PATCH] RobotRDPActive: Add Ignore functionality, minor fix --- .../Settings/ControlPanel_RobotRDPActive.py | 69 +++++++++++++++++-- .../INSTALLER | 0 .../pyOpenRPA-1.0.37.dist-info}/METADATA | 2 +- .../pyOpenRPA-1.0.37.dist-info}/RECORD | 16 ++--- .../WHEEL | 0 .../top_level.txt | 0 .../pyOpenRPA/Orchestrator/Server.py | 4 +- .../pyOpenRPA/Tools/RobotRDPActive/Monitor.py | 30 ++++---- .../Lib/site-packages/pyOpenRPA/__init__.py | 2 +- .../INSTALLER | 0 .../pyOpenRPA-1.0.37.dist-info}/METADATA | 2 +- .../pyOpenRPA-1.0.37.dist-info}/RECORD | 16 ++--- .../WHEEL | 0 .../top_level.txt | 0 .../pyOpenRPA/Orchestrator/Server.py | 4 +- .../pyOpenRPA/Tools/RobotRDPActive/Monitor.py | 30 ++++---- .../Lib/site-packages/pyOpenRPA/__init__.py | 2 +- Sources/pyOpenRPA/Orchestrator/Server.py | 4 +- .../pyOpenRPA/Tools/RobotRDPActive/Monitor.py | 30 ++++---- Sources/pyOpenRPA/__init__.py | 2 +- .../SettingsRobotRDPActiveExample.py | 5 +- changelog.md | 2 + v1.0.36 => v1.0.37 | 0 23 files changed, 150 insertions(+), 70 deletions(-) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.0.36.dist-info => pyOpenRPA-1.0.37.dist-info}/INSTALLER (100%) rename Resources/{WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info => WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info}/METADATA (99%) rename Resources/{WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info => WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info}/RECORD (97%) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.0.36.dist-info => pyOpenRPA-1.0.37.dist-info}/WHEEL (100%) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.0.36.dist-info => pyOpenRPA-1.0.37.dist-info}/top_level.txt (100%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.0.36.dist-info => pyOpenRPA-1.0.37.dist-info}/INSTALLER (100%) rename Resources/{WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info => WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info}/METADATA (99%) rename Resources/{WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info => WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info}/RECORD (97%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.0.36.dist-info => pyOpenRPA-1.0.37.dist-info}/WHEEL (100%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.0.36.dist-info => pyOpenRPA-1.0.37.dist-info}/top_level.txt (100%) rename v1.0.36 => v1.0.37 (100%) diff --git a/Orchestrator/Settings/ControlPanel_RobotRDPActive.py b/Orchestrator/Settings/ControlPanel_RobotRDPActive.py index 3e625a6f..2ecce44f 100644 --- a/Orchestrator/Settings/ControlPanel_RobotRDPActive.py +++ b/Orchestrator/Settings/ControlPanel_RobotRDPActive.py @@ -2,6 +2,7 @@ import psutil import datetime import logging import os +import json lProcessName = "OpenRPA_RobotRDPActive.exe" lStartFilePath = os.path.join(os.getcwd(), "..\\Utils\\RobotRDPActive\\pyOpenRPA.Tools.RobotRDPActive_x64.cmd") def RenderRobotRDPActive(inGlobalConfiguration): @@ -20,7 +21,7 @@ def RenderRobotRDPActive(inGlobalConfiguration): lResultDict={ "HeaderLeftText":"Keep active RDP sessions", "HeaderRightText":"Tech", - "DataStorageKey":"RobotRDPActive", #Use key for set current dict in mGlobal.DataStorage["DtaaStorageKey"] on client side + "DataStorageKey":"RobotRDPActive", #Use key for set current dict in mGlobal.DataStorage["DataStorageKey"] on client side "SubheaderText":lSubheaderRunFalseText, "BodyKeyValueList":[ {"Key":"Session list","Value":""} @@ -42,16 +43,29 @@ def RenderRobotRDPActive(inGlobalConfiguration): for lItem in lRDPList: #Lable that session has fullscreen lLabelSessionFullScreen = "" + lLabelIsIgnored = "" #Link set full screen + ############################## lOnClickSetFullScreen = f"mGlobal.Processor.ServerValueSet(['Storage','RobotRDPActive','OrchestratorToRobotStorage','FullScreenSessionIndex'],{lRDPListIndex});" lSetFullScreenA = f'Set fullscreen' if lRDPListIndex == lFullScreenSessionIndex: - lLabelSessionFullScreen = 'Fullscreen' + lLabelSessionFullScreen = '[Fullscreen]' + lOnClickSetFullScreen = f"mGlobal.Processor.ServerValueSet(['Storage','RobotRDPActive','OrchestratorToRobotStorage','FullScreenSessionIndex'],null);" + lSetFullScreenA = f'Set minimized' + ################################# + lIgnoreIndexListOnClick = "$.ajax({type: 'POST', url: 'RobotRDPActive/IgnoreIndexListAppend', data: '"+str(lRDPListIndex)+"', success: function(lData,l2,l3){}, dataType: 'text'});" + lIgnoreIndexListLink = f'Ignore' + #Check if in ignore + if lRDPListIndex in inGlobalConfiguration.get("Storage",{}).get("RobotRDPActive",{}).get("OrchestratorToRobotStorage",{}).get("IgnoreIndexList",[]): + lLabelIsIgnored = '[Ignored]' + lIgnoreIndexListOnClick = "$.ajax({type: 'POST', url: 'RobotRDPActive/IgnoreIndexListRemove', data: '"+str(lRDPListIndex)+"', success: function(lData,l2,l3){}, dataType: 'text'});" + lIgnoreIndexListLink = f'Unignore' + ################################ #Session state lItemSessionState='Disconnected' if lItem.get("FlagSessionIsActive",False): lItemSessionState='Connected' - lResultDict["BodyKeyValueList"].append({"Key":f"[{str(lRDPListIndex)}]{lLabelSessionFullScreen}{lItem.get('Host','localhost')}:{lItem.get('Port','--')}","Value":f"{lItem.get('Login','--')}, {lItem.get('SessionHex','--')}, State {lItemSessionState}, {lSetFullScreenA}"}) + lResultDict["BodyKeyValueList"].append({"Key":f"[{str(lRDPListIndex)}]{lLabelSessionFullScreen}{lLabelIsIgnored}{lItem.get('Host','localhost')}:{lItem.get('Port','--')}","Value":f"{lItem.get('Login','--')}, {lItem.get('SessionHex','--')}, State {lItemSessionState}, {lSetFullScreenA}, {lIgnoreIndexListLink}"}) lRDPListIndex = lRDPListIndex + 1 #Check if process running if CheckIfProcessRunning("OpenRPA_RobotRDPActive"): @@ -59,7 +73,32 @@ def RenderRobotRDPActive(inGlobalConfiguration): #Process not running lResultDict["FooterText"]=f'Last update: {datetime.datetime.now().strftime("%H:%M:%S %d.%m.%Y")}' return lResultDict - +#Add to ignore list +def IgnoreIndexListAppend(inRequest,inConfiguration): + lIgnoreList = inConfiguration["Storage"]["RobotRDPActive"]["OrchestratorToRobotStorage"]["IgnoreIndexList"] + lIgnoreIndex={} + if inRequest.headers.get('Content-Length') is not None: + lInputByteArrayLength = int(inRequest.headers.get('Content-Length')) + lInputByteArray=inRequest.rfile.read(lInputByteArrayLength) + #Превращение массива байт в объект + lIgnoreIndex=int(lInputByteArray.decode('utf8')) + #check if index not in list + if lIgnoreIndex not in lIgnoreList: + #append to list + lIgnoreList.append(lIgnoreIndex) +#remove from Ignore list +def IgnoreIndexListRemove(inRequest,inConfiguration): + lIgnoreList = inConfiguration["Storage"]["RobotRDPActive"]["OrchestratorToRobotStorage"]["IgnoreIndexList"] + lIgnoreIndex={} + if inRequest.headers.get('Content-Length') is not None: + lInputByteArrayLength = int(inRequest.headers.get('Content-Length')) + lInputByteArray=inRequest.rfile.read(lInputByteArrayLength) + #Превращение массива байт в объект + lIgnoreIndex=int(lInputByteArray.decode('utf8')) + #check if index not in list + if lIgnoreIndex in lIgnoreList: + #append to list + lIgnoreList.remove(lIgnoreIndex) #Remove delete the element lIgnoreIndex def CheckIfProcessRunning(processName): ''' Check if there is any running process that contains the given name processName. @@ -81,6 +120,26 @@ def SettingsUpdate(inDict): #Default structure inDict["Storage"]["RobotRDPActive"]={ "OrchestratorToRobotResetStorage":{"SafeTurnOff":False}, - "OrchestratorToRobotStorage":{"FullScreenSessionIndex":None} + "OrchestratorToRobotStorage":{ + "FullScreenSessionIndex":None, + "IgnoreIndexList": [] + } } + #Add methods + inDict["Server"]["URLList"].append( + { + "Method":"POST", + "URL": "/RobotRDPActive/IgnoreIndexListAppend", #URL of the request + "MatchType": "Equal", #"BeginWith|Contains|Equal|EqualCase", + "ResponseDefRequestGlobal": IgnoreIndexListAppend #Function with str result + } + ) + inDict["Server"]["URLList"].append( + { + "Method":"POST", + "URL": "/RobotRDPActive/IgnoreIndexListRemove", #URL of the request + "MatchType": "Equal", #"BeginWith|Contains|Equal|EqualCase", + "ResponseDefRequestGlobal": IgnoreIndexListRemove #Function with str result + } + ) return inDict \ No newline at end of file diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/INSTALLER b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/INSTALLER similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/INSTALLER rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/INSTALLER diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/METADATA b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/METADATA similarity index 99% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/METADATA rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/METADATA index 02fa2391..6b4d8af7 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/METADATA +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pyOpenRPA -Version: 1.0.36 +Version: 1.0.37 Summary: First open source RPA platform for business Home-page: https://gitlab.com/UnicodeLabs/OpenRPA Author: Ivan Maslov diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/RECORD b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/RECORD similarity index 97% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/RECORD rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/RECORD index 890fdf44..c76a61a0 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/RECORD +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/RECORD @@ -1,11 +1,11 @@ -pyOpenRPA-1.0.36.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -pyOpenRPA-1.0.36.dist-info/METADATA,sha256=njMhevPuVqHUt6Cy5LO1P47PiVpGWN1oPFhTCHyZ0vc,3510 -pyOpenRPA-1.0.36.dist-info/RECORD,, -pyOpenRPA-1.0.36.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 -pyOpenRPA-1.0.36.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 +pyOpenRPA-1.0.37.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +pyOpenRPA-1.0.37.dist-info/METADATA,sha256=NvEs1xItXmuAnPaTzTs5kDpr6NhwdD4_WyFwvG9UTLo,3510 +pyOpenRPA-1.0.37.dist-info/RECORD,, +pyOpenRPA-1.0.37.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 +pyOpenRPA-1.0.37.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 pyOpenRPA/Orchestrator/Orchestrator.py,sha256=UKp7eqvWDM91kYLwl2mo0UB8Pw-qu8eJCsR9NEXD1aU,6436 pyOpenRPA/Orchestrator/Processor.py,sha256=HQQyOVX-d5vPO-YULyTxVOtXtUMfvpAaSVO4xXxaKVI,9107 -pyOpenRPA/Orchestrator/Server.py,sha256=dqTCK9HPhNJNgHv931uohIlW48BUvDhWMVhXaDagM1w,22134 +pyOpenRPA/Orchestrator/Server.py,sha256=aWDecl4_UUU00YG-pOXxyL7IvN5NK3efABt92y6M2kg,22136 pyOpenRPA/Orchestrator/ServerSettings.py,sha256=jOXJTLwg8cJx6D-rN8J4dn5RCb2nepAhCH4F9hYVUdM,4912 pyOpenRPA/Orchestrator/Timer.py,sha256=FQZ3y6G9d47Ybx7RewzePKQV77H4gCkx5SaeFVlsuhc,2095 pyOpenRPA/Orchestrator/Web/Index.xhtml,sha256=su4tsDD_ZMbQz6Tbmqj55SM0ZZxuQw9tfPcytaB8wzs,32953 @@ -236,7 +236,7 @@ pyOpenRPA/Studio/__pycache__/ValueVerify.cpython-37.pyc,, pyOpenRPA/Studio/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Studio/__pycache__/__main__.cpython-37.pyc,, pyOpenRPA/Tools/RobotRDPActive/Connector.py,sha256=qU5SXwHgQU177MjqEHyOwJDLAcSVnIkKKw76iD09J1w,7275 -pyOpenRPA/Tools/RobotRDPActive/Monitor.py,sha256=_exwsVgoVzN6kKFjiZfnMoq89ckc70BgfFmDMlg8fUI,2643 +pyOpenRPA/Tools/RobotRDPActive/Monitor.py,sha256=H7ciateTh-hml8z69EYZjYgqdTZGkDRtnFwuYnytrCw,3278 pyOpenRPA/Tools/RobotRDPActive/Template.rdp,sha256=qPCLkjzTdYKURK7nRApkPUjRuS4K20vDPj9DIUNSSkE,2392 pyOpenRPA/Tools/RobotRDPActive/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/RobotRDPActive/__main__.py,sha256=mVk8zVqcBrzAwwn7tbZPXFWTQbWUkgU6w89nbY6GN-8,2340 @@ -255,5 +255,5 @@ pyOpenRPA/Tools/RobotScreenActive/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Tools/RobotScreenActive/__pycache__/__main__.cpython-37.pyc,, pyOpenRPA/Tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/__pycache__/__init__.cpython-37.pyc,, -pyOpenRPA/__init__.py,sha256=45sI6ciP8porZrJBf8_tLoVCcY6ai1GpMTD79np0oKQ,175 +pyOpenRPA/__init__.py,sha256=32Po3gFALn9l6ft6LTFVJBkBj-1p5hP83AVcQ_FTa0s,175 pyOpenRPA/__pycache__/__init__.cpython-37.pyc,, diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/WHEEL b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/WHEEL similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/WHEEL rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/WHEEL diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/top_level.txt b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/top_level.txt similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/top_level.txt rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/top_level.txt diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/Server.py b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/Server.py index 0b490fb4..e5d54b87 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/Server.py +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/Server.py @@ -273,7 +273,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): self.wfile.write(inResponseDict["Body"]) def do_GET(self): # Prepare result dict - lResponseDict = {"Headers": {}, "SetCookies": {}, "Body": "", "StatusCode": None} + lResponseDict = {"Headers": {}, "SetCookies": {}, "Body": b"", "StatusCode": None} self.OpenRPAResponseDict = lResponseDict ##################################### #Do authentication @@ -337,7 +337,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): def do_POST(self): # Prepare result dict #pdb.set_trace() - lResponseDict = {"Headers": {}, "SetCookies":{}, "Body": "", "StatusCode": None} + lResponseDict = {"Headers": {}, "SetCookies":{}, "Body": b"", "StatusCode": None} self.OpenRPAResponseDict = lResponseDict ##################################### #Do authentication diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py index af9f4f92..c65ac8a6 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py @@ -8,7 +8,8 @@ def Monitor(inGlobalDict, inListUpdateTimeout): while lFlagWhile: # UIOSelector list init lUIOSelectorList = [] - for lItem in inGlobalDict["RDPList"]: + #Prepare selectors list for check + for lIndex, lItem in enumerate(inGlobalDict["RDPList"]): lUIOSelectorList.append([{"title_re": f"{lItem['SessionHex']}.*", "backend": "win32"}]) #Run wait command lRDPDissappearList = UIDesktop.UIOSelectorsSecs_WaitDisappear_List(lUIOSelectorList, inListUpdateTimeout) @@ -25,25 +26,30 @@ def Monitor(inGlobalDict, inListUpdateTimeout): return ########################################### ########################################### + for lItem in lRDPDissappearList: + inGlobalDict["RDPList"][lItem]["FlagSessionIsActive"] = False # Set flag that session is disconnected + #pdb.set_trace() + #Session start if it is not in ignore list + #add check for selector if it is not in ignoreIndexList + if lItem not in inGlobalDict["OrchestratorToRobotStorage"]["IgnoreIndexList"]: + try: + Connector.Session(inGlobalDict["RDPList"][lItem]) + inGlobalDict["RDPList"][lItem]["FlagSessionIsActive"] = True # Flag that session is started + except Exception: + pass + ########################################### #Check if from Orchestrator full screen session is set if inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] != inGlobalDict["FullScreenSessionIndex"]: #Do some switches #If full screen mode we have now if inGlobalDict["FullScreenSessionIndex"] is not None: - Connector.SessionScreen100x550(inGlobalDict["RDPList"][inGlobalDict["FullScreenSessionIndex"]]["SessionHex"]) + if inGlobalDict["RDPList"][inGlobalDict["FullScreenSessionIndex"]]["FlagSessionIsActive"]: + Connector.SessionScreen100x550(inGlobalDict["RDPList"][inGlobalDict["FullScreenSessionIndex"]]["SessionHex"]) #If new session is setted if inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] is not None: - Connector.SessionScreenFull(inGlobalDict["RDPList"][inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"]]["SessionHex"]) + if inGlobalDict["RDPList"][inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"]]["FlagSessionIsActive"]: + Connector.SessionScreenFull(inGlobalDict["RDPList"][inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"]]["SessionHex"]) #Set one to other equal inGlobalDict["FullScreenSessionIndex"] = inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] - ########################################### - for lItem in lRDPDissappearList: - inGlobalDict["RDPList"][lItem]["FlagSessionIsActive"] = False # Set flag that session is disconnected - #pdb.set_trace() - #Session start - try: - Connector.Session(inGlobalDict["RDPList"][lItem]) - except Exception: - pass return None #TODO Def garbage window cleaner (if connection was lost) \ No newline at end of file diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/__init__.py b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/__init__.py index aeca3c0d..eeeef317 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/__init__.py +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/__init__.py @@ -3,7 +3,7 @@ r""" The OpenRPA package (from UnicodeLabs) """ -__version__ = 'v1.0.36' +__version__ = 'v1.0.37' __all__ = [] __author__ = 'Ivan Maslov ' #from .Core import Robot \ No newline at end of file diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/INSTALLER b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/INSTALLER similarity index 100% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/INSTALLER rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/INSTALLER diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/METADATA b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/METADATA similarity index 99% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/METADATA rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/METADATA index 02fa2391..6b4d8af7 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/METADATA +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pyOpenRPA -Version: 1.0.36 +Version: 1.0.37 Summary: First open source RPA platform for business Home-page: https://gitlab.com/UnicodeLabs/OpenRPA Author: Ivan Maslov diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/RECORD b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/RECORD similarity index 97% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/RECORD rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/RECORD index 890fdf44..c76a61a0 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/RECORD +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/RECORD @@ -1,11 +1,11 @@ -pyOpenRPA-1.0.36.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -pyOpenRPA-1.0.36.dist-info/METADATA,sha256=njMhevPuVqHUt6Cy5LO1P47PiVpGWN1oPFhTCHyZ0vc,3510 -pyOpenRPA-1.0.36.dist-info/RECORD,, -pyOpenRPA-1.0.36.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 -pyOpenRPA-1.0.36.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 +pyOpenRPA-1.0.37.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +pyOpenRPA-1.0.37.dist-info/METADATA,sha256=NvEs1xItXmuAnPaTzTs5kDpr6NhwdD4_WyFwvG9UTLo,3510 +pyOpenRPA-1.0.37.dist-info/RECORD,, +pyOpenRPA-1.0.37.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 +pyOpenRPA-1.0.37.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 pyOpenRPA/Orchestrator/Orchestrator.py,sha256=UKp7eqvWDM91kYLwl2mo0UB8Pw-qu8eJCsR9NEXD1aU,6436 pyOpenRPA/Orchestrator/Processor.py,sha256=HQQyOVX-d5vPO-YULyTxVOtXtUMfvpAaSVO4xXxaKVI,9107 -pyOpenRPA/Orchestrator/Server.py,sha256=dqTCK9HPhNJNgHv931uohIlW48BUvDhWMVhXaDagM1w,22134 +pyOpenRPA/Orchestrator/Server.py,sha256=aWDecl4_UUU00YG-pOXxyL7IvN5NK3efABt92y6M2kg,22136 pyOpenRPA/Orchestrator/ServerSettings.py,sha256=jOXJTLwg8cJx6D-rN8J4dn5RCb2nepAhCH4F9hYVUdM,4912 pyOpenRPA/Orchestrator/Timer.py,sha256=FQZ3y6G9d47Ybx7RewzePKQV77H4gCkx5SaeFVlsuhc,2095 pyOpenRPA/Orchestrator/Web/Index.xhtml,sha256=su4tsDD_ZMbQz6Tbmqj55SM0ZZxuQw9tfPcytaB8wzs,32953 @@ -236,7 +236,7 @@ pyOpenRPA/Studio/__pycache__/ValueVerify.cpython-37.pyc,, pyOpenRPA/Studio/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Studio/__pycache__/__main__.cpython-37.pyc,, pyOpenRPA/Tools/RobotRDPActive/Connector.py,sha256=qU5SXwHgQU177MjqEHyOwJDLAcSVnIkKKw76iD09J1w,7275 -pyOpenRPA/Tools/RobotRDPActive/Monitor.py,sha256=_exwsVgoVzN6kKFjiZfnMoq89ckc70BgfFmDMlg8fUI,2643 +pyOpenRPA/Tools/RobotRDPActive/Monitor.py,sha256=H7ciateTh-hml8z69EYZjYgqdTZGkDRtnFwuYnytrCw,3278 pyOpenRPA/Tools/RobotRDPActive/Template.rdp,sha256=qPCLkjzTdYKURK7nRApkPUjRuS4K20vDPj9DIUNSSkE,2392 pyOpenRPA/Tools/RobotRDPActive/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/RobotRDPActive/__main__.py,sha256=mVk8zVqcBrzAwwn7tbZPXFWTQbWUkgU6w89nbY6GN-8,2340 @@ -255,5 +255,5 @@ pyOpenRPA/Tools/RobotScreenActive/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Tools/RobotScreenActive/__pycache__/__main__.cpython-37.pyc,, pyOpenRPA/Tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/__pycache__/__init__.cpython-37.pyc,, -pyOpenRPA/__init__.py,sha256=45sI6ciP8porZrJBf8_tLoVCcY6ai1GpMTD79np0oKQ,175 +pyOpenRPA/__init__.py,sha256=32Po3gFALn9l6ft6LTFVJBkBj-1p5hP83AVcQ_FTa0s,175 pyOpenRPA/__pycache__/__init__.cpython-37.pyc,, diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/WHEEL b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/WHEEL similarity index 100% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/WHEEL rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/WHEEL diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/top_level.txt b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/top_level.txt similarity index 100% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/top_level.txt rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.37.dist-info/top_level.txt diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Orchestrator/Server.py b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Orchestrator/Server.py index 0b490fb4..e5d54b87 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Orchestrator/Server.py +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Orchestrator/Server.py @@ -273,7 +273,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): self.wfile.write(inResponseDict["Body"]) def do_GET(self): # Prepare result dict - lResponseDict = {"Headers": {}, "SetCookies": {}, "Body": "", "StatusCode": None} + lResponseDict = {"Headers": {}, "SetCookies": {}, "Body": b"", "StatusCode": None} self.OpenRPAResponseDict = lResponseDict ##################################### #Do authentication @@ -337,7 +337,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): def do_POST(self): # Prepare result dict #pdb.set_trace() - lResponseDict = {"Headers": {}, "SetCookies":{}, "Body": "", "StatusCode": None} + lResponseDict = {"Headers": {}, "SetCookies":{}, "Body": b"", "StatusCode": None} self.OpenRPAResponseDict = lResponseDict ##################################### #Do authentication diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py index af9f4f92..c65ac8a6 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py @@ -8,7 +8,8 @@ def Monitor(inGlobalDict, inListUpdateTimeout): while lFlagWhile: # UIOSelector list init lUIOSelectorList = [] - for lItem in inGlobalDict["RDPList"]: + #Prepare selectors list for check + for lIndex, lItem in enumerate(inGlobalDict["RDPList"]): lUIOSelectorList.append([{"title_re": f"{lItem['SessionHex']}.*", "backend": "win32"}]) #Run wait command lRDPDissappearList = UIDesktop.UIOSelectorsSecs_WaitDisappear_List(lUIOSelectorList, inListUpdateTimeout) @@ -25,25 +26,30 @@ def Monitor(inGlobalDict, inListUpdateTimeout): return ########################################### ########################################### + for lItem in lRDPDissappearList: + inGlobalDict["RDPList"][lItem]["FlagSessionIsActive"] = False # Set flag that session is disconnected + #pdb.set_trace() + #Session start if it is not in ignore list + #add check for selector if it is not in ignoreIndexList + if lItem not in inGlobalDict["OrchestratorToRobotStorage"]["IgnoreIndexList"]: + try: + Connector.Session(inGlobalDict["RDPList"][lItem]) + inGlobalDict["RDPList"][lItem]["FlagSessionIsActive"] = True # Flag that session is started + except Exception: + pass + ########################################### #Check if from Orchestrator full screen session is set if inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] != inGlobalDict["FullScreenSessionIndex"]: #Do some switches #If full screen mode we have now if inGlobalDict["FullScreenSessionIndex"] is not None: - Connector.SessionScreen100x550(inGlobalDict["RDPList"][inGlobalDict["FullScreenSessionIndex"]]["SessionHex"]) + if inGlobalDict["RDPList"][inGlobalDict["FullScreenSessionIndex"]]["FlagSessionIsActive"]: + Connector.SessionScreen100x550(inGlobalDict["RDPList"][inGlobalDict["FullScreenSessionIndex"]]["SessionHex"]) #If new session is setted if inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] is not None: - Connector.SessionScreenFull(inGlobalDict["RDPList"][inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"]]["SessionHex"]) + if inGlobalDict["RDPList"][inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"]]["FlagSessionIsActive"]: + Connector.SessionScreenFull(inGlobalDict["RDPList"][inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"]]["SessionHex"]) #Set one to other equal inGlobalDict["FullScreenSessionIndex"] = inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] - ########################################### - for lItem in lRDPDissappearList: - inGlobalDict["RDPList"][lItem]["FlagSessionIsActive"] = False # Set flag that session is disconnected - #pdb.set_trace() - #Session start - try: - Connector.Session(inGlobalDict["RDPList"][lItem]) - except Exception: - pass return None #TODO Def garbage window cleaner (if connection was lost) \ No newline at end of file diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/__init__.py b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/__init__.py index aeca3c0d..eeeef317 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/__init__.py +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/__init__.py @@ -3,7 +3,7 @@ r""" The OpenRPA package (from UnicodeLabs) """ -__version__ = 'v1.0.36' +__version__ = 'v1.0.37' __all__ = [] __author__ = 'Ivan Maslov ' #from .Core import Robot \ No newline at end of file diff --git a/Sources/pyOpenRPA/Orchestrator/Server.py b/Sources/pyOpenRPA/Orchestrator/Server.py index 0b490fb4..e5d54b87 100644 --- a/Sources/pyOpenRPA/Orchestrator/Server.py +++ b/Sources/pyOpenRPA/Orchestrator/Server.py @@ -273,7 +273,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): self.wfile.write(inResponseDict["Body"]) def do_GET(self): # Prepare result dict - lResponseDict = {"Headers": {}, "SetCookies": {}, "Body": "", "StatusCode": None} + lResponseDict = {"Headers": {}, "SetCookies": {}, "Body": b"", "StatusCode": None} self.OpenRPAResponseDict = lResponseDict ##################################### #Do authentication @@ -337,7 +337,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): def do_POST(self): # Prepare result dict #pdb.set_trace() - lResponseDict = {"Headers": {}, "SetCookies":{}, "Body": "", "StatusCode": None} + lResponseDict = {"Headers": {}, "SetCookies":{}, "Body": b"", "StatusCode": None} self.OpenRPAResponseDict = lResponseDict ##################################### #Do authentication diff --git a/Sources/pyOpenRPA/Tools/RobotRDPActive/Monitor.py b/Sources/pyOpenRPA/Tools/RobotRDPActive/Monitor.py index af9f4f92..c65ac8a6 100644 --- a/Sources/pyOpenRPA/Tools/RobotRDPActive/Monitor.py +++ b/Sources/pyOpenRPA/Tools/RobotRDPActive/Monitor.py @@ -8,7 +8,8 @@ def Monitor(inGlobalDict, inListUpdateTimeout): while lFlagWhile: # UIOSelector list init lUIOSelectorList = [] - for lItem in inGlobalDict["RDPList"]: + #Prepare selectors list for check + for lIndex, lItem in enumerate(inGlobalDict["RDPList"]): lUIOSelectorList.append([{"title_re": f"{lItem['SessionHex']}.*", "backend": "win32"}]) #Run wait command lRDPDissappearList = UIDesktop.UIOSelectorsSecs_WaitDisappear_List(lUIOSelectorList, inListUpdateTimeout) @@ -25,25 +26,30 @@ def Monitor(inGlobalDict, inListUpdateTimeout): return ########################################### ########################################### + for lItem in lRDPDissappearList: + inGlobalDict["RDPList"][lItem]["FlagSessionIsActive"] = False # Set flag that session is disconnected + #pdb.set_trace() + #Session start if it is not in ignore list + #add check for selector if it is not in ignoreIndexList + if lItem not in inGlobalDict["OrchestratorToRobotStorage"]["IgnoreIndexList"]: + try: + Connector.Session(inGlobalDict["RDPList"][lItem]) + inGlobalDict["RDPList"][lItem]["FlagSessionIsActive"] = True # Flag that session is started + except Exception: + pass + ########################################### #Check if from Orchestrator full screen session is set if inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] != inGlobalDict["FullScreenSessionIndex"]: #Do some switches #If full screen mode we have now if inGlobalDict["FullScreenSessionIndex"] is not None: - Connector.SessionScreen100x550(inGlobalDict["RDPList"][inGlobalDict["FullScreenSessionIndex"]]["SessionHex"]) + if inGlobalDict["RDPList"][inGlobalDict["FullScreenSessionIndex"]]["FlagSessionIsActive"]: + Connector.SessionScreen100x550(inGlobalDict["RDPList"][inGlobalDict["FullScreenSessionIndex"]]["SessionHex"]) #If new session is setted if inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] is not None: - Connector.SessionScreenFull(inGlobalDict["RDPList"][inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"]]["SessionHex"]) + if inGlobalDict["RDPList"][inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"]]["FlagSessionIsActive"]: + Connector.SessionScreenFull(inGlobalDict["RDPList"][inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"]]["SessionHex"]) #Set one to other equal inGlobalDict["FullScreenSessionIndex"] = inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] - ########################################### - for lItem in lRDPDissappearList: - inGlobalDict["RDPList"][lItem]["FlagSessionIsActive"] = False # Set flag that session is disconnected - #pdb.set_trace() - #Session start - try: - Connector.Session(inGlobalDict["RDPList"][lItem]) - except Exception: - pass return None #TODO Def garbage window cleaner (if connection was lost) \ No newline at end of file diff --git a/Sources/pyOpenRPA/__init__.py b/Sources/pyOpenRPA/__init__.py index aeca3c0d..eeeef317 100644 --- a/Sources/pyOpenRPA/__init__.py +++ b/Sources/pyOpenRPA/__init__.py @@ -3,7 +3,7 @@ r""" The OpenRPA package (from UnicodeLabs) """ -__version__ = 'v1.0.36' +__version__ = 'v1.0.37' __all__ = [] __author__ = 'Ivan Maslov ' #from .Core import Robot \ No newline at end of file diff --git a/Utils/RobotRDPActive/SettingsRobotRDPActiveExample.py b/Utils/RobotRDPActive/SettingsRobotRDPActiveExample.py index c7794ef2..0903c515 100644 --- a/Utils/RobotRDPActive/SettingsRobotRDPActiveExample.py +++ b/Utils/RobotRDPActive/SettingsRobotRDPActiveExample.py @@ -31,7 +31,8 @@ def Settings(): "FullScreenSessionIndex": None, #Index of the current session which is full screened, None is no session in fullscreen "Logger": logging.getLogger("RobotRDPActive"), "OrchestratorToRobotStorage": { - "FullScreenSessionIndex":None #Index of the session which is full screen in GUI. None if no session in full screen + "FullScreenSessionIndex":None, #Index of the session which is full screen in GUI. None if no session in full screen + "IgnoreIndexList":[] }, "OrchestratorToRobotResetStorage": { "SafeTurnOff":False #Control from orchestrator to safety turn off robot @@ -82,7 +83,7 @@ def Settings(): ], "IntervalDataReceiveAsync": [ { - "Interval": 3.6, + "Interval": 1.5, "RobotStorage": mDict, "RobotStorageKey": "OrchestratorToRobotStorage", "OrchestratorKeyList": ["Storage", "RobotRDPActive","OrchestratorToRobotStorage"], diff --git a/changelog.md b/changelog.md index 7d4afe1e..a7004bb1 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,6 @@ Beta before 1.1.0 (new way of OpenRPA with improovments. Sorry, but no backward compatibility)/ Backward compatibility will start from 1.0.1 +[1.0.37] +Minor fix in RobotRDPActive [1.0.33] Manu changes - look git [1.0.31] diff --git a/v1.0.36 b/v1.0.37 similarity index 100% rename from v1.0.36 rename to v1.0.37