From: Tiago Melo Date: Wed, 4 Sep 2019 13:33:23 +0000 (+0000) Subject: mgr/dashboard: Fix error in pool list component X-Git-Tag: v15.1.0~1598^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a8b8845b7a2cac6a56a2a106da82ceb773bca287;p=ceph.git mgr/dashboard: Fix error in pool list component Sometimes the pools list result comes without the tiers field. This was causing an error in the code. Signed-off-by: Tiago Melo --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts index 11441b7d4af0..847cf0375198 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts @@ -282,7 +282,9 @@ export class PoolListComponent implements OnInit { } getSelectionTiers() { - const cacheTierIds = this.selection.hasSingleSelection ? this.selection.first()['tiers'] : []; + const cacheTierIds = this.selection.hasSingleSelection + ? this.selection.first()['tiers'] || [] + : []; this.selectionCacheTiers = this.pools.filter((pool) => cacheTierIds.includes(pool.pool)); }