]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix base-href: revert it to previous approach 41218/head
authorAvan Thakkar <athakkar@redhat.com>
Fri, 7 May 2021 09:38:11 +0000 (15:08 +0530)
committerAvan Thakkar <athakkar@redhat.com>
Fri, 7 May 2021 09:38:11 +0000 (15:08 +0530)
Fixes: https://tracker.ceph.com/issues/50684
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
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">