From 2f73d34b6305e062aa53f27bbac7a587f6fabccb Mon Sep 17 00:00:00 2001 From: Patrick Nawracay Date: Tue, 29 Jan 2019 09:31:19 +0000 Subject: [PATCH] mgr/dashboard: Fix reloading of pool listing Remove broken functionality that prevents pools from being reloaded after deletion. The code also introduced a different problem; when clicking on a tab shortly after the page has been loaded, the code will restore the tab to the wrong one. Introduced by 9e913bfd59c3a08c9e06bd8535bb7b92593ba549 Signed-off-by: Patrick Nawracay --- .../pool/pool-details/pool-details.component.ts | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-details/pool-details.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-details/pool-details.component.ts index 083745bc5eb..260e1b3c399 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-details/pool-details.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-details/pool-details.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnChanges, ViewChild } from '@angular/core'; +import { Component, Input, ViewChild } from '@angular/core'; import { I18n } from '@ngx-translate/i18n-polyfill'; import { TabsetComponent } from 'ngx-bootstrap/tabs'; @@ -12,9 +12,8 @@ import { Permissions } from '../../../shared/models/permissions'; templateUrl: './pool-details.component.html', styleUrls: ['./pool-details.component.scss'] }) -export class PoolDetailsComponent implements OnChanges { +export class PoolDetailsComponent { cacheTierColumns: Array = []; - prevSelectionPool: Number = -1; @Input() selection: CdTableSelection; @@ -59,15 +58,4 @@ export class PoolDetailsComponent implements OnChanges { } ]; } - - ngOnChanges() { - if (this.tabsetChild) { - if (this.prevSelectionPool !== this.selection.first().pool) { - this.tabsetChild.tabs[0].active = true; - this.prevSelectionPool = this.selection.first().pool; - } else { - return; - } - } - } } -- 2.39.5