]> 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:10:33 +0000 (10:10 -0500)
Fixes: https://tracker.ceph.com/issues/50684
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit b6f92922f5c80223fd288d98ce85405a650c0135)
(cherry picked from commit 6b9c8ca076ef63df64ee12f89132ed2f46c4b739)

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

index cbe447bbb5455007a484521c3b8d4a19fb8d9ab9..2f59a0175ac730999db86feedd7beb744c947442 100644 (file)
@@ -1,4 +1,3 @@
-import { APP_BASE_HREF } from '@angular/common';
 import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
 import { ErrorHandler, NgModule } from '@angular/core';
 import { BrowserModule } from '@angular/platform-browser';
@@ -40,10 +39,6 @@ import { SharedModule } from './shared/shared.module';
       provide: HTTP_INTERCEPTORS,
       useClass: ApiInterceptorService,
       multi: true
-    },
-    {
-      provide: APP_BASE_HREF,
-      useValue: window['base-href']
     }
   ],
   bootstrap: [AppComponent]
index 523fce3fc2be31abe1cef6c7b436bb632cb48b23..bfd6d3ecd83731e1dd316c07d008740c1ca125f9 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">