提交 8e8e6544 编写于 作者: N Nicolargo

Add --full-quicklook tag (key '4')

上级 8217b9e2
...@@ -147,6 +147,12 @@ Command-Line Options ...@@ -147,6 +147,12 @@ Command-Line Options
-d, --debug enable debug mode -d, --debug enable debug mode
-C CONF_FILE, --config CONF_FILE -C CONF_FILE, --config CONF_FILE
path to the configuration file path to the configuration file
--disable-quicklook disable quick look module
--full-quicklook enable all but quick look and load
--disable-cpu disable CPU module
--disable-mem disable MEM module
--disable-swap disable SWAP module
--disable-load disable LOAD module
--disable-network disable network module --disable-network disable network module
--disable-ip disable IP module --disable-ip disable IP module
--disable-diskio disable disk I/O module --disable-diskio disable disk I/O module
...@@ -160,7 +166,6 @@ Command-Line Options ...@@ -160,7 +166,6 @@ Command-Line Options
sensors modules (py3sensors needed) sensors modules (py3sensors needed)
--disable-process disable process module --disable-process disable process module
--disable-log disable log module --disable-log disable log module
--disable-quicklook disable quick look module
--disable-bold disable bold mode in the terminal --disable-bold disable bold mode in the terminal
--enable-process-extended --enable-process-extended
enable extended stats on top process enable extended stats on top process
...@@ -280,6 +285,8 @@ The following commands (key pressed) are supported while in Glances: ...@@ -280,6 +285,8 @@ The following commands (key pressed) are supported while in Glances:
Enable/disable left sidebar Enable/disable left sidebar
``3`` ``3``
Enable/disable the quick look module Enable/disable the quick look module
``4``
Enable/disable all but quick look and load module
``/`` ``/``
Switch between short name / command line (processes name) Switch between short name / command line (processes name)
......
...@@ -100,6 +100,10 @@ Start the client browser (browser mode):\n\ ...@@ -100,6 +100,10 @@ Start the client browser (browser mode):\n\
parser.add_argument('-C', '--config', dest='conf_file', parser.add_argument('-C', '--config', dest='conf_file',
help='path to the configuration file') help='path to the configuration file')
# Enable or disable option on startup # Enable or disable option on startup
parser.add_argument('-3', '--disable-quicklook', action='store_true', default=False,
dest='disable_quicklook', help='disable quick look module')
parser.add_argument('-4', '--full-quicklook', action='store_true', default=False,
dest='full_quicklook', help='disable all but quick look and load')
parser.add_argument('--disable-cpu', action='store_true', default=False, parser.add_argument('--disable-cpu', action='store_true', default=False,
dest='disable_cpu', help='disable CPU module') dest='disable_cpu', help='disable CPU module')
parser.add_argument('--disable-mem', action='store_true', default=False, parser.add_argument('--disable-mem', action='store_true', default=False,
...@@ -131,8 +135,6 @@ Start the client browser (browser mode):\n\ ...@@ -131,8 +135,6 @@ Start the client browser (browser mode):\n\
dest='disable_process', help='disable process module') dest='disable_process', help='disable process module')
parser.add_argument('--disable-log', action='store_true', default=False, parser.add_argument('--disable-log', action='store_true', default=False,
dest='disable_log', help='disable log module') dest='disable_log', help='disable log module')
parser.add_argument('-3', '--disable-quicklook', action='store_true', default=False,
dest='disable_quicklook', help='disable quick look module')
parser.add_argument('--disable-bold', action='store_false', default=True, parser.add_argument('--disable-bold', action='store_false', default=True,
dest='disable_bold', help='disable bold mode in the terminal') dest='disable_bold', help='disable bold mode in the terminal')
parser.add_argument('--enable-process-extended', action='store_true', default=False, parser.add_argument('--enable-process-extended', action='store_true', default=False,
......
...@@ -264,6 +264,21 @@ class _GlancesCurses(object): ...@@ -264,6 +264,21 @@ class _GlancesCurses(object):
elif self.pressedkey == ord('3'): elif self.pressedkey == ord('3'):
# '3' > Enable/disable quicklook # '3' > Enable/disable quicklook
self.args.disable_quicklook = not self.args.disable_quicklook self.args.disable_quicklook = not self.args.disable_quicklook
elif self.pressedkey == ord('4'):
# '4' > Enable/disable all but quick look and load
self.args.full_quicklook = not self.args.full_quicklook
if self.args.full_quicklook:
self.args.disable_quicklook = False
self.args.disable_cpu = True
self.args.disable_mem = True
self.args.disable_swap = True
self.args.disable_load = False
else:
self.args.disable_quicklook = False
self.args.disable_cpu = False
self.args.disable_mem = False
self.args.disable_swap = False
self.args.disable_load = False
elif self.pressedkey == ord('/'): elif self.pressedkey == ord('/'):
# '/' > Switch between short/long name for processes # '/' > Switch between short/long name for processes
self.args.process_short_name = not self.args.process_short_name self.args.process_short_name = not self.args.process_short_name
......
...@@ -31,6 +31,24 @@ enable debug mode (log file is /tmp/glances.log) ...@@ -31,6 +31,24 @@ enable debug mode (log file is /tmp/glances.log)
.B \-C CONF_FILE, \-\-config CONF_FILE .B \-C CONF_FILE, \-\-config CONF_FILE
path to the configuration file path to the configuration file
.TP .TP
.B \-\-disable-quicklook
disable quick look module
.TP
.B \-\-full-quicklook
disable all but quick look and load modules
.TP
.B \-\-disable-cpu
disable CPU module
.TP
.B \-\-disable-mem
disable MEM module
.TP
.B \-\-disable-swap
disable SWAP module
.TP
.B \-\-disable-load
disable LOAD module
.TP
.B \-\-disable-network .B \-\-disable-network
disable network module disable network module
.TP .TP
...@@ -64,9 +82,6 @@ disable process module ...@@ -64,9 +82,6 @@ disable process module
.B \-\-disable-log .B \-\-disable-log
disable log module disable log module
.TP .TP
.B \-\-disable-quicklook
disable quick look module
.TP
.B \-\-disable-bold .B \-\-disable-bold
disable bold mode in the terminal disable bold mode in the terminal
.TP .TP
...@@ -261,6 +276,9 @@ Enable/disable left sidebar ...@@ -261,6 +276,9 @@ Enable/disable left sidebar
.B 3 .B 3
Enable/disable the quick look module Enable/disable the quick look module
.TP .TP
.B 4
Enable/disable all but quick look and load module
.TP
.B / .B /
Switch between short name/command line (processes name) Switch between short name/command line (processes name)
.SH EXAMPLES .SH EXAMPLES
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册