Merge pull request #91 from bmartin5692/move-web_template

move data web under bumper
This commit is contained in:
Brian Martin 2020-01-06 09:34:52 -05:00 committed by GitHub
commit c01223a2f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 3 deletions

View file

@ -58,7 +58,7 @@ class ConfServer:
self.app = web.Application(loop=asyncio.get_event_loop(), middlewares=[ self.app = web.Application(loop=asyncio.get_event_loop(), middlewares=[
self.log_all_requests, self.log_all_requests,
]) ])
aiohttp_jinja2.setup(self.app, loader=jinja2.FileSystemLoader(os.path.join(bumper.data_dir, "web","templates"))) aiohttp_jinja2.setup(self.app, loader=jinja2.FileSystemLoader(os.path.join(bumper.bumper_dir,"bumper","web","templates")))
self.app.add_routes( self.app.add_routes(
[ [

View file

@ -43,7 +43,7 @@ class portal_api_pim(plugins.ConfServerApp):
try: try:
fileID = request.match_info.get("id", "") fileID = request.match_info.get("id", "")
return web.FileResponse(os.path.join(bumper.data_dir,"web","robotvac_image.jpg")) return web.FileResponse(os.path.join(bumper.bumper_dir,"bumper","web","images","robotvac_image.jpg"))
except Exception as e: except Exception as e:
logging.exception("{}".format(e)) logging.exception("{}".format(e))

View file

@ -30,7 +30,7 @@ class upload_global(plugins.ConfServerApp):
try: try:
fileID = request.match_info.get("id", "") fileID = request.match_info.get("id", "")
return web.FileResponse(os.path.join(bumper.data_dir,"web","robotvac_image.jpg")) return web.FileResponse(os.path.join(bumper.bumper_dir,"bumper","web","images","robotvac_image.jpg"))
except Exception as e: except Exception as e:
logging.exception("{}".format(e)) logging.exception("{}".format(e))

View file

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 143 KiB

Before After
Before After