From e12bf19e35867f3ea69f45054decb024a75fc2b4 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 10 Dec 2014 00:47:05 +0100 Subject: web: add event store, fix all those bugs --- libmproxy/web/app.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libmproxy/web/app.py') diff --git a/libmproxy/web/app.py b/libmproxy/web/app.py index d5638c10..31cb3ef1 100644 --- a/libmproxy/web/app.py +++ b/libmproxy/web/app.py @@ -35,7 +35,13 @@ class WebSocketEventBroadcaster(tornado.websocket.WebSocketHandler): class Flows(tornado.web.RequestHandler): def get(self): self.write(dict( - flows=[f.get_state(short=True) for f in self.application.state.flows] + list=[f.get_state(short=True) for f in self.application.state.flows] + )) + +class Events(tornado.web.RequestHandler): + def get(self): + self.write(dict( + list=list(self.application.state.events) )) @@ -54,6 +60,7 @@ class Application(tornado.web.Application): handlers = [ (r"/", IndexHandler), (r"/updates", ClientConnection), + (r"/events", Events), (r"/flows", Flows), (r"/flows/clear", FlowClear), ] -- cgit v1.2.3