mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Start stubbing out a UI for the eventlog in mtimproxy.
This commit is contained in:
parent
9b398c03ab
commit
af92153974
@ -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,6 +1212,20 @@ class ConsoleMaster(flow.FlowMaster):
|
||||
if self.ui.started:
|
||||
self.ui.clear()
|
||||
self.focus_current()
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user