dashboard url redirect for convenience

This commit is contained in:
mantaohuang 2020-12-20 14:06:32 -05:00
parent d3205be71c
commit fd45db8741

View File

@ -21,7 +21,7 @@ interface = args["interface"]
om = OManager(session_folder, interface) om = OManager(session_folder, interface)
root = os.path.dirname(__file__) root = os.path.dirname(__file__)
instance_config_fp = args["load_instance_config"] instance_config_fp = args["load_instance_config"]
try: try:
@ -148,6 +148,7 @@ def make_app():
(r"/remove", RemoveInstatnceHandler), (r"/remove", RemoveInstatnceHandler),
(r"/clear_cache", ClearCacheInstatnceHandler), (r"/clear_cache", ClearCacheInstatnceHandler),
(r"/save_instance", SaveInstanceHandler), (r"/save_instance", SaveInstanceHandler),
(r"/dashboard", tornado.web.RedirectHandler, {"url": "/dashboard/"}),
(r"/dashboard/(.*)", tornado.web.StaticFileHandler, (r"/dashboard/(.*)", tornado.web.StaticFileHandler,
{"path": os.path.join(root, "tabler"), "default_filename": "index.html"}) {"path": os.path.join(root, "tabler"), "default_filename": "index.html"})
]) ])