From: bryanmontalvan <68972382+bryanmontalvan@users.noreply.github.com> Date: Fri, 22 Jul 2022 18:44:43 +0000 (-0400) Subject: Moved router.url logic inside html template X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=21e016c6ca398efef0395a0eb7b7f6a4e1f1ac19;p=ceph.git Moved router.url logic inside html template This commit removes the `this.router.url` logic which was located in the `workbench-layout.component.ts` file and moved it into the HTML template section. Signed-off-by: bryanmontalvan --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html index 3979ad7a4a9..d8c1891fc21 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html @@ -1,8 +1,8 @@
- + [ngClass]="{'dashboard': (router.url == '/dashboard' || router.url == '/dashboard_3')}"> +
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.ts index 3840cbe3561..afc7a83bb27 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.ts @@ -17,7 +17,7 @@ export class WorkbenchLayoutComponent implements OnInit, OnDestroy { private subs = new Subscription(); constructor( - private router: Router, + public router: Router, private summaryService: SummaryService, private taskManagerService: TaskManagerService, private faviconService: FaviconService @@ -32,8 +32,4 @@ export class WorkbenchLayoutComponent implements OnInit, OnDestroy { ngOnDestroy() { this.subs.unsubscribe(); } - - isDashboardPage() { - return this.router.url === '/dashboard' || this.router.url === '/dashboard_3'; - } }