From: Ricardo Marques Date: Mon, 2 Apr 2018 11:09:25 +0000 (+0100) Subject: mgr/dashboard: Apply usage-bar component on cephfs X-Git-Tag: v13.1.0~395^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9dc966bc3e86c4011c1f4e8a631233f0764fe662;p=ceph.git mgr/dashboard: Apply usage-bar component on cephfs Signed-off-by: Ricardo Marques --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs/cephfs.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs/cephfs.component.html index ef62292d8ad3..9da4446f39bd 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs/cephfs.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs/cephfs.component.html @@ -55,11 +55,9 @@ - - - + ; + @ViewChild('poolUsageTpl') poolUsageTpl: TemplateRef; @ViewChild('activityTmpl') activityTmpl: TemplateRef; routeParamsSubscribe: Subscription; @@ -54,11 +54,10 @@ export class CephfsComponent implements OnInit, OnDestroy { columns: [ { prop: 'pool' }, { prop: 'type' }, - { prop: 'used', pipe: this.dimlessBinary }, - { prop: 'avail', pipe: this.dimlessBinary }, + { prop: 'size', pipe: this.dimlessBinary }, { name: 'Usage', - cellTemplate: this.poolProgressTmpl, + cellTemplate: this.poolUsageTpl, comparator: (valueA, valueB, rowA, rowB, sortDirection) => { const valA = rowA.used / rowA.avail; const valB = rowB.used / rowB.avail; @@ -96,6 +95,9 @@ export class CephfsComponent implements OnInit, OnDestroy { this.cephfsService.getCephfs(this.id).subscribe((data: any) => { this.ranks.data = data.cephfs.ranks; this.pools.data = data.cephfs.pools; + this.pools.data.forEach((pool) => { + pool.size = pool.used + pool.avail; + }); this.standbys = [ { key: 'Standby daemons',