You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
|
|
|
|
from pyOpenRPA import Orchestrator
|
|
|
|
|
from pyOpenRPA.Orchestrator.Managers import ControlPanel
|
|
|
|
|
import time
|
|
|
|
|
import os
|
|
|
|
|
import sys
|
|
|
|
|
import socket
|
|
|
|
|
import datetime
|
|
|
|
|
import urllib.parse
|
|
|
|
|
from pyOpenRPA.Orchestrator.Server import app
|
|
|
|
|
import threading
|
|
|
|
|
from fastapi import Depends
|
|
|
|
|
from fastapi.responses import PlainTextResponse
|
|
|
|
|
from fastapi.responses import FileResponse
|
|
|
|
|
time.sleep(1.5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
g_cp_name_str = "BUYER_01"
|
|
|
|
|
g_repo_name_str = os.path.abspath(__file__).split("\\")[-5]
|
|
|
|
|
g_repo_package_cp_path_str = os.path.abspath("\\".join(os.path.abspath(__file__).split("\\")[:-1]))
|
|
|
|
|
|
|
|
|
|
# Подключени файлов связанных с роботом-казначеем01
|
|
|
|
|
@app.get(path="/BUYER_01/scripts",tags=["BUYER_01"])
|
|
|
|
|
def get_file():
|
|
|
|
|
return FileResponse("Demo\\BUYER_01\\buyer_01.js")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# User settings
|
|
|
|
|
g_host_str = socket.gethostname().upper() # Identify PC
|
|
|
|
|
|
|
|
|
|
g_control_panel = ControlPanel(inControlPanelNameStr=g_cp_name_str,
|
|
|
|
|
inRefreshHTMLJinja2TemplatePathStr=os.path.join(g_repo_package_cp_path_str, "index.html"),
|
|
|
|
|
inJinja2TemplateRefreshBool=True,inRobotNameStr=g_repo_name_str)
|
|
|
|
|
g_jinja_context_dict = {"settings": sys.modules[__name__],
|
|
|
|
|
"urllib_parse_quote_plus": urllib.parse.quote_plus, "g_host_str": g_host_str, "g_repo_name_str": g_repo_name_str}
|
|
|
|
|
g_control_panel.Jinja2DataUpdateDictSet(inJinja2DataUpdateDict=g_jinja_context_dict)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|