]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/core/context/context.component.ts
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / core / context / context.component.ts
index 8de611307a71fc35538b09b1eb21b695cddfa5b4..e036b754438b4c6314637c5cb3bc5afb42481fce 100644 (file)
@@ -23,9 +23,13 @@ export class ContextComponent implements OnInit, OnDestroy {
   readonly REFRESH_INTERVAL = 5000;
   private subs = new Subscription();
   private rgwUrlPrefix = '/rgw';
+  private rgwUserUrlPrefix = '/rgw/user';
+  private rgwBuckerUrlPrefix = '/rgw/bucket';
   permissions: Permissions;
   featureToggleMap$: FeatureTogglesMap$;
-  isRgwRoute = document.location.href.includes(this.rgwUrlPrefix);
+  isRgwRoute =
+    document.location.href.includes(this.rgwUserUrlPrefix) ||
+    document.location.href.includes(this.rgwBuckerUrlPrefix);
 
   constructor(
     private authStorageService: AuthStorageService,
@@ -42,7 +46,12 @@ export class ContextComponent implements OnInit, OnDestroy {
     this.subs.add(
       this.router.events
         .pipe(filter((event: Event) => event instanceof NavigationEnd))
-        .subscribe(() => (this.isRgwRoute = this.router.url.startsWith(this.rgwUrlPrefix)))
+        .subscribe(
+          () =>
+            (this.isRgwRoute = [this.rgwBuckerUrlPrefix, this.rgwUserUrlPrefix].some((urlPrefix) =>
+              this.router.url.startsWith(urlPrefix)
+            ))
+        )
     );
     // Set daemon list polling only when in RGW route:
     this.subs.add(