spdk_top: print first tab page after resizing
There is a problem with data display after interface resize when user performs these actions: 1. Run spdk_top with multiple data pages 2. Switch to the last page 3. Enlarge interface increasing window height significantly. After following these steps user is presented with a blank tab with no records and incorrectly displayed page info (i.e. 3/1) and has to manually switch back to the pages containing selectable records. This patch forces spdk_top to display first data page after vertical resize. Change-Id: I4f8eb27f360e44140f9db7a80e57d299847ca0af Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8979 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
5a85159957
commit
d8ccfa3484
@ -2700,6 +2700,9 @@ show_stats(pthread_t *data_thread)
|
||||
getmaxyx(stdscr, max_row, max_col);
|
||||
|
||||
if (max_row != g_max_row || max_col != g_max_col) {
|
||||
if (max_row != g_max_row) {
|
||||
current_page = 0;
|
||||
}
|
||||
g_max_row = spdk_max(max_row, required_size);
|
||||
g_max_col = max_col;
|
||||
g_data_win_size = g_max_row - required_size + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user