From: Avan Thakkar Date: Tue, 9 Feb 2021 08:01:59 +0000 (+0530) Subject: mgr/dashboard: avoid using document.write() X-Git-Tag: v14.2.17~7^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8a7cc9da2af63cfb21439c37273bb7b6a1be23b5;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 - Adopt 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 7b63f06b7bd1c..55211e0183943 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 { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http'; import { ErrorHandler, @@ -57,6 +58,10 @@ import { environment } from '../environments/environment'; useClass: ApiInterceptorService, multi: true }, + { + provide: APP_BASE_HREF, + useValue: window['base-href'] + }, { provide: TRANSLATIONS, useFactory: (locale) => { diff --git a/src/pybind/mgr/dashboard/frontend/src/index.html b/src/pybind/mgr/dashboard/frontend/src/index.html index 05a8f70911674..8d5196e35e6c7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/index.html +++ b/src/pybind/mgr/dashboard/frontend/src/index.html @@ -3,9 +3,10 @@ Ceph +