From 22d32c8b70a026b16d575fffc3d73b676e79d068 Mon Sep 17 00:00:00 2001 From: ghyer Date: Tue, 28 Jul 2020 11:46:47 +0800 Subject: [PATCH] mgr/dashboard: Add 'Dirs' and 'Caps' for filesystems details Signed-off-by: Haoyu Gao --- src/pybind/mgr/dashboard/controllers/cephfs.py | 16 +++++++++++++--- .../cephfs-detail/cephfs-detail.component.ts | 4 +++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/dashboard/controllers/cephfs.py b/src/pybind/mgr/dashboard/controllers/cephfs.py index 842d911fa8b..9538d301abc 100644 --- a/src/pybind/mgr/dashboard/controllers/cephfs.py +++ b/src/pybind/mgr/dashboard/controllers/cephfs.py @@ -159,6 +159,8 @@ class CephFS(RESTController): info = mdsmap['info']['gid_{0}'.format(gid)] dns = mgr.get_latest("mds", info['name'], "mds_mem.dn") inos = mgr.get_latest("mds", info['name'], "mds_mem.ino") + dirs = mgr.get_latest("mds", info['name'], "mds_mem.dir") + caps = mgr.get_latest("mds", info['name'], "mds_mem.cap") if rank == 0: client_count = mgr.get_latest("mds", info['name'], @@ -193,7 +195,9 @@ class CephFS(RESTController): "mds": info['name'], "activity": activity, "dns": dns, - "inos": inos + "inos": inos, + "dirs": dirs, + "caps": caps } ) @@ -205,7 +209,9 @@ class CephFS(RESTController): "mds": "", "activity": 0.0, "dns": 0, - "inos": 0 + "inos": 0, + "dirs": 0, + "caps": 0 } ) @@ -217,6 +223,8 @@ class CephFS(RESTController): inos = mgr.get_latest("mds", daemon_info['name'], "mds_mem.ino") dns = mgr.get_latest("mds", daemon_info['name'], "mds_mem.dn") + dirs = mgr.get_latest("mds", daemon_info['name'], "mds_mem.dir") + caps = mgr.get_latest("mds", daemon_info['name'], "mds_mem.cap") activity = CephService.get_rate( "mds", daemon_info['name'], "mds_log.replay") @@ -228,7 +236,9 @@ class CephFS(RESTController): "mds": daemon_info['name'], "activity": activity, "dns": dns, - "inos": inos + "inos": inos, + "dirs": dirs, + "caps": caps } ) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.ts index bbf63f4107c..fb14e9830fe 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.ts @@ -55,7 +55,9 @@ export class CephfsDetailComponent implements OnChanges, OnInit { { prop: 'mds', name: $localize`Daemon` }, { prop: 'activity', name: $localize`Activity`, cellTemplate: this.activityTmpl }, { prop: 'dns', name: $localize`Dentries`, pipe: this.dimless }, - { prop: 'inos', name: $localize`Inodes`, pipe: this.dimless } + { prop: 'inos', name: $localize`Inodes`, pipe: this.dimless }, + { prop: 'dirs', name: $localize`Dirs`, pipe: this.dimless}, + { prop: 'caps', name: $localize`Caps`, pipe: this.dimless} ], pools: [ { prop: 'pool', name: $localize`Pool` }, -- 2.39.5