From: Nizamudeen A Date: Thu, 18 May 2023 06:24:53 +0000 (+0530) Subject: mgr/dashboard: remove Selected Object Gateway dropdown X-Git-Tag: v17.2.7~346^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a4933e56062d8a0f9edeb209a5d03a45676ca526;p=ceph.git mgr/dashboard: remove Selected Object Gateway dropdown Only from Daemons and Multisite page because its not needed there. Fixes: https://tracker.ceph.com/issues/61230 Signed-off-by: Nizamudeen A (cherry picked from commit 075fce3cf8f8bc5150abd4684bc87e56e993da5e) --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/context/context.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/context/context.component.ts index 8de611307a71..e036b754438b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/context/context.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/context/context.component.ts @@ -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(