From a5b4f2664e0247cb65ee8bb3a96c59513a7768c0 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Sun, 13 Oct 2019 19:27:51 +0300 Subject: [PATCH] #MinorFix for RPA RUSMED --- Logout.txt | 5 +++++ .../Orchestrator/OpenRPAOrchestratorRun_x64.cmd | 4 ++++ v1.0.1/Orchestrator/Web/Index.xhtml | 15 +++++++++++++-- v1.0.1/Orchestrator/orchestratorConfiguration.py | 11 ++++++++--- 4 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 Logout.txt create mode 100644 v1.0.1/Orchestrator/OpenRPAOrchestratorRun_x64.cmd diff --git a/Logout.txt b/Logout.txt new file mode 100644 index 00000000..306304a5 --- /dev/null +++ b/Logout.txt @@ -0,0 +1,5 @@ +%windir%\System32\tscon.exe RDP-Tcp#NNN /dest:console + +for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do ( + %windir%\System32\tscon.exe %%s /dest:console +) \ No newline at end of file diff --git a/v1.0.1/Orchestrator/OpenRPAOrchestratorRun_x64.cmd b/v1.0.1/Orchestrator/OpenRPAOrchestratorRun_x64.cmd new file mode 100644 index 00000000..e4c0fcf1 --- /dev/null +++ b/v1.0.1/Orchestrator/OpenRPAOrchestratorRun_x64.cmd @@ -0,0 +1,4 @@ +cd %~dp0 +copy /Y ..\Resources\WPy64-3720\python-3.7.2.amd64\python.exe ..\Resources\WPy64-3720\python-3.7.2.amd64\OpenRPAOrchestrator.exe +.\..\Resources\WPy64-3720\python-3.7.2.amd64\OpenRPAOrchestrator.exe orchestratorMain.py +pause >nul \ No newline at end of file diff --git a/v1.0.1/Orchestrator/Web/Index.xhtml b/v1.0.1/Orchestrator/Web/Index.xhtml index a3779fda..47d53bf6 100644 --- a/v1.0.1/Orchestrator/Web/Index.xhtml +++ b/v1.0.1/Orchestrator/Web/Index.xhtml @@ -109,6 +109,17 @@ /////Controller JS module ////////////////////////// mGlobal.Controller={}; + mGlobal.Controller.CMDRunText=function(inCMDText) { + ///Обнулить таблицу + $.ajax({ + type: "POST", + url: 'ProcessingRun', + data: '{"actionList":[{"type":"ActivityCMDRun", "code":"'+inCMDText+'"}]}', + success: + function(lData,l2,l3){}, + dataType: "text" + }); + } mGlobal.Controller.CMDRun=function() { ///Обнулить таблицу lCMDCode=$(".openrpa-controller-cmd-run-input")[0].value @@ -458,13 +469,13 @@
{{#FooterButtonX2List}} -
{{{Text}}}
+
{{{Text}}}
{{/FooterButtonX2List}}
Доп. управление
{{#FooterButtonX1List}} -
{{{Text}}}
+
{{{Text}}}
{{/FooterButtonX1List}}
diff --git a/v1.0.1/Orchestrator/orchestratorConfiguration.py b/v1.0.1/Orchestrator/orchestratorConfiguration.py index 1320a79a..0dcce922 100644 --- a/v1.0.1/Orchestrator/orchestratorConfiguration.py +++ b/v1.0.1/Orchestrator/orchestratorConfiguration.py @@ -4,6 +4,11 @@ def RenderRobotR01(inGlobalConfiguration): #Subheader Variants lSubheaderRunTrueText="Состояние: Работает" lSubheaderRunFalseText="Состояние: Не работает" + #Run button + #Такое большое количество слэшей связано с тем, что этот текст отправляется сначала в браузер, рендерится там, а потом отправляется на процессор оркестратора + lOnClickRunButton="""mGlobal.Controller.CMDRunText("C:\\\\\\\\RPA\\\\\\\\R01_IntegrationOrderOut\\\\\\\\Sources\\\\\\\\R01_IntegrationOrderOut_64_Start.cmd");""" + #Force close button + lOnClickForceCloseButton="""mGlobal.Controller.CMDRunText("taskkill /F /im Robot_R01.exe");""" #Result template lResultDict={ "HeaderLeftText":"Автозагрузка заявок на расход", @@ -18,11 +23,11 @@ def RenderRobotR01(inGlobalConfiguration): ], "FooterText":"Дата изменения: 9:38:00 09.10.2019", "FooterButtonX2List":[ - {"Text":"Ручной запуск", "Color":"green", "Link":""}, - {"Text":"Безопасная остановка", "Color":"orange", "Link":""} + {"Text":"Ручной запуск", "Color":"green", "Link":"", "OnClick": lOnClickRunButton}, + {"Text":"Безопасная остановка", "Color disabled":"orange", "Link":""} ], "FooterButtonX1List":[ - {"Text":"Принудительная остановка", "Color":"red", "Link":""} + {"Text":"Принудительная остановка", "Color":"red", "Link":"", "OnClick": lOnClickForceCloseButton} ] } #Check if process running