]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.ts
import 15.2.5
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / osd / osd-details / osd-details.component.ts
index 9cac703d2622692b3cd24554df3cbb9e87265af6..0f9e7f701a82ca754c357278a68d92fcfc8dcd67 100644 (file)
@@ -17,7 +17,6 @@ export class OsdDetailsComponent implements OnChanges {
 
   osd: {
     id?: number;
-    loaded?: boolean;
     details?: any;
     histogram_failed?: string;
     tree?: any;
@@ -29,11 +28,11 @@ export class OsdDetailsComponent implements OnChanges {
   }
 
   ngOnChanges() {
-    this.osd = {
-      loaded: false
-    };
-    if (this.selection) {
+    if (_.get(this, 'osd.id') !== _.get(this, 'selection.id')) {
       this.osd = this.selection;
+    }
+
+    if (_.isNumber(_.get(this, 'osd.id'))) {
       this.refresh();
     }
   }
@@ -46,7 +45,6 @@ export class OsdDetailsComponent implements OnChanges {
         this.osd.histogram_failed = data.histogram;
         this.osd.details.histogram = undefined;
       }
-      this.osd.loaded = true;
     });
   }
 }