app: report asset path location
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
942d595bc2
commit
2314ea74c2
|
@ -67,6 +67,7 @@ EXCLUDED_ARGS = ["_", "token", "access_token", "connection_id"]
|
||||||
AUTHORIZED_EXTS = [".png"]
|
AUTHORIZED_EXTS = [".png"]
|
||||||
DEFAULT_KLIPPY_LOG_PATH = "/tmp/klippy.log"
|
DEFAULT_KLIPPY_LOG_PATH = "/tmp/klippy.log"
|
||||||
ALL_TRANSPORTS = ["http", "websocket", "mqtt", "internal"]
|
ALL_TRANSPORTS = ["http", "websocket", "mqtt", "internal"]
|
||||||
|
ASSET_PATH = pathlib.Path(__file__).parent.joinpath("assets")
|
||||||
|
|
||||||
class MutableRouter(tornado.web.ReversibleRuleRouter):
|
class MutableRouter(tornado.web.ReversibleRuleRouter):
|
||||||
def __init__(self, application: MoonrakerApp) -> None:
|
def __init__(self, application: MoonrakerApp) -> None:
|
||||||
|
@ -281,6 +282,9 @@ class MoonrakerApp:
|
||||||
def get_server(self) -> Server:
|
def get_server(self) -> Server:
|
||||||
return self.server
|
return self.server
|
||||||
|
|
||||||
|
def get_asset_path(self) -> pathlib.Path:
|
||||||
|
return ASSET_PATH
|
||||||
|
|
||||||
async def close(self) -> None:
|
async def close(self) -> None:
|
||||||
if self.http_server is not None:
|
if self.http_server is not None:
|
||||||
self.http_server.stop()
|
self.http_server.stop()
|
||||||
|
@ -1020,5 +1024,4 @@ class WelcomeHandler(tornado.web.RequestHandler):
|
||||||
self.render("welcome.html", **context)
|
self.render("welcome.html", **context)
|
||||||
|
|
||||||
def get_template_path(self) -> Optional[str]:
|
def get_template_path(self) -> Optional[str]:
|
||||||
tpath = pathlib.Path(__file__).parent.joinpath("assets")
|
return str(ASSET_PATH)
|
||||||
return str(tpath)
|
|
||||||
|
|
Loading…
Reference in New Issue