X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fpybind%2Fmgr%2Fdashboard%2Ffrontend%2Fsrc%2Fapp%2Fshared%2Fdirectives%2Fstateful-tab.directive.ts;h=67d6d0b68f6176f4894bd0bdddfc53a08be6d3bf;hb=aee94f6923ba628a85d855d0c5316d0da78bfa2a;hp=cf6f27e9592d473073ef838b974f2233ba46908b;hpb=27f45121cc74e31203777ad565f78d8aad9b92a2;p=ceph.git diff --git a/ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/stateful-tab.directive.ts b/ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/stateful-tab.directive.ts index cf6f27e95..67d6d0b68 100644 --- a/ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/stateful-tab.directive.ts +++ b/ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/stateful-tab.directive.ts @@ -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); }