SUPPORT-8956: fixes
This commit is contained in:
parent
f6d93ccf5b
commit
708679b729
7 changed files with 19 additions and 10 deletions
|
|
@ -31,7 +31,7 @@ export function bootstrapMfeApp(createApp: () => Promise<NgModuleRef<unknown> |
|
|||
params?: any
|
||||
} = {
|
||||
standalone: false,
|
||||
startUrl: '/mfe/business-metrics'
|
||||
startUrl: '/mfe/account-applications'
|
||||
},
|
||||
) {
|
||||
let containerBaseUrl = settings.containerBaseUrl || ''; // префикс ресурса
|
||||
|
|
@ -47,7 +47,7 @@ export function bootstrapMfeApp(createApp: () => Promise<NgModuleRef<unknown> |
|
|||
parentEventHandler(eventType: ParentEventType, url: string) {
|
||||
},
|
||||
unmount() {
|
||||
console.log("Unmounting business-metrics application");
|
||||
console.log("Unmounting account-applications application");
|
||||
platformBrowserDynamic().destroy();
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import {
|
|||
} from "@webbpm/base-package";
|
||||
import {AppHeaderComponent} from "./component/app-header.component";
|
||||
import {AppFooterComponent} from "./component/app-footer.component";
|
||||
import {AccessDeniedComponent} from "./component/access-denied.component";
|
||||
import {ApplicationVersionComponent} from "./component/application-version.component";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {InternationalPhoneNumberModule} from "ngx-international-phone-number";
|
||||
|
|
@ -28,7 +27,6 @@ export const DIRECTIVES = [
|
|||
forwardRef(() => AppHeaderComponent),
|
||||
forwardRef(() => AppFooterComponent),
|
||||
forwardRef(() => ApplicationVersionComponent),
|
||||
forwardRef(() => AccessDeniedComponent),
|
||||
forwardRef(() => AppProgressIndicationComponent),
|
||||
forwardRef(() => VBoxLoadValues),
|
||||
forwardRef(() => ErvuAccountTextFieldGridEditor)
|
||||
|
|
@ -55,7 +53,7 @@ export const DIRECTIVES = [
|
|||
],
|
||||
providers: [
|
||||
TokenInterceptor,
|
||||
{ provide: ProgressIndicationService, useClass: AppProgressIndicationService }
|
||||
{provide: ProgressIndicationService, useClass: AppProgressIndicationService }
|
||||
],
|
||||
bootstrap: [],
|
||||
entryComponents: [AppProgressIndicationComponent]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from "@angular/common/http";
|
||||
import {from, Observable} from "rxjs";
|
||||
import {TokenProvider} from "../provider/token.provider";
|
||||
import {Injectable} from "@angular/core";
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class TokenInterceptor implements HttpInterceptor{
|
||||
constructor(protected tokenProvider: TokenProvider) { }
|
||||
|
||||
|
|
@ -12,7 +14,7 @@ export class TokenInterceptor implements HttpInterceptor{
|
|||
private async handle(request: HttpRequest<any>, next: HttpHandler): Promise<HttpEvent<any>> {
|
||||
const token = await this.tokenProvider.getToken();
|
||||
request = request.clone({
|
||||
setHeaders: { Authorization: `Bearer ${token}` }
|
||||
setHeaders: {Authorization: `Bearer ${token}`}
|
||||
});
|
||||
return next.handle(request).toPromise();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
import {HTTP_INTERCEPTORS} from "@angular/common/http";
|
||||
import {
|
||||
FormDirtyInterceptor,
|
||||
HttpSecurityErrorInterceptor
|
||||
} from "@webbpm/base-package";
|
||||
import {MfeHttpBackendInterceptor} from "./mfe-http-backend-interceptor";
|
||||
import {FormDirtyInterceptor, HttpSecurityErrorInterceptor} from "@webbpm/base-package";
|
||||
import {TokenInterceptor} from "../../app/interceptor/token.interceptor.service";
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const webbpmRoutes: Routes = [
|
|||
},
|
||||
{
|
||||
path: '',
|
||||
loadChildren: 'generated-sources/page-conversion.module#PageconversionModule',
|
||||
loadChildren: 'generated-sources/page-home.module#PagehomeModule',
|
||||
canActivate: [ConfirmExitGuard, RolesGuard],
|
||||
pathMatch: 'full',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,7 +8,12 @@ import {PreviewContainerComponent} from "./component/preview-container.component
|
|||
import {NgbModule} from "@ng-bootstrap/ng-bootstrap";
|
||||
import {ToastNoAnimationModule} from "ngx-toastr";
|
||||
import {AppModule} from "../app/app.module";
|
||||
import {ComponentsModule, CoreModule, SecurityModule} from "@webbpm/base-package";
|
||||
import {
|
||||
ComponentsModule,
|
||||
CoreModule,
|
||||
SecurityModule,
|
||||
TaskParamsProvider
|
||||
} from "@webbpm/base-package";
|
||||
import {HTTP_INTERCEPTORS} from "@angular/common/http";
|
||||
import {HttpPreviewInterceptor} from "./service/http-preview-interceptor.service";
|
||||
|
||||
|
|
@ -37,6 +42,7 @@ let IMPORTS = [
|
|||
],
|
||||
exports: [],
|
||||
providers: [
|
||||
TaskParamsProvider,
|
||||
HTTP_INTERCEPTOR_PROVIDERS
|
||||
],
|
||||
bootstrap: [
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ module.exports = {
|
|||
Popper: ['popper.js', 'default']
|
||||
}),
|
||||
new ModuleFederationPlugin({
|
||||
name: 'account-applications',
|
||||
name: 'account_applications',
|
||||
filename: 'remoteEntry.js',
|
||||
exposes: {
|
||||
"./account-applications": "./build/scripts/mfe-main.aot",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue