From 0d1a1d852eeccc2a331d5f8cc861a1edd83ae3c2 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Tue, 8 Oct 2019 22:14:39 +0200 Subject: [PATCH] Add shortcut to show / hide TCP connections (k) --- docs/cmds.rst | 3 +++ glances/outputs/glances_curses.py | 1 + glances/plugins/glances_quicklook.py | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/docs/cmds.rst b/docs/cmds.rst index 9b8984ae..3b85cc28 100644 --- a/docs/cmds.rst +++ b/docs/cmds.rst @@ -287,6 +287,9 @@ The following commands (key pressed) are supported while in Glances: ``I`` Show/hide IP module +``k`` + Show/hide TCP connections + ``l`` Show/hide log messages diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py index dac51e07..1be9177e 100644 --- a/glances/outputs/glances_curses.py +++ b/glances/outputs/glances_curses.py @@ -66,6 +66,7 @@ class _GlancesCurses(object): 'G': {'switch': 'disable_gpu'}, 'h': {'switch': 'help_tag'}, 'I': {'switch': 'disable_ip'}, + 'k': {'switch': 'disable_connections'}, 'l': {'switch': 'disable_alert'}, 'M': {'switch': 'reset_minmax_tag'}, 'n': {'switch': 'disable_network'}, diff --git a/glances/plugins/glances_quicklook.py b/glances/plugins/glances_quicklook.py index 456ecb12..bda6c24b 100644 --- a/glances/plugins/glances_quicklook.py +++ b/glances/plugins/glances_quicklook.py @@ -67,6 +67,10 @@ class Plugin(GlancesPlugin): # We want to display the stat in the curse interface self.display_curse = True + # !!! @TODO: Debug disable / enable from conf file + # logger.info(args) + # logger.info(config.as_dict()['quicklook']) + @GlancesPlugin._check_decorator @GlancesPlugin._log_result_decorator def update(self):