mirror of https://github.com/nicolargo/glances.git
parent
f7e24b2233
commit
e608921992
|
|
@ -47,3 +47,5 @@ _build
|
||||||
# web ui
|
# web ui
|
||||||
node_modules/
|
node_modules/
|
||||||
bower_components/
|
bower_components/
|
||||||
|
|
||||||
|
.vscode/
|
||||||
|
|
@ -124,6 +124,8 @@ class GlancesCursesBrowser(_GlancesCurses):
|
||||||
"""Set next page."""
|
"""Set next page."""
|
||||||
if self._current_page + 1 < self._page_max:
|
if self._current_page + 1 < self._page_max:
|
||||||
self._current_page += 1
|
self._current_page += 1
|
||||||
|
else:
|
||||||
|
self._current_page = 0
|
||||||
self.cursor_position = 0
|
self.cursor_position = 0
|
||||||
|
|
||||||
def __catch_key(self, stats):
|
def __catch_key(self, stats):
|
||||||
|
|
@ -288,9 +290,7 @@ class GlancesCursesBrowser(_GlancesCurses):
|
||||||
self.cursor = len(stats) - 1
|
self.cursor = len(stats) - 1
|
||||||
|
|
||||||
start_line = self._page_max_lines * self._current_page
|
start_line = self._page_max_lines * self._current_page
|
||||||
end_line = start_line + self._page_max_lines
|
end_line = start_line + self.get_pagelines(stats)
|
||||||
if end_line > stats_len:
|
|
||||||
end_line = stats_len
|
|
||||||
|
|
||||||
current_page = stats[start_line:end_line]
|
current_page = stats[start_line:end_line]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue