diff --git a/Orchestrator/Template_ControlPanel.py b/Orchestrator/Template_ControlPanel.py
index dc89cf7c..8e732156 100644
--- a/Orchestrator/Template_ControlPanel.py
+++ b/Orchestrator/Template_ControlPanel.py
@@ -70,11 +70,11 @@ def ControlPanelRenderDict(inGSettings):
}"""
# START :: Create activities :: START #
## Robot START (create RDP session, send CMD to start process)
- lActivityROBOTStartEscaped = f"mGlobal.Processor.ServerValueSet({json.dumps(['RobotRDPActive','ActivityList'])},{json.dumps(gActivityROBOTStartList)});".replace("\"","\'")
+ lActivityROBOTStartEscaped = f"mGlobal.Processor.ServerValueOperatorPlus({json.dumps(['RobotRDPActive','ActivityList'])},{json.dumps(gActivityROBOTStartList)});".replace("\"","\'")
## Robot SAFE STOP (SAFE STOP COMMAND (FROM ROBOT RULES), Logoff must do robot when safe turn off)
- lActivityROBOTSafeStopEscaped = f"mGlobal.Processor.ServerValueSet({json.dumps(gOrchestratorToRobotResetSafeStopKeyList)},true);".replace("\"","\'")
+ lActivityROBOTSafeStopEscaped = f"mGlobal.Processor.ServerValueOperatorPlus({json.dumps(gOrchestratorToRobotResetSafeStopKeyList)},true);".replace("\"","\'")
## Robot FORCE STOP (send CMD to stop process, logoff)
- lActivityROBOTStopEscaped = f"mGlobal.Processor.ServerValueSet({json.dumps(['RobotRDPActive','ActivityList'])},{json.dumps(gActivityROBOTStopList)});".replace("\"","\'")
+ lActivityROBOTStopEscaped = f"mGlobal.Processor.ServerValueOperatorPlus({json.dumps(['RobotRDPActive','ActivityList'])},{json.dumps(gActivityROBOTStopList)});".replace("\"","\'")
# END :: Create activities :: END #
# START :: Init result dict template :: START #
# lBodyKeyValue_r3_start=f'Start'
@@ -133,7 +133,7 @@ lActivityTimeItemRobotStart = {
"TimeHH:MM": gActivityROBOTStartTimeHH_MMStr, #Time [HH:MM] to trigger activity
"WeekdayList": gActivityROBOTStartWeekdayList, #List of the weekday index when activity is applicable, Default [1,2,3,4,5,6,7]
"Activity":{
- "Type": "GlobalDictKeyListValueSet", #Activity type
+ "Type": "GlobalDictKeyListValueOperator+", #Activity type
"KeyList": ['RobotRDPActive','ActivityList'], # RobotRDP Active ActivityList
"Value": gActivityROBOTStartList # ActivityList - see upper
}
@@ -143,7 +143,7 @@ lActivityTimeItemRobotStop = {
"TimeHH:MM": gActivityROBOTStopTimeHH_MMStr, #Time [HH:MM] to trigger activity
"WeekdayList": gActivityROBOTStopWeekdayList, #List of the weekday index when activity is applicable, Default [1,2,3,4,5,6,7]
"Activity":{
- "Type": "GlobalDictKeyListValueSet", #Activity type
+ "Type": "GlobalDictKeyListValueOperator+", #Activity type
"KeyList": ['RobotRDPActive','ActivityList'], # RobotRDP Active ActivityList
"Value": gActivityROBOTStopList # ActivityList - see upper
}
diff --git a/Sources/pyOpenRPA/Orchestrator/Processor.py b/Sources/pyOpenRPA/Orchestrator/Processor.py
index c9ff0fcb..fd09b3b3 100644
--- a/Sources/pyOpenRPA/Orchestrator/Processor.py
+++ b/Sources/pyOpenRPA/Orchestrator/Processor.py
@@ -34,6 +34,11 @@ import psutil
# "Value":
# },
# {
+# "Type": "GlobalDictKeyListValueOperator+",
+# "KeyList": ["key1","key2",...],
+# "Value":
+# },
+# {
# "Type": "GlobalDictKeyListValueGet",
# "KeyList": ["key1","key2",...]
# },
@@ -146,6 +151,21 @@ def Activity(inActivity):
lDict[lItem["KeyList"][-1]].append(lItem["Value"])
lItem["Result"] = True
###########################################################
+ # Обработка команды GlobalDictKeyListValueOperator+
+ ###########################################################
+ if lItem["Type"] == "GlobalDictKeyListValueOperator+":
+ lDict = gSettingsDict
+ for lItem2 in lItem["KeyList"][:-1]:
+ # Check if key - value exists
+ if lItem2 in lDict:
+ pass
+ else:
+ lDict[lItem2] = {}
+ lDict = lDict[lItem2]
+ # Set value
+ lDict[lItem["KeyList"][-1]]+=lItem["Value"]
+ lItem["Result"] = True
+ ###########################################################
#Обработка команды GlobalDictKeyListValueGet
###########################################################
if lItem["Type"]=="GlobalDictKeyListValueGet":
diff --git a/Sources/pyOpenRPA/Orchestrator/RobotRDPActive/Processor.py b/Sources/pyOpenRPA/Orchestrator/RobotRDPActive/Processor.py
index 3d46674e..17059745 100644
--- a/Sources/pyOpenRPA/Orchestrator/RobotRDPActive/Processor.py
+++ b/Sources/pyOpenRPA/Orchestrator/RobotRDPActive/Processor.py
@@ -10,6 +10,7 @@ gSettings = None # Gsettings will be initialized after the import module
# Create new RDPSession in RobotRDPActive
def RDPSessionConnect(inRDPSessionKeyStr, inHostStr, inPortStr, inLoginStr, inPasswordStr):
+ global gSettings
lRDPConfigurationItem = { # Init the configuration item
"Host": inHostStr, # Host address, example "77.77.22.22"
"Port": inPortStr, # RDP Port, example "3389"
diff --git a/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml b/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml
index 12a061d7..0ae0cfc2 100644
--- a/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml
+++ b/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml
@@ -441,6 +441,29 @@
dataType: "text"
});
}
+ mGlobal.Processor.ServerValueOperatorPlus = function(inKeyList,inValue) {
+ lData = [
+ {
+ "Type":"GlobalDictKeyListValueOperator+",
+ "KeyList": inKeyList,
+ "Value": inValue
+ }
+ ]
+ ///Обнулить таблицу
+ $('.ui.modal.basic .content').html("");
+ $.ajax({
+ type: "POST",
+ url: 'Utils/Processor',
+ data: JSON.stringify(lData),
+ success:
+ function(lData,l2,l3)
+ {
+ var lResponseJSON=JSON.parse(lData)
+ ///TODO Show error if exist error
+ },
+ dataType: "text"
+ });
+ }
mGlobal.Processor.LogListShow = function() {
lData = [
{