ORC: You can change the index page (def WebURLIndexChange)

dev-linux
Ivan Maslov 3 years ago
parent 038352bf05
commit 90b59f9d9f

@ -533,3 +533,9 @@ def Update(inGSettings):
lURLItemDict["UACBool"]=None lURLItemDict["UACBool"]=None
if lL: lL.warning( if lL: lL.warning(
f"Backward compatibility (v1.2.4 to v1.2.7): ServerDict > URLList > item: add UACBool = None") # Log about compatibility f"Backward compatibility (v1.2.4 to v1.2.7): ServerDict > URLList > item: add UACBool = None") # Log about compatibility
# "URLIndexStr"
if "URLIndexStr" not in inGSettings["ServerDict"]:
inGSettings["ServerDict"]["URLIndexStr"] = "/"
if lL: lL.warning(
f"Backward compatibility (v1.2.11 to v1.2.12): ServerDict > URLIndexStr: add URLIndexStr = /") # Log about compatibility

@ -458,7 +458,7 @@ def SettingsUpdate(inGlobalConfiguration):
# "ResponseDefRequestGlobal": None #Function with str result # "ResponseDefRequestGlobal": None #Function with str result
#} #}
#Orchestrator basic dependencies #Orchestrator basic dependencies
{"Method":"GET", "URL": "/", "MatchType": "EqualCase", "ResponseFilePath": os.path.join(lOrchestratorFolder, "Web\\Index.xhtml"), "ResponseContentType": "text/html"}, {"Method":"GET", "URL": __Orchestrator__.GSettingsGet()["ServerDict"]["URLIndexStr"], "MatchType": "EqualCase", "ResponseFilePath": os.path.join(lOrchestratorFolder, "Web\\Index.xhtml"), "ResponseContentType": "text/html"},
{"Method":"GET", "URL": "/Index.js", "MatchType": "EqualCase", "ResponseFilePath": os.path.join(lOrchestratorFolder, "Web\\Index.js"), "ResponseContentType": "text/javascript"}, {"Method":"GET", "URL": "/Index.js", "MatchType": "EqualCase", "ResponseFilePath": os.path.join(lOrchestratorFolder, "Web\\Index.js"), "ResponseContentType": "text/javascript"},
{"Method":"GET", "URL": "/3rdParty/Semantic-UI-CSS-master/semantic.min.css", "MatchType": "EqualCase", "ResponseFilePath": os.path.join(lOrchestratorFolder, "..\\Resources\\Web\\Semantic-UI-CSS-master\\semantic.min.css"), "ResponseContentType": "text/css"}, {"Method":"GET", "URL": "/3rdParty/Semantic-UI-CSS-master/semantic.min.css", "MatchType": "EqualCase", "ResponseFilePath": os.path.join(lOrchestratorFolder, "..\\Resources\\Web\\Semantic-UI-CSS-master\\semantic.min.css"), "ResponseContentType": "text/css"},
{"Method":"GET", "URL": "/3rdParty/Semantic-UI-CSS-master/semantic.min.js", "MatchType": "EqualCase", "ResponseFilePath": os.path.join(lOrchestratorFolder, "..\\Resources\\Web\\Semantic-UI-CSS-master\\semantic.min.js"), "ResponseContentType": "application/javascript"}, {"Method":"GET", "URL": "/3rdParty/Semantic-UI-CSS-master/semantic.min.js", "MatchType": "EqualCase", "ResponseFilePath": os.path.join(lOrchestratorFolder, "..\\Resources\\Web\\Semantic-UI-CSS-master\\semantic.min.js"), "ResponseContentType": "application/javascript"},

@ -43,6 +43,7 @@ def __Create__():
"ControlPanelDict": { "ControlPanelDict": {
# "CPKey": <Managers.ControlPanel instance> # "CPKey": <Managers.ControlPanel instance>
}, },
"URLIndexStr":"/", # The index html page for the orchestrator control panel. Default is /
"AgentLimitLogSizeBytesInt": 300, # Don't show body if json body of transmition is more than "AgentLimitLogSizeBytesInt": 300, # Don't show body if json body of transmition is more than
"ServerThread": None, # Server thread is there "ServerThread": None, # Server thread is there
"AgentActivityLifetimeSecFloat": 1200.0, # Time in seconds to life for activity for the agent "AgentActivityLifetimeSecFloat": 1200.0, # Time in seconds to life for activity for the agent

@ -847,6 +847,13 @@ def UACSuperTokenUpdate(inSuperTokenStr, inGSettings=None):
# OrchestratorWeb defs # OrchestratorWeb defs
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
def WebURLIndexChange(inURLIndexStr:str ="/"):
"""Change the index page of the orchestrator if you dont want the '/' (main) path
:param inURLIndexStr: New url for the index page of the orchestrator, defaults to "/"
:type inURLIndexStr: str, optional
"""
GSettingsGet()["ServerDict"]["URLIndexStr"] = inURLIndexStr
def WebURLConnectDef(inMethodStr, inURLStr, inMatchTypeStr, inDef, inContentTypeStr="application/octet-stream", inGSettings = None, inUACBool = None): def WebURLConnectDef(inMethodStr, inURLStr, inMatchTypeStr, inDef, inContentTypeStr="application/octet-stream", inGSettings = None, inUACBool = None):
""" """

@ -1,9 +1,16 @@
LEGEND:
ORC - ORCHESTRATOR
STD - STUDIO
RBT - ROBOT
AGT - AGENT
[1.2.12] [1.2.12]
2022_Q2 2022_Q2
- ORCHESTRATOR - ORCHESTRATOR
- - WebURL... Support inUseCacheBool - cache the web pages - - WebURL... Support inUseCacheBool - cache the web pages
- - Web server auto detect MIME type from the file name - - Web server auto detect MIME type from the file name
- - Raise debug session from production. Support init_debug file in working directory - - Raise debug session from production. Support init_debug file in working directory
- - You can change the index page (def WebURLIndexChange)
- - MANAGERS - - MANAGERS
- - - ControlPanel - - - ControlPanel
- - - Git CI - - - Git CI

Loading…
Cancel
Save