Index path fixes

dev-linux
Ivan Maslov 2 years ago
parent 90b59f9d9f
commit 8cea6abb99

@ -483,6 +483,21 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
# check if file in FileURL - File Path Mapping Dict
if lFileURL.lower() in gSettingsDict["FileManager"]["FileURLFilePathDict"]:
self.SendResponseContentTypeFile('application/octet-stream', gSettingsDict["FileManager"]["FileURLFilePathDict"][lFileURL])
# Index page
elif self.path == gSettingsDict["ServerDict"]["URLIndexStr"]:
lURLItemDict = {
"Method":"GET",
"URL": gSettingsDict["ServerDict"]["URLIndexStr"],
"MatchType": "EqualCase",
"ResponseFilePath": os.path.join(lOrchestratorFolder, "Web\\Index.xhtml"),
"ResponseContentType": "text/html"}
#Check if all condition are applied
lFlagURLIsApplied=False
lFlagURLIsApplied=self.URLItemCheckDo(lURLItemDict, "GET")
if lFlagURLIsApplied:
self.ResponseDictSend()
return
else:
#Set access denied code
# Send response status code

@ -457,8 +457,7 @@ def SettingsUpdate(inGlobalConfiguration):
# "ResponseContentType": "", #HTTP Content-type
# "ResponseDefRequestGlobal": None #Function with str result
#}
#Orchestrator basic dependencies
{"Method":"GET", "URL": __Orchestrator__.GSettingsGet()["ServerDict"]["URLIndexStr"], "MatchType": "EqualCase", "ResponseFilePath": os.path.join(lOrchestratorFolder, "Web\\Index.xhtml"), "ResponseContentType": "text/html"},
#Orchestrator basic dependencies # Index page in server.py because of special settings
{"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"},

Loading…
Cancel
Save