提交 6b2425ee 编写于 作者: N nicolargo

Add a light mode for the console UI #1165

上级 3715d051
......@@ -9,6 +9,7 @@ Enhancements and new features:
* A way to have only REST API available and disable WEB GUI access #1149
* Docker module doesn't export details about stopped containers #1152
* Add a light mode for the console UI #1165
Bugs corrected:
......
......@@ -106,6 +106,10 @@ Command-Line Options
disable Wifi module
.. option:: --light, --enable-light
light mode for Curses UI (disable all but top menu)
.. option:: -0, --disable-irix
task's CPU usage will be divided by the total number of CPUs
......
.\" Man page generated from reStructuredText.
.
.TH "GLANCES" "1" "Oct 12, 2017" "3.0_DEV" "Glances"
.TH "GLANCES" "1" "Oct 15, 2017" "3.0_DEV" "Glances"
.SH NAME
glances \- An eye on your system
.
......
......@@ -146,6 +146,9 @@ Examples of use:
dest='disable_webui', help='disable the Web Interface')
parser.add_argument('--disable-wifi', action='store_true', default=False,
dest='disable_wifi', help='disable wifi module')
parser.add_argument('--light', '--enable-light', action='store_true',
default=False, dest='enable_light',
help='light mode for Curses UI (disable all but top menu)')
parser.add_argument('-0', '--disable-irix', action='store_true', default=False,
dest='disable_irix', help='task\'s cpu usage will be divided by the total number of CPUs')
parser.add_argument('-1', '--percpu', action='store_true', default=False,
......@@ -356,6 +359,15 @@ Examples of use:
args.network_sum = False
args.network_cumul = False
# Manage light mode
if args.enable_light:
logger.info("Light mode is on")
args.disable_left_sidebar = True
args.disable_process = True
args.disable_alert = True
args.disable_amps = True
args.disable_docker = True
# Manage full quicklook option
if args.full_quicklook:
logger.info("Disable QuickLook menu")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册