From 5491302df7c9ee29c0d59ac90343ccd8660b72a9 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Sun, 9 Jan 2022 09:41:25 +0300 Subject: [PATCH] # Orchestrator: Debugger - case insensitive!, save arg dict options from previous value --- Sources/pyOpenRPA/Orchestrator/Web/Index.js | 21 ++++++++++++++++++- .../pyOpenRPA/Orchestrator/Web/Index.xhtml | 5 +---- .../Orchestrator/__Orchestrator__.py | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Sources/pyOpenRPA/Orchestrator/Web/Index.js b/Sources/pyOpenRPA/Orchestrator/Web/Index.js index ad17e3d3..8dc6bc43 100644 --- a/Sources/pyOpenRPA/Orchestrator/Web/Index.js +++ b/Sources/pyOpenRPA/Orchestrator/Web/Index.js @@ -920,10 +920,19 @@ $(document).ready(function() { var lResponseJSON=JSON.parse(lData) console.log("HelperDefAutofill:") console.log(lResponseJSON) + //ArgDict merge + var lArgDictTargetDict = lResponseJSON["ArgDict"] + var lArgDictStr = $(".mGlobal-pyOpenRPA-Debugging-ArgDict")[0].value + if (lArgDictStr !="" && lArgDictStr !=null) { + lArgDictLastDict = JSON.parse(lArgDictStr) + lArgDictTargetDict = mGlobal.pyOpenRPA.DebuggingAutofillMerge(lArgDictTargetDict, lArgDictLastDict) + } + $(".mGlobal-pyOpenRPA-Debugging-ArgList")[0].value = JSON.stringify(lResponseJSON["ArgList"]) - $(".mGlobal-pyOpenRPA-Debugging-ArgDict")[0].value = JSON.stringify(lResponseJSON["ArgDict"]) + $(".mGlobal-pyOpenRPA-Debugging-ArgDict")[0].value = JSON.stringify(lArgDictTargetDict) $(".mGlobal-pyOpenRPA-Debugging-ArgGSettingsStr")[0].value = JSON.stringify(lResponseJSON["ArgGSettingsStr"]) $(".mGlobal-pyOpenRPA-Debugging-ArgLoggerStr")[0].value = JSON.stringify(lResponseJSON["ArgLoggerStr"]) + }, dataType: "text" }); @@ -966,4 +975,14 @@ $(document).ready(function() { dataType: "text" }); } + mGlobal.pyOpenRPA.DebuggingAutofillMerge=function(inTargetDict, inLastDict) { + // Merge 2 dict (get values from Last dict if key exists in new dict + for (const [lKeyStr, lValue] of Object.entries(inTargetDict)) { + //Check if key exists in LastDict + if (lKeyStr in inLastDict) { + inTargetDict[lKeyStr] = inLastDict[lKeyStr] + } + } + return inTargetDict + } }); \ No newline at end of file diff --git a/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml b/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml index c74326e4..cab2739e 100644 --- a/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml +++ b/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml @@ -312,10 +312,7 @@
Def
diff --git a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py index d219da89..752b839a 100644 --- a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py +++ b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py @@ -1185,7 +1185,7 @@ def ActivityItemHelperDefList(inDefQueryStr=None): lResultList = [] if inDefQueryStr is not None: # do search alg for lKeyStr in GSettingsGet()["ProcessorDict"]["AliasDefDict"]: - if inDefQueryStr in lKeyStr: + if inDefQueryStr.upper() in lKeyStr.upper(): lResultList.append(lKeyStr) else: for lKeyStr in GSettingsGet()["ProcessorDict"]["AliasDefDict"]: