]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix base-href: revert it to previous approach 41253/head
authorAvan Thakkar <athakkar@redhat.com>
Fri, 7 May 2021 09:38:11 +0000 (15:08 +0530)
committerAvan Thakkar <athakkar@redhat.com>
Mon, 10 May 2021 09:41:33 +0000 (15:11 +0530)
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.

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">