Merge branch 'issue1275' into develop

This commit is contained in:
nicolargo 2018-07-28 14:32:30 +02:00
commit fa58150db6
3 changed files with 9 additions and 6 deletions

3
NEWS
View File

@ -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:

View File

@ -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

View File

@ -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