]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix reloading of pool listing 26182/head
authorPatrick Nawracay <pnawracay@suse.com>
Tue, 29 Jan 2019 09:31:19 +0000 (09:31 +0000)
committerPatrick Nawracay <pnawracay@suse.com>
Tue, 29 Jan 2019 12:51:39 +0000 (12:51 +0000)
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 <pnawracay@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-details/pool-details.component.ts

index 083745bc5eb1231431e2b1e005b21ac759a74b81..260e1b3c399469fd6eaccd57d87a6112684427c8 100644 (file)
@@ -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<CdTableColumn> = [];
-  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;
-      }
-    }
-  }
 }