]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix base-href: revert it to previous approach
authorAvan Thakkar <athakkar@redhat.com>
Fri, 7 May 2021 09:38:11 +0000 (15:08 +0530)
committerSage Weil <sage@newdream.net>
Thu, 13 May 2021 15:15:18 +0000 (11:15 -0400)
Fixes: https://tracker.ceph.com/issues/50684
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit b6f92922f5c80223fd288d98ce85405a650c0135)

 Conflicts:

src/pybind/mgr/dashboard/frontend/src/app/app.module.ts
      - Adopt the changes coming from master for this file.

(cherry picked from commit 3802683035532bc15d95e16232e69e0fa96c474f)

src/pybind/mgr/dashboard/frontend/src/app/app.module.ts
src/pybind/mgr/dashboard/frontend/src/index.html

index 55211e01839437388c1230e88a030dc048ea9bb0..7b63f06b7bd1c7029e958ff65879a79000af40fd 100644 (file)
@@ -1,4 +1,3 @@
-import { APP_BASE_HREF } from '@angular/common';
 import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
 import {
   ErrorHandler,
@@ -58,10 +57,6 @@ import { environment } from '../environments/environment';
       useClass: ApiInterceptorService,
       multi: true
     },
-    {
-      provide: APP_BASE_HREF,
-      useValue: window['base-href']
-    },
     {
       provide: TRANSLATIONS,
       useFactory: (locale) => {
index 8d5196e35e6c766add141ea784e44bb8465d88be..05a8f70911674c969fd215efb2964bd94b8ef53f 100644 (file)
@@ -3,10 +3,9 @@
 <head>
   <meta charset="utf-8">
   <title>Ceph</title>
-  <base href="/">
 
   <script>
-    window['base-href'] = window.location.pathname;
+    document.write('<base href="' + document.location+ '" />');
   </script>
 
   <meta name="viewport" content="width=device-width, initial-scale=1">