diff --git a/glances/client_browser.py b/glances/client_browser.py index cfcf01a2..61628689 100644 --- a/glances/client_browser.py +++ b/glances/client_browser.py @@ -160,7 +160,7 @@ class GlancesClientBrowser(object): "Server list dictionnary change inside the loop (wait next update)") # Update the screen (list or Glances client) - if not self.screen.active_server: + if self.screen.active_server is None: # Display the Glances browser self.screen.update(self.get_servers_list()) else: diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py index 4d5934c8..2748243d 100644 --- a/glances/outputs/glances_curses.py +++ b/glances/outputs/glances_curses.py @@ -1104,6 +1104,9 @@ class GlancesCursesBrowser(_GlancesCurses): # Catch the browser pressed key self.pressedkey = self.get_key(self.term_window) + if self.pressedkey != -1: + logger.debug("Key pressed. Code=%s" % self.pressedkey) + # Actions... if self.pressedkey == ord('\x1b') or self.pressedkey == ord('q'): # 'ESC'|'q' > Quit @@ -1114,10 +1117,10 @@ class GlancesCursesBrowser(_GlancesCurses): # 'ENTER' > Run Glances on the selected server logger.debug("Server number {0} selected".format(self.cursor + 1)) self.active_server = self.cursor - elif self.pressedkey == 259: + elif self.pressedkey == 65: # 'UP' > Up in the server list self.cursor_up(servers_list) - elif self.pressedkey == 258: + elif self.pressedkey == 66: # 'DOWN' > Down in the server list self.cursor_down(servers_list) diff --git a/glances/static_list.py b/glances/static_list.py index 782623e0..2fdcd60b 100644 --- a/glances/static_list.py +++ b/glances/static_list.py @@ -56,7 +56,7 @@ class GlancesStaticServer(object): if new_server['name'] is not None: # Manage optionnal information if new_server['port'] is None: - new_server['port'] = 61209 + new_server['port'] = '61209' new_server['username'] = 'glances' # By default, try empty (aka no) password new_server['password'] = ''