Ivan Maslov 5 years ago
commit 608c0c680c

@ -4,7 +4,7 @@ import logging
import os import os
#DEFINITIONS #DEFINITIONS
lProcessName = "OpenRPA_RobotScreenActive.exe" lProcessName = "OpenRPA_RobotScreenActive.exe"
lStartFilePath = os.path.join(os.getcwd(), "..\\Utils\\RobotScreenActive\\pyOpenRPA.Tools.RobotScreenActive_x64.cmd") lStartFilePath = os.path.join(os.getcwd(), "RobotScreenActive\\pyOpenRPA.Tools.RobotScreenActive_x64.cmd")
def RenderRobotScreenActive(inGlobalConfiguration): def RenderRobotScreenActive(inGlobalConfiguration):
#Subheader Variants #Subheader Variants
lSubheaderRunTrueText="State: <span style=\"color:green\">Turned on</span>" lSubheaderRunTrueText="State: <span style=\"color:green\">Turned on</span>"
@ -14,6 +14,11 @@ def RenderRobotScreenActive(inGlobalConfiguration):
import os import os
lRobotScreenActivePath = lStartFilePath lRobotScreenActivePath = lStartFilePath
lOnClickRunButton=f"mGlobal.Controller.CMDRunText('start cmd /K {lRobotScreenActivePath}');" lOnClickRunButton=f"mGlobal.Controller.CMDRunText('start cmd /K {lRobotScreenActivePath}');"
# Activity update orchestrator
lActivityOrchestratorBuildPath = os.getcwd()
lActivityOrchestratorBuildPathEscaped = lActivityOrchestratorBuildPath.replace("\\","\\\\")
lActivityOrchestratorUpdateStr = f"mGlobal.Controller.CMDRunText(\"taskkill /f /im OpenRPA_Orchestrator.exe & timeout 2 & cd {lActivityOrchestratorBuildPathEscaped} & git reset --hard & git pull origin master & pyOpenRPA.Orchestrator_x64_administrator_startup.cmd\");".replace("\"","&quot;")
lActivityOrchestratorUpdateHTMLStr=f'<a onclick=\"{lActivityOrchestratorUpdateStr}\" style=\"color:orange\">Обновить orchestrator из GIT и перезапустить</a>'
#Force close button #Force close button
lOnClickForceCloseButton=f"mGlobal.Controller.CMDRunText('taskkill /F /im {lProcessName}');" lOnClickForceCloseButton=f"mGlobal.Controller.CMDRunText('taskkill /F /im {lProcessName}');"
#Result template #Result template
@ -23,6 +28,7 @@ def RenderRobotScreenActive(inGlobalConfiguration):
"DataStorageKey":"RobotScreenActive", #Use key for set current dict in mGlobal.DataStorage["DtaaStorageKey"] on client side "DataStorageKey":"RobotScreenActive", #Use key for set current dict in mGlobal.DataStorage["DtaaStorageKey"] on client side
"SubheaderText":lSubheaderRunFalseText, "SubheaderText":lSubheaderRunFalseText,
"BodyKeyValueList":[ "BodyKeyValueList":[
{"Key":"Репозиторий","Value":lActivityOrchestratorUpdateHTMLStr}
], ],
"FooterText":"Last update: 9:38:00 09.10.2019", "FooterText":"Last update: 9:38:00 09.10.2019",
"FooterButtonX2List":[ "FooterButtonX2List":[

@ -254,6 +254,34 @@
function(lData,l2,l3) function(lData,l2,l3)
{ {
var lResponseJSON=JSON.parse(lData) var lResponseJSON=JSON.parse(lData)
///Escape onclick
/// RenderRobotList
lResponseJSON["RenderRobotList"].forEach(
function(lItem){
if ('FooterButtonX2List' in lItem) {
/// FooterButtonX2List
lItem["FooterButtonX2List"].forEach(
function(lItem2){
if ('OnClick' in lItem) {
lOnClickEscaped = lItem["OnClick"];
lOnClickEscaped = lOnClickEscaped.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
lItem["OnClick"] = lOnClickEscaped;
}
}
);
/// FooterButtonX1List
lItem["FooterButtonX1List"].forEach(
function(lItem2){
if ('OnClick' in lItem) {
lOnClickEscaped = lItem["OnClick"];
lOnClickEscaped = lOnClickEscaped.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
lItem["OnClick"] = lOnClickEscaped;
}
}
);
}
}
);
///Сформировать HTML код новой таблицы ///Сформировать HTML код новой таблицы
lHTMLCode=mGlobal.GeneralGenerateHTMLCodeHandlebars(".openrpa-hidden-control-panel",lResponseJSON) lHTMLCode=mGlobal.GeneralGenerateHTMLCodeHandlebars(".openrpa-hidden-control-panel",lResponseJSON)
//Присвоить ответ в mGlobal.Monitor.mResponseList //Присвоить ответ в mGlobal.Monitor.mResponseList

@ -0,0 +1,9 @@
cd %~dp0
git push origin devIvan
git checkout master
git reset --hard
git pull
git merge devIvan
git push origin master
git checkout devIvan
pause >nul

@ -0,0 +1,4 @@
cd %~dp0
git reset --hard
git pull
pause >nul
Loading…
Cancel
Save