From 1c415a34cb8b38f30837822fe410648ffbef26d7 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Wed, 16 Dec 2020 17:20:37 +0300 Subject: [PATCH] interval from Web front 600ms + OSCredentialsVerify on the back with no logs --- Sources/pyOpenRPA/Orchestrator/Server.py | 17 +++++------------ Sources/pyOpenRPA/Orchestrator/Web/Index.js | 6 ++++-- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Sources/pyOpenRPA/Orchestrator/Server.py b/Sources/pyOpenRPA/Orchestrator/Server.py index 5fba4e58..2c16b986 100644 --- a/Sources/pyOpenRPA/Orchestrator/Server.py +++ b/Sources/pyOpenRPA/Orchestrator/Server.py @@ -23,6 +23,7 @@ import os #for path operations from http import cookies global gSettingsDict from . import ServerSettings +from . import __Orchestrator__ import copy @@ -80,19 +81,11 @@ def AuthenticateVerify(inRequest): if "\\" in lUser: lDomain = lUser.split("\\")[0] lUser = lUser.split("\\")[1] - #Try to logon - use processor - lLogonResult = ProcessorOld.Activity( - { - "Type": "WindowsLogon", - "Domain": lDomain, - "User": lUser, - "Password": lPassword - } - ) + lLogonBool = __Orchestrator__.OSCredentialsVerify(inUserStr=lUser, inPasswordStr=lPassword, inDomainStr=lDomain) #Check result - if lLogonResult["Result"]: - lResult["Domain"] = lLogonResult["Domain"] - lResult["User"] = lLogonResult["User"] + if lLogonBool: + lResult["Domain"] = lDomain + lResult["User"] = lUser #Create token lAuthToken=str(uuid.uuid1()) gSettingsDict["ServerDict"]["AccessUsers"]["AuthTokensDict"][lAuthToken] = {} diff --git a/Sources/pyOpenRPA/Orchestrator/Web/Index.js b/Sources/pyOpenRPA/Orchestrator/Web/Index.js index 4a3242a6..bfc7445b 100644 --- a/Sources/pyOpenRPA/Orchestrator/Web/Index.js +++ b/Sources/pyOpenRPA/Orchestrator/Web/Index.js @@ -471,7 +471,8 @@ $(document).ready(function() { mGlobal.pyOpenRPA.ServerDataHashStr = lResponseJSON["HashStr"] mGlobal.pyOpenRPA.ServerDataRefreshDef_TechnicalRender() mGlobal.UserRoleUpdate(); - mGlobal.pyOpenRPA.ServerDataRefreshDef() // Go to the next call + setTimeout(mGlobal.pyOpenRPA.ServerDataRefreshDef,600) // If LOGS are update every ms - set some limit in ms on the client side + //mGlobal.pyOpenRPA.ServerDataRefreshDef() // Go to the next call } catch(error) { console.log(error) @@ -526,7 +527,8 @@ $(document).ready(function() { } catch(error) { } - mGlobal.pyOpenRPA.ServerLogListRefreshDef() // recursive + setTimeout(mGlobal.pyOpenRPA.ServerLogListRefreshDef,600) // If LOGS are update every ms - set some limit in ms on the client side + //mGlobal.pyOpenRPA.ServerLogListRefreshDef() // recursive }, dataType: "text", error: function(jqXHR, textStatus, errorThrown ) {