mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-02 06:27:55 +03:00
Add hide filter to Docker list (first part of #1748)
This commit is contained in:
parent
5f037bb833
commit
bc0cf31a12
@ -327,6 +327,8 @@ port_default_gateway=True
|
||||
|
||||
[docker]
|
||||
disable=False
|
||||
# Hide some containers (comma separeted list)
|
||||
#hide=telegraf
|
||||
# Define the maximum docker size name (default is 20 chars)
|
||||
max_name_size=20
|
||||
#cpu_careful=50
|
||||
|
@ -210,6 +210,10 @@ class Plugin(GlancesPlugin):
|
||||
# Get stats for all containers
|
||||
stats['containers'] = []
|
||||
for container in containers:
|
||||
# Do not take hide container into account
|
||||
if self.is_hide(nativestr(container.name)):
|
||||
continue
|
||||
|
||||
# Init the stats for the current container
|
||||
container_stats = {}
|
||||
# The key is the container name and not the Id
|
||||
|
Loading…
Reference in New Issue
Block a user