Skip to content

Commit 9d76bfe

Browse files
committed
First version of the Curses UI, miss engine name
1 parent 6b036ec commit 9d76bfe

File tree

10 files changed

+497
-3
lines changed

10 files changed

+497
-3
lines changed

conf/glances.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,14 @@ port_default_gateway=True
461461
#web_4_url=https://blog.nicolargo.com/nonexist
462462
#web_4_description=Intranet
463463

464+
[vms]
465+
disable=False
466+
# Define the maximum VMs size name (default is 20 chars)
467+
max_name_size=20
468+
# By default, Glances only display running VMs
469+
# Set the following key to True to display all VMs
470+
all=False
471+
464472
[containers]
465473
disable=False
466474
# Only show specific containers (comma-separated list of container name or regular expression)

glances/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ def init_ui_mode(self, args):
692692
disable(args, 'alert')
693693
disable(args, 'amps')
694694
disable(args, 'containers')
695+
disable(args, 'vms')
695696

696697
# Manage full quicklook option
697698
if getattr(args, 'full_quicklook', False):

glances/outputs/glances_curses.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class _GlancesCurses:
8484
'T': {'switch': 'network_sum'},
8585
'u': {'sort_key': 'username'},
8686
'U': {'switch': 'network_cumul'},
87+
'V': {'switch': 'disable_vms'},
8788
'w': {'handler': '_handle_clean_logs'},
8889
'W': {'switch': 'disable_wifi'},
8990
'x': {'handler': '_handle_clean_critical_logs'},
@@ -124,7 +125,7 @@ class _GlancesCurses:
124125
_left_sidebar_max_width = 34
125126

126127
# Define right sidebar
127-
_right_sidebar = ['containers', 'processcount', 'amps', 'processlist', 'alert']
128+
_right_sidebar = ['vms', 'containers', 'processcount', 'amps', 'processlist', 'alert']
128129

129130
def __init__(self, config=None, args=None):
130131
# Init

glances/plugins/containers/engines/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
#
2+
# This file is part of Glances.
3+
#
4+
# SPDX-FileCopyrightText: 2024 Nicolas Hennion <nicolas@nicolargo.com>
5+
#
6+
# SPDX-License-Identifier: LGPL-3.0-only
7+
#
8+
19
from typing import Any, Dict, Protocol, Tuple
210

311

glances/plugins/containers/engines/docker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from glances.globals import iterkeys, itervalues, nativestr, pretty_date, replace_special_chars
1515
from glances.logger import logger
16-
from glances.plugins.containers.stats_streamer import ThreadedIterableStreamer
16+
from glances.stats_streamer import ThreadedIterableStreamer
1717

1818
# Docker-py library (optional and Linux-only)
1919
# https://github.com/docker/docker-py

glances/plugins/containers/engines/podman.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from glances.globals import iterkeys, itervalues, nativestr, pretty_date, replace_special_chars, string_value_to_float
1515
from glances.logger import logger
16-
from glances.plugins.containers.stats_streamer import ThreadedIterableStreamer
16+
from glances.stats_streamer import ThreadedIterableStreamer
1717

1818
# Podman library (optional and Linux-only)
1919
# https://pypi.org/project/podman/

0 commit comments

Comments
 (0)