From: Jos Collin Date: Wed, 16 Nov 2022 07:56:48 +0000 (+0530) Subject: cephfs-top: display filters in the header X-Git-Tag: v18.1.0~858^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7792422ef6a87b85a68f2fe7899cb9813d7aa7ad;p=ceph.git cephfs-top: display filters in the header This would help the user to identify what are the filters currently applied to the cephfs-top screens at a glance. Signed-off-by: Jos Collin --- diff --git a/src/tools/cephfs/top/cephfs-top b/src/tools/cephfs/top/cephfs-top index 63744ea75611..67ff3f735966 100755 --- a/src/tools/cephfs/top/cephfs-top +++ b/src/tools/cephfs/top/cephfs-top @@ -351,6 +351,7 @@ class FSTop(object): current_states["last_field"] = (field_menu[curr_row1].split('='))[0] else: current_states["last_field"] = 'chit' + self.header.erase() # erase the previous text if isinstance(last_fs, list): self.run_all_display() else: @@ -452,6 +453,7 @@ class FSTop(object): elif int(key) != 0: current_states["limit"] = key[:-1] self.stdscr.erase() + self.header.erase() # erase the previous text if isinstance(current_states['last_fs'], list): self.run_all_display() else: @@ -811,7 +813,9 @@ class FSTop(object): num_mounts=num_mounts, num_kclients=num_kclients, num_libs=num_libs), curses.A_DIM) - self.header.addstr(4, 0, help, curses.A_DIM) + self.header.addstr(4, 0, f"Filters: Sort - {current_states['last_field']}, " + f"Limit - {current_states['limit']}", curses.A_DIM) + self.header.addstr(5, 0, help, curses.A_DIM) return True def run_display(self):