diff options
| author | Aldo Cortesi <aldo@nullcube.com> | 2011-08-02 09:17:54 +1200 | 
|---|---|---|
| committer | Aldo Cortesi <aldo@nullcube.com> | 2011-08-02 09:17:54 +1200 | 
| commit | af92153974b4f251c470557970140d3f280b840e (patch) | |
| tree | 483d6afaead215819b54ee57bf3716d3d4277fbe /libmproxy/console.py | |
| parent | 9b398c03abde4d30894f142afe07abfc2365f68b (diff) | |
| download | mitmproxy-af92153974b4f251c470557970140d3f280b840e.tar.gz mitmproxy-af92153974b4f251c470557970140d3f280b840e.tar.bz2 mitmproxy-af92153974b4f251c470557970140d3f280b840e.zip  | |
Start stubbing out a UI for the eventlog in mtimproxy.
Diffstat (limited to 'libmproxy/console.py')
| -rw-r--r-- | libmproxy/console.py | 24 | 
1 files changed, 23 insertions, 1 deletions
diff --git a/libmproxy/console.py b/libmproxy/console.py index ffeda0d2..59de6e0f 100644 --- a/libmproxy/console.py +++ b/libmproxy/console.py @@ -192,6 +192,12 @@ class ConnectionItem(WWrap):              )          elif key == "X":              self.flow.kill(self.master) +        elif key == "v": +            self.master.eventlog = not self.master.eventlog +            self.master.view_connlist() +        elif key == "tab": +            if self.master.eventlog: +                pass          elif key == "enter":              if self.flow.request:                  self.master.view_flow(self.flow) @@ -910,6 +916,8 @@ class ConsoleMaster(flow.FlowMaster):          self.killextra = options.kill          self.rheaders = options.rheaders +        self.eventlog = options.eventlog +          if options.client_replay:              self.client_playback_path(options.client_replay) @@ -1204,7 +1212,21 @@ class ConsoleMaster(flow.FlowMaster):          if self.ui.started:              self.ui.clear()          self.focus_current() -        self.body = urwid.ListBox(self.conn_list_view) +        if self.eventlog: +            h = urwid.Text("Event log") +            h = urwid.Padding(h, align="left", width=("relative", 100)) +            h = urwid.AttrWrap(h, "heading") +            self.body = urwid.Pile( +                [ +                    urwid.ListBox(self.conn_list_view), +                    urwid.Frame( +                        urwid.ListBox([urwid.Text("foo"), urwid.Text("bar")]), +                        header = h +                    ) +                ] +            ) +        else: +            self.body = urwid.ListBox(self.conn_list_view)          self.statusbar = StatusBar(self, self.footer_text_default)          self.header = None          self.viewstate = VIEW_CONNLIST  | 
