mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-28 14:12:21 +03:00
Terminal window stuck at the last accessed *protected* server #1275
This commit is contained in:
parent
237d22b160
commit
4d7b798f34
3
NEWS
3
NEWS
@ -61,7 +61,8 @@ Bugs corrected:
|
||||
* Crashes when influxdb option set #1260
|
||||
* AMP for kernel process is not working #1261
|
||||
* Arch linux package (2.11.1-2) psutil (v5.4.1): RuntimeWarning: ignoring OSError #1203
|
||||
* Glances crash with extended process stats #1283
|
||||
* Glances crash with extended process stats #1283
|
||||
* Terminal window stuck at the last accessed *protected* server #1275
|
||||
|
||||
Backward-incompatible changes:
|
||||
|
||||
|
@ -24,11 +24,11 @@ import socket
|
||||
import threading
|
||||
|
||||
from glances.compat import Fault, ProtocolError, ServerProxy
|
||||
from glances.autodiscover import GlancesAutoDiscoverServer
|
||||
from glances.client import GlancesClient, GlancesClientTransport
|
||||
from glances.logger import logger, LOG_FILENAME
|
||||
from glances.password_list import GlancesPasswordList as GlancesPassword
|
||||
from glances.static_list import GlancesStaticServer
|
||||
from glances.autodiscover import GlancesAutoDiscoverServer
|
||||
from glances.outputs.glances_curses_browser import GlancesCursesBrowser
|
||||
|
||||
|
||||
@ -151,7 +151,7 @@ class GlancesClientBrowser(object):
|
||||
Connect and display the given server
|
||||
"""
|
||||
# Display the Glances client for the selected server
|
||||
logger.debug("Selected server: {}".format(server))
|
||||
logger.debug("Selected server {}".format(server))
|
||||
|
||||
# Connection can take time
|
||||
# Display a popup
|
||||
|
@ -106,14 +106,16 @@ class GlancesCursesBrowser(_GlancesCurses):
|
||||
sys.exit(0)
|
||||
elif self.pressedkey == 10:
|
||||
# 'ENTER' > Run Glances on the selected server
|
||||
logger.debug("Server number {} selected".format(self.cursor + 1))
|
||||
self.active_server = self.cursor
|
||||
elif self.pressedkey == curses.KEY_UP:
|
||||
logger.debug("Server {}/{} selected".format(self.cursor + 1, len(stats)))
|
||||
elif self.pressedkey == curses.KEY_UP or self.pressedkey == 65:
|
||||
# 'UP' > Up in the server list
|
||||
self.cursor_up(stats)
|
||||
elif self.pressedkey == curses.KEY_DOWN:
|
||||
logger.debug("Server {}/{} selected".format(self.cursor + 1, len(stats)))
|
||||
elif self.pressedkey == curses.KEY_DOWN or self.pressedkey == 66:
|
||||
# 'DOWN' > Down in the server list
|
||||
self.cursor_down(stats)
|
||||
logger.debug("Server {}/{} selected".format(self.cursor + 1, len(stats)))
|
||||
|
||||
# Return the key code
|
||||
return self.pressedkey
|
||||
|
Loading…
Reference in New Issue
Block a user