From 61afbf1caebd5ebbbdebf1621e85ea58180b4667 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Sat, 30 Nov 2019 23:23:45 +0300 Subject: [PATCH] - Orchestrator.Server: Add new engine for POST - Orchestrator.Server: Minor Fix to support web view Signed-off-by: Ivan Maslov --- Sources/pyOpenRPA/Orchestrator/Server.py | 11 +++++++++++ Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml | 18 +++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/Sources/pyOpenRPA/Orchestrator/Server.py b/Sources/pyOpenRPA/Orchestrator/Server.py index ab407598..a133913b 100644 --- a/Sources/pyOpenRPA/Orchestrator/Server.py +++ b/Sources/pyOpenRPA/Orchestrator/Server.py @@ -380,6 +380,17 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): lFlagUserAccess = UserAccessCheckBefore("POST", self) ###################################### if lFlagUserAccess: + lOrchestratorFolder = "\\".join(__file__.split("\\")[:-1]) + ############################ + #New server engine (url from global dict (URLList)) + ############################ + for lURLItem in mGlobalDict["Server"]["URLList"]: + #Check if all condition are applied + lFlagURLIsApplied=False + lFlagURLIsApplied=self.URLItemCheckDo(lURLItem, "POST") + if lFlagURLIsApplied: + self.ResponseDictSend() + return #Централизованная функция получения запросов/отправки if self.path == '/Utils/Processor': #ReadRequest diff --git a/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml b/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml index 8830bcfd..ea1e2b18 100644 --- a/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml +++ b/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml @@ -404,6 +404,22 @@ dataType: "text" }); } + mGlobal.Server= {} + mGlobal.Server.JSONGet=function(inMethod, inURL, inDataJSON, inCallback) + { + $.ajax({ + type: inMethod, + url: inURL, + data: JSON.stringify(inDataJSON), + success: + function(lData,l2,l3) + { + var lResponseJSON=JSON.parse(lData) + inCallback(lResponseJSON) + }, + dataType: "text" + }); + } ///////////////// ///Modal @@ -549,7 +565,7 @@ {"Header":"Head 09","Description":"Test 21.02.2019"} ] } - mGlobal.Modal.ListFilter.Show(lTestData) + // mGlobal.Modal.ListFilter.Show(lTestData) }) ;