mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-02 22:54:49 +03:00
chg: Plugin name - docker -> containers
This commit is contained in:
parent
a805386255
commit
532df87e74
@ -386,7 +386,7 @@ port_default_gateway=True
|
||||
#web_4_url=https://blog.nicolargo.com/nonexist
|
||||
#web_4_description=Intranet
|
||||
|
||||
[docker]
|
||||
[containers]
|
||||
disable=False
|
||||
# Only show specific containers (comma separated list of container name or regular expression)
|
||||
# Comment this line to display all containers (default configuration)
|
||||
|
@ -57,7 +57,7 @@ class _GlancesCurses(object):
|
||||
'c': {'sort_key': 'cpu_percent'},
|
||||
'C': {'switch': 'disable_cloud'},
|
||||
'd': {'switch': 'disable_diskio'},
|
||||
'D': {'switch': 'disable_docker'},
|
||||
'D': {'switch': 'disable_containers'},
|
||||
# 'e' > Enable/Disable process extended
|
||||
# 'E' > Erase the process filter
|
||||
# 'f' > Show/hide fs / folder stats
|
||||
@ -124,7 +124,7 @@ class _GlancesCurses(object):
|
||||
_left_sidebar_max_width = 34
|
||||
|
||||
# Define right sidebar
|
||||
_right_sidebar = ['docker', 'processcount', 'amps', 'processlist', 'alert']
|
||||
_right_sidebar = ['containers', 'processcount', 'amps', 'processlist', 'alert']
|
||||
|
||||
def __init__(self, config=None, args=None):
|
||||
# Init
|
||||
@ -612,7 +612,7 @@ class _GlancesCurses(object):
|
||||
max_processes_displayed = (
|
||||
self.term_window.getmaxyx()[0]
|
||||
- 11
|
||||
- (0 if 'docker' not in __stat_display else self.get_stats_display_height(__stat_display["docker"]))
|
||||
- (0 if 'containers' not in __stat_display else self.get_stats_display_height(__stat_display["containers"]))
|
||||
- (
|
||||
0
|
||||
if 'processcount' not in __stat_display
|
||||
|
@ -716,7 +716,7 @@ class Plugin(GlancesPlugin):
|
||||
# Get the maximum containers name
|
||||
# Max size is configurable. See feature request #1723.
|
||||
name_max_width = min(
|
||||
self.config.get_int_value('docker', 'max_name_size', default=20) if self.config is not None else 20,
|
||||
self.config.get_int_value('containers', 'max_name_size', default=20) if self.config is not None else 20,
|
||||
len(max(self.stats['containers'], key=lambda x: len(x['name']))['name']),
|
||||
)
|
||||
msg = ' {:{width}}'.format('Name', width=name_max_width)
|
Loading…
Reference in New Issue
Block a user