#RestartOrchestrator

dev-linux
Ivan Maslov 6 years ago
parent 400d5b6fd8
commit d7ab76f5fc

@ -104,6 +104,20 @@
dataType: "text" dataType: "text"
}); });
} }
///Перезагрузить Orchestrator
mGlobal.Controller.OrchestratorRestart=function() {
$.ajax({
type: "POST",
url: 'ProcessingRun',
data: '{"actionList":[{"type":"ActivityRestartOrchestrator"}]}',
success:
function(lData,l2,l3)
{
var lResponseJSON=JSON.parse(lData)
},
dataType: "text"
});
}
////////////////////////// //////////////////////////
/////Monitor JS module /////Monitor JS module
@ -277,6 +291,11 @@
<i class="desktop icon"></i> <i class="desktop icon"></i>
Look machine screenshot Look machine screenshot
</button> </button>
<button class="ui labeled icon button red" onclick="mGlobal.Controller.OrchestratorRestart();">
<i class="down icon"></i>
Restart Orchestrator
</button>
<script class="openrpa-hidden-monitor-table-general" style="display:none" type="text/x-handlebars-template"> <script class="openrpa-hidden-monitor-table-general" style="display:none" type="text/x-handlebars-template">
<table class="ui celled table"> <table class="ui celled table">
<thead> <thead>

@ -3,6 +3,7 @@ import http.client
import json import json
import pdb import pdb
import os import os
import sys
import subprocess import subprocess
#Глобальная переменная - все глобальные значения программы #Глобальная переменная - все глобальные значения программы
global mGlobalDict global mGlobalDict
@ -21,6 +22,9 @@ global mGlobalDict
# { # {
# type: <ActivityCMDRun>, # type: <ActivityCMDRun>,
# code: <str> # code: <str>
# },
# {
# type: <ActivityRestartOrchestrator>
# } # }
# ] # ]
# #
@ -57,5 +61,9 @@ def ProcessingRun(inConfigurationDict):
subprocess.Popen(lCMDCode) subprocess.Popen(lCMDCode)
lResultCMDRun=1#os.system(lCMDCode) lResultCMDRun=1#os.system(lCMDCode)
lResult["actionListResult"][-1] = {**lResult["actionListResult"][-1], **{"result":str(lResultCMDRun)}} lResult["actionListResult"][-1] = {**lResult["actionListResult"][-1], **{"result":str(lResultCMDRun)}}
#Обработка команды ActivityRestartOrchestrator
if lItem["type"]=="ActivityRestartOrchestrator":
os.execl(sys.executable,os.path.abspath(__file__),*sys.argv)
sys.exit(0)
#Вернуть результат #Вернуть результат
return lResult return lResult
Loading…
Cancel
Save