]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/stateful-tab.directive.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / directives / stateful-tab.directive.ts
index cf6f27e9592d473073ef838b974f2233ba46908b..67d6d0b68f6176f4894bd0bdddfc53a08be6d3bf 100644 (file)
@@ -8,6 +8,8 @@ import { NgbNav, NgbNavChangeEvent } from '@ng-bootstrap/ng-bootstrap';
 export class StatefulTabDirective implements OnInit {
   @Input()
   cdStatefulTab: string;
+  @Input()
+  cdStatefulTabDefault = '';
 
   private localStorage = window.localStorage;
 
@@ -15,7 +17,8 @@ export class StatefulTabDirective implements OnInit {
 
   ngOnInit() {
     // Is an activate tab identifier stored in the local storage?
-    const activeId = this.localStorage.getItem(`tabset_${this.cdStatefulTab}`);
+    const activeId =
+      this.cdStatefulTabDefault || this.localStorage.getItem(`tabset_${this.cdStatefulTab}`);
     if (activeId) {
       this.nav.select(activeId);
     }