# Orchestrator: Debugger - case insensitive!, save arg dict options from previous value

dev-linux
Ivan Maslov 3 years ago
parent e14bed7fca
commit 5491302df7

@ -920,10 +920,19 @@ $(document).ready(function() {
var lResponseJSON=JSON.parse(lData) var lResponseJSON=JSON.parse(lData)
console.log("HelperDefAutofill:") console.log("HelperDefAutofill:")
console.log(lResponseJSON) 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-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-ArgGSettingsStr")[0].value = JSON.stringify(lResponseJSON["ArgGSettingsStr"])
$(".mGlobal-pyOpenRPA-Debugging-ArgLoggerStr")[0].value = JSON.stringify(lResponseJSON["ArgLoggerStr"]) $(".mGlobal-pyOpenRPA-Debugging-ArgLoggerStr")[0].value = JSON.stringify(lResponseJSON["ArgLoggerStr"])
}, },
dataType: "text" dataType: "text"
}); });
@ -966,4 +975,14 @@ $(document).ready(function() {
dataType: "text" 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
}
}); });

@ -312,10 +312,7 @@
<i class="dropdown icon"></i> <i class="dropdown icon"></i>
<div class="default text">Def</div> <div class="default text">Def</div>
<div class="menu"> <div class="menu">
<div class="item" data-value="eh">Western Sahara</div> <div class="item" data-value="eh">pyOpenRPA... sys.. os.. </div>
<div class="item" data-value="ye">Yemen</div>
<div class="item" data-value="zm">Zambia</div>
<div class="item" data-value="zw">Zimbabwe</div>
</div> </div>
</div> </div>
<div class="ui fluid labeled input" style="margin-bottom:10px;"> <div class="ui fluid labeled input" style="margin-bottom:10px;">

@ -1185,7 +1185,7 @@ def ActivityItemHelperDefList(inDefQueryStr=None):
lResultList = [] lResultList = []
if inDefQueryStr is not None: # do search alg if inDefQueryStr is not None: # do search alg
for lKeyStr in GSettingsGet()["ProcessorDict"]["AliasDefDict"]: for lKeyStr in GSettingsGet()["ProcessorDict"]["AliasDefDict"]:
if inDefQueryStr in lKeyStr: if inDefQueryStr.upper() in lKeyStr.upper():
lResultList.append(lKeyStr) lResultList.append(lKeyStr)
else: else:
for lKeyStr in GSettingsGet()["ProcessorDict"]["AliasDefDict"]: for lKeyStr in GSettingsGet()["ProcessorDict"]["AliasDefDict"]:

Loading…
Cancel
Save