From: Avan Thakkar Date: Tue, 9 Feb 2021 08:01:59 +0000 (+0530) Subject: mgr/dashboard: avoid using document.write() X-Git-Tag: v15.2.10~28^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F39527%2Fhead;p=ceph.git mgr/dashboard: avoid using document.write() Fixes: https://tracker.ceph.com/issues/49220 Signed-off-by: Avan Thakkar (cherry picked from commit 36efe519b90b7508fb830f2c250e8b6956eaaf05) Conflicts: src/pybind/mgr/dashboard/frontend/src/app/app.module.ts - Adopting the master branch changes. --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/app.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/app.module.ts index 1f8e9bf5b16..b4b902aa0b2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/app.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/app.module.ts @@ -1,3 +1,4 @@ +import { APP_BASE_HREF } from '@angular/common'; import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { ErrorHandler, @@ -58,6 +59,10 @@ import { environment } from '../environments/environment'; useClass: ApiInterceptorService, multi: true }, + { + provide: APP_BASE_HREF, + useValue: window['base-href'] + }, { provide: TRANSLATIONS, useFactory: (locale: string) => { diff --git a/src/pybind/mgr/dashboard/frontend/src/index.html b/src/pybind/mgr/dashboard/frontend/src/index.html index f314e2c53a8..150e67eebcb 100644 --- a/src/pybind/mgr/dashboard/frontend/src/index.html +++ b/src/pybind/mgr/dashboard/frontend/src/index.html @@ -3,9 +3,10 @@ Ceph +