aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim
diff options
context:
space:
mode:
Diffstat (limited to 'fg21sim')
-rw-r--r--fg21sim/webui/app.py10
-rw-r--r--fg21sim/webui/handlers/__init__.py2
2 files changed, 10 insertions, 2 deletions
diff --git a/fg21sim/webui/app.py b/fg21sim/webui/app.py
index 9f8092e..9bc7029 100644
--- a/fg21sim/webui/app.py
+++ b/fg21sim/webui/app.py
@@ -16,7 +16,11 @@ import os
import tornado.web
from tornado.web import url
-from .handlers import IndexHandler, LoginHandler, WSHandler
+from .handlers import (IndexHandler,
+ LoginHandler,
+ ConfigsAJAXHandler,
+ ConsoleAJAXHandler,
+ WSHandler)
from .utils import gen_cookie_secret
from ..configs import ConfigManager
@@ -45,6 +49,8 @@ class Application(tornado.web.Application):
handlers = [
url(r"/", IndexHandler, name="index"),
url(r"/login", LoginHandler, name="login"),
+ url(r"/ajax/configs", ConfigsAJAXHandler),
+ url(r"/ajax/console", ConsoleAJAXHandler),
url(r"/ws", WSHandler),
]
# Application settings
@@ -59,7 +65,7 @@ class Application(tornado.web.Application):
"login_url": r"/login",
# Secret key used to sign the cookies
"cookie_secret": gen_cookie_secret(),
- # Enable "cross-site request forgery" (XSRF)
+ # Enable "cross-site request forgery" (XSRF) protection
"xsrf_cookies": True,
}
settings.update(kwargs)
diff --git a/fg21sim/webui/handlers/__init__.py b/fg21sim/webui/handlers/__init__.py
index 0eb3818..6fa4152 100644
--- a/fg21sim/webui/handlers/__init__.py
+++ b/fg21sim/webui/handlers/__init__.py
@@ -3,4 +3,6 @@
from .index import IndexHandler
from .login import LoginHandler
+from .configs import ConfigsAJAXHandler
+from .console import ConsoleAJAXHandler
from .websocket import WSHandler