- Add Working Dir (CWD) + Orchestrator Version Str in ServerData > UserDict

- Orc Web JS - lite refactoring
dev-linux
Ivan Maslov 4 years ago
parent caf688536a
commit 09ae47ac85

@ -1,4 +1,4 @@
import json import json, os
import copy import copy
from inspect import signature # For detect count of def args from inspect import signature # For detect count of def args
#ControlPanelDict #ControlPanelDict
@ -179,7 +179,7 @@ def pyOpenRPA_ServerData(inRequest,inGSettings):
"CPDict": HiddenCPDictGenerate(inRequest=inRequest, inGSettings=inGSettings), "CPDict": HiddenCPDictGenerate(inRequest=inRequest, inGSettings=inGSettings),
"RDPDict": HiddenRDPDictGenerate(inRequest=inRequest, inGSettings=inGSettings), "RDPDict": HiddenRDPDictGenerate(inRequest=inRequest, inGSettings=inGSettings),
"AgentDict": HiddenAgentDictGenerate(inRequest=inRequest, inGSettings=inGSettings), "AgentDict": HiddenAgentDictGenerate(inRequest=inRequest, inGSettings=inGSettings),
"UserDict": {"UACClientDict": inRequest.OpenRPA["DefUserRoleHierarchyGet"]()}, "UserDict": {"UACClientDict": inRequest.OpenRPA["DefUserRoleHierarchyGet"](), "CWDPathStr": os.getcwd(), "VersionStr": inGSettings["VersionStr"]},
} }
# Create JSON # Create JSON
lServerDataDictJSONStr = json.dumps(lServerDataDict) lServerDataDictJSONStr = json.dumps(lServerDataDict)

@ -466,6 +466,7 @@ $(document).ready(function() {
success: function(lData,l2,l3) { success: function(lData,l2,l3) {
try { try {
var lResponseJSON=JSON.parse(lData) var lResponseJSON=JSON.parse(lData)
mGlobal.VersionStr = lResponseJSON["ServerDataDict"]["UserDict"]["VersionStr"]
mGlobal.pyOpenRPA.ServerDataDict = lResponseJSON["ServerDataDict"] mGlobal.pyOpenRPA.ServerDataDict = lResponseJSON["ServerDataDict"]
mGlobal.pyOpenRPA.ServerDataHashStr = lResponseJSON["HashStr"] mGlobal.pyOpenRPA.ServerDataHashStr = lResponseJSON["HashStr"]
mGlobal.pyOpenRPA.ServerDataRefreshDef_TechnicalRender() mGlobal.pyOpenRPA.ServerDataRefreshDef_TechnicalRender()
@ -544,71 +545,8 @@ $(document).ready(function() {
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
mGlobal.Monitor.mDatasetLast = null mGlobal.Monitor.mDatasetLast = null
mGlobal.fControlPanelRefresh=function() {
try {
//var XHR = new XMLHttpRequest();
//XHR.setRequestHeader("Cookies",document.cookie)
///Загрузка данных
//console.log("Request is sent")
//console.log(document.cookie)
$.ajax({
type: "GET",
headers: {"SessionGUIDStr":mGlobal.SessionGUIDStr},
url: 'Monitor/ControlPanelDictGet',
data: '',
//cache: false,
//xhr: XHR,
success: function(lData,l2,l3) {
try {
var lResponseJSON=JSON.parse(lData)
mGlobal.Monitor.mDatasetLast = lResponseJSON
mGlobal.Monitor.fControlPanelRefresh_TechnicalRender()
}
catch(error) {
}
mGlobal.Monitor.fControlPanelRefresh() // recursive
},
dataType: "text",
error: function(jqXHR, textStatus, errorThrown ) {
sleep(3000)
mGlobal.Monitor.fControlPanelRefresh() // recursive
}
});
}
catch(error) {
sleep(3000)
mGlobal.Monitor.fControlPanelRefresh() // recursive
}
//mGlobal.Monitor.fControlPanelRefresh() // recursive
}
mGlobal.Test=function() {
///Обнулить таблицу
lData = [
{
"Type":"GlobalDictKeyListValueSet",
"key_list":["Storage","Robot_R01"],
"value":{
"RunDateTimeString":"Test1",
"StepCurrentName":"Test2",
"StepCurrentDuration":"Test3"
}
}
]
$.ajax({
type: "POST",
url: 'Utils/Processor',
data: JSON.stringify(lData),
success:
function(lData,l2,l3)
{
//console.log(lData)
},
dataType: "text"
});
}
/////////////////////////////// ///////////////////////////////
///Processor functions ///Processor functions
/////////////////////////////// ///////////////////////////////
@ -874,39 +812,6 @@ $(document).ready(function() {
if (lUACAsk(["pyOpenRPADict","AdminDict","RestartPCBool"])) { $(".UACClient-pyOpenRPADict-AdminDict-RestartPCBool").show(); } if (lUACAsk(["pyOpenRPADict","AdminDict","RestartPCBool"])) { $(".UACClient-pyOpenRPADict-AdminDict-RestartPCBool").show(); }
} }
// Orchestrator model
mGlobal.WorkingDirectoryPathStr = null
mGlobal.OrchestratorModelUpdate=function() {
lData = [
{
"Type": "GlobalDictKeyListValueGet",
"KeyList": ["Server","WorkingDirectoryPathStr"]
},
{
"Type": "GlobalDictKeyListValueGet",
"KeyList": ["VersionStr"]
},
]
$.ajax({
type: "POST",
url: 'Utils/Processor',
data: JSON.stringify(lData),
success:
function(lData,l2,l3)
{
var lUACAsk = mGlobal.UserRoleAsk // Alias
var lResponseList=JSON.parse(lData)
mGlobal.WorkingDirectoryPathStr = lResponseList[0]["Result"]
mGlobal.VersionStr = lResponseList[1]["Result"]
},
dataType: "text"
});
}
//Main sub
mGlobal.OrchestratorModelUpdate() // Cal the update orchestrator model
//mGlobal.Monitor.fControlPanelRefresh()
/// v1.2.0 pyOpenRPA Init defs /// v1.2.0 pyOpenRPA Init defs
mGlobal.pyOpenRPA.ServerJSInitDef() // Recieve JS from server (if exist) and then call anothe url ServerData mGlobal.pyOpenRPA.ServerJSInitDef() // Recieve JS from server (if exist) and then call anothe url ServerData

@ -81,7 +81,8 @@
Orc connect JSONGenerators to WEB Front (mGlobal.) Orc connect JSONGenerators to WEB Front (mGlobal.)
- Orc back: add new block: OrchestratorWeb - Orc back: add new block: OrchestratorWeb
- - def OrchestratorWebCPUpdate(inGSettings, inCPKeyStr, inHTMLRenderDef=None, inJSONGeneratorDef=None, inJSInitGeneratorDef=None): # Add control panel HTML, JSON generator or JS when page init - - def OrchestratorWebCPUpdate(inGSettings, inCPKeyStr, inHTMLRenderDef=None, inJSONGeneratorDef=None, inJSInitGeneratorDef=None): # Add control panel HTML, JSON generator or JS when page init
- Add Working Dir (CWD) + Orchestrator Version Str in ServerData > UserDict
- Orc Web JS - lite refactoring
[1.1.0] [1.1.0]
After 2 month test prefinal with new improovements (+RobotRDPActive in Orchestrator + Easy ControlPanelTemplate) After 2 month test prefinal with new improovements (+RobotRDPActive in Orchestrator + Easy ControlPanelTemplate)
Beta before 1.1.0 (new way of OpenRPA with improvements. Sorry, but no backward compatibility)/ Backward compatibility will start from 1.0.1 Beta before 1.1.0 (new way of OpenRPA with improvements. Sorry, but no backward compatibility)/ Backward compatibility will start from 1.0.1

Loading…
Cancel
Save