diff --git a/Sources/pyOpenRPA/Orchestrator/Server.py b/Sources/pyOpenRPA/Orchestrator/Server.py index a133913b..0b490fb4 100644 --- a/Sources/pyOpenRPA/Orchestrator/Server.py +++ b/Sources/pyOpenRPA/Orchestrator/Server.py @@ -1,4 +1,6 @@ from http.server import BaseHTTPRequestHandler, HTTPServer +from socketserver import ThreadingMixIn +import threading import json from threading import Thread from . import Processor @@ -11,27 +13,6 @@ import os #for path operations from http import cookies global mGlobalDict from . import ServerSettings -#inGlobalDict -# "JSONConfigurationDict": -class RobotDaemonServer(Thread): - def __init__(self,name,inGlobalDict): - Thread.__init__(self) - self.name = name - # Update the global dict - ServerSettings.SettingsUpdate(mGlobalDict) - def run(self): - inServerAddress=""; - inPort = mGlobalDict["Server"]["ListenPort"]; - # Server settings - # Choose port 8080, for port 80, which is normally used for a http server, you need root access - server_address = (inServerAddress, inPort) - httpd = HTTPServer(server_address, testHTTPServer_RequestHandler) - # Logging - mGlobalDict["Logger"].info(f"Server init. Listen URL: {inServerAddress}, Listen port: {inPort}") - # Запуск адреса в браузере - os.system("explorer http://127.0.0.1:8081") - httpd.serve_forever() - #Authenticate function () # return dict # { @@ -416,4 +397,37 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): self.send_response(403) # Send headers self.end_headers() - return \ No newline at end of file + return + #Logging + #!Turn it on to stop print in console + #def log_message(self, format, *args): + # return +class ThreadedHTTPServer(ThreadingMixIn, HTTPServer): + """Handle requests in a separate thread.""" + def finish_request(self, request, client_address): + request.settimeout(30) + # "super" can not be used because BaseServer is not created from object + HTTPServer.finish_request(self, request, client_address) +#inGlobalDict +# "JSONConfigurationDict": +class RobotDaemonServer(Thread): + def __init__(self,name,inGlobalDict): + Thread.__init__(self) + self.name = name + # Update the global dict + ServerSettings.SettingsUpdate(mGlobalDict) + def run(self): + inServerAddress=""; + inPort = mGlobalDict["Server"]["ListenPort"]; + # Server settings + # Choose port 8080, for port 80, which is normally used for a http server, you need root access + server_address = (inServerAddress, inPort) + #httpd = HTTPServer(server_address, testHTTPServer_RequestHandler) + # Logging + mGlobalDict["Logger"].info(f"Server init. Listen URL: {inServerAddress}, Listen port: {inPort}") + # Запуск адреса в браузере + os.system("explorer http://127.0.0.1:8081") + #httpd.serve_forever() + httpd = ThreadedHTTPServer(server_address, testHTTPServer_RequestHandler) + #print('Starting server, use to stop') + httpd.serve_forever() diff --git a/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml b/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml index ea1e2b18..f2efeae6 100644 --- a/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml +++ b/Sources/pyOpenRPA/Orchestrator/Web/Index.xhtml @@ -443,6 +443,9 @@ ///Установить HTML код $('.ui.modal.basic .content').html(lHTMLCode); $('.ui.modal.basic').modal('show'); + //DO widest modal for table with scroll x + $("div.ui.basic.modal.transition.visible.active.scrolling")[0].style["width"]="1300px" + $("div.ui.basic.modal.transition.visible.active.scrolling")[0].style["overflow"]="scroll" } //Service function mGlobal.Modal.TableFilter.FilterUpdate=function(inFilterValue) { diff --git a/Sources/pyOpenRPA/Orchestrator/Web/favicon.ico b/Sources/pyOpenRPA/Orchestrator/Web/favicon.ico index 27dd4696..79e3b24a 100644 Binary files a/Sources/pyOpenRPA/Orchestrator/Web/favicon.ico and b/Sources/pyOpenRPA/Orchestrator/Web/favicon.ico differ