aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/tools/console/flowlist.py
diff options
context:
space:
mode:
Diffstat (limited to 'mitmproxy/tools/console/flowlist.py')
-rw-r--r--mitmproxy/tools/console/flowlist.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/mitmproxy/tools/console/flowlist.py b/mitmproxy/tools/console/flowlist.py
index 9650c0d3..24d4c96b 100644
--- a/mitmproxy/tools/console/flowlist.py
+++ b/mitmproxy/tools/console/flowlist.py
@@ -14,12 +14,17 @@ class FlowItem(urwid.WidgetWrap):
def get_text(self):
cols, _ = self.master.ui.get_cols_rows()
+ layout = self.master.options.console_flowlist_layout
+ if layout == "list" or (layout == 'default' and cols < 100):
+ render_mode = common.RenderMode.LIST
+ else:
+ render_mode = common.RenderMode.TABLE
+
return common.format_flow(
self.flow,
- self.flow is self.master.view.focus.flow,
+ render_mode=render_mode,
+ focused=self.flow is self.master.view.focus.flow,
hostheader=self.master.options.showhost,
- cols=cols,
- layout=self.master.options.console_flowlist_layout
)
def selectable(self):