aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/web/static/js
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2014-09-17 13:58:56 +1200
committerAldo Cortesi <aldo@nullcube.com>2014-09-17 13:58:56 +1200
commitb4ecd96beb77a8bae02d82eac174dded198797a3 (patch)
tree1868202264b5e201338698b76dbed5104448ec28 /libmproxy/web/static/js
parent51db9a5612f0899ed61751dbee3f4e4b19a74ea4 (diff)
downloadmitmproxy-b4ecd96beb77a8bae02d82eac174dded198797a3.tar.gz
mitmproxy-b4ecd96beb77a8bae02d82eac174dded198797a3.tar.bz2
mitmproxy-b4ecd96beb77a8bae02d82eac174dded198797a3.zip
Introduce short form object state, and connect the ends to send data to web app
Diffstat (limited to 'libmproxy/web/static/js')
-rw-r--r--libmproxy/web/static/js/app.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/libmproxy/web/static/js/app.js b/libmproxy/web/static/js/app.js
index 90a004ef..84eece87 100644
--- a/libmproxy/web/static/js/app.js
+++ b/libmproxy/web/static/js/app.js
@@ -221,7 +221,15 @@ _Connection.prototype.onopen = function (open) {
};
_Connection.prototype.onmessage = function (message) {
//AppDispatcher.dispatchServerAction(...);
- console.log("onmessage", this, arguments);
+ var m = JSON.parse(message.data);
+ switch (m.type){
+ case "flow":
+ console.log("flow", m.data);
+ break;
+ case "event":
+ console.log("event", m.data.message)
+ break;
+ }
};
_Connection.prototype.onerror = function (error) {
console.log("onerror", this, arguments);