]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix base-href: revert it to previous approach 41252/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:47:30 +0000 (15:17 +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.

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

index b4b902aa0b258a33cc2e8f42c35a3024ae9403fc..1f8e9bf5b16209d34d9157fd0f90afc118dbfca1 100644 (file)
@@ -1,4 +1,3 @@
-import { APP_BASE_HREF } from '@angular/common';
 import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
 import {
   ErrorHandler,
@@ -59,10 +58,6 @@ import { environment } from '../environments/environment';
       useClass: ApiInterceptorService,
       multi: true
     },
-    {
-      provide: APP_BASE_HREF,
-      useValue: window['base-href']
-    },
     {
       provide: TRANSLATIONS,
       useFactory: (locale: string) => {
index 150e67eebcb65e33ee47fa5280dcf82c0f13cea7..f314e2c53a8f5e0fa991df7576f5f7fb69283105 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, shrink-to-fit=no">