diff options
author | Jesson Soto Ventura <jessonsotoventura@gmail.com> | 2019-09-24 23:36:39 -0400 |
---|---|---|
committer | Jesson Soto Ventura <jessonsotoventura@gmail.com> | 2019-09-24 23:36:39 -0400 |
commit | c02d515b2aada5aa63439c6f2d71ae86a7c4dc6b (patch) | |
tree | ea99cadcc40ff9b7adb9f3ca112111199c3406be | |
parent | 94ca23b78208c5976a4c013a1acdd4c37e83ba76 (diff) | |
download | mitmproxy-c02d515b2aada5aa63439c6f2d71ae86a7c4dc6b.tar.gz mitmproxy-c02d515b2aada5aa63439c6f2d71ae86a7c4dc6b.tar.bz2 mitmproxy-c02d515b2aada5aa63439c6f2d71ae86a7c4dc6b.zip |
Fixed Duration on list view
- Set min size to 100 for table view
-rw-r--r-- | mitmproxy/tools/console/common.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mitmproxy/tools/console/common.py b/mitmproxy/tools/console/common.py index 527756c1..43ab50cb 100644 --- a/mitmproxy/tools/console/common.py +++ b/mitmproxy/tools/console/common.py @@ -345,7 +345,8 @@ def raw_format_list(f): if f["resp_ctype"]: resp.append(fcol(f["resp_ctype"], rc)) resp.append(fcol(f["resp_clen"], rc)) - resp.append(fcol(f["duration"], rc)) + pretty_duration = human.pretty_duration(f["duration"]) + resp.append(fcol(pretty_duration, rc)) elif f["err_msg"]: resp.append(fcol(SYMBOL_RETURN, "error")) @@ -557,7 +558,7 @@ def format_flow(f, focus, extended=False, hostheader=False, cols=False, layout=' duration=duration, )) - if ((layout == 'default' and cols < 80) or layout == "list"): + if ((layout == 'default' and cols < 100) or layout == "list"): return raw_format_list(tuple(sorted(d.items()))) else: return raw_format_table(tuple(sorted(d.items()))) |