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

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

@ -533,3 +533,9 @@ def Update(inGSettings):
lURLItemDict["UACBool"]=None
if lL: lL.warning(
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
#}
#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": "/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"},

@ -43,6 +43,7 @@ def __Create__():
"ControlPanelDict": {
# "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
"ServerThread": None, # Server thread is there
"AgentActivityLifetimeSecFloat": 1200.0, # Time in seconds to life for activity for the agent

@ -847,6 +847,13 @@ def UACSuperTokenUpdate(inSuperTokenStr, inGSettings=None):
# 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):
"""

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

Loading…
Cancel
Save