move data web under bumper

- move data/web under bumper/web
  - originally under data for user customization, but chances are slim and makes docker/data more of a process to get working correctly.
This commit is contained in:
Brian Martin 2020-01-06 09:31:22 -05:00
parent 8709a39876
commit 56fbf3b57e
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