提交 54365fa8 编写于 作者: N Nicolas Hennion

Add sort on the Bootle interface

上级 05533c1c
......@@ -63,6 +63,7 @@ class glancesBottle:
'DEFAULT': '',
'UNDERLINE': 'underline',
'BOLD': 'bold',
'SORT': 'sort',
'OK': 'ok',
'TITLE': 'title',
'CAREFUL': 'careful',
......
......@@ -124,6 +124,7 @@ class glancesCurses:
'DEFAULT': self.no_color,
'UNDERLINE': curses.A_UNDERLINE,
'BOLD': A_BOLD,
'SORT': A_BOLD,
'OK': self.default_color2,
'TITLE': self.title_color,
'CAREFUL': self.ifCAREFUL_color2,
......
......@@ -107,7 +107,7 @@ class Plugin(GlancesPlugin):
try:
args.process_sorted_by
except AttributeError:
args.process_sorted_by = 'cpu_percent'
args.process_sorted_by = glances_processes.getsortkey()
if (args.process_sorted_by == 'auto'):
msg = "{0}".format(_("sorted automatically"))
ret.append(self.curse_add_line(msg))
......
......@@ -75,12 +75,12 @@ class Plugin(GlancesPlugin):
try:
args.process_sorted_by
except AttributeError:
args.process_sorted_by = 'cpu_percent'
args.process_sorted_by = glances_processes.getsortkey()
if (args.process_sorted_by == 'auto'):
process_sort_key = glances_processes.getsortkey()
else:
process_sort_key = args.process_sorted_by
sort_style = 'BOLD'
sort_style = 'SORT'
# Header
msg = "{0:15}".format(" ")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册