diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2014-09-17 13:58:56 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2014-09-17 13:58:56 +1200 |
commit | b4ecd96beb77a8bae02d82eac174dded198797a3 (patch) | |
tree | 1868202264b5e201338698b76dbed5104448ec28 /libmproxy/web/static/js | |
parent | 51db9a5612f0899ed61751dbee3f4e4b19a74ea4 (diff) | |
download | mitmproxy-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.js | 10 |
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); |