SUPPORT-8956: fixes

This commit is contained in:
adel.kalimullin 2025-02-26 19:12:29 +03:00
parent f6d93ccf5b
commit 708679b729
7 changed files with 19 additions and 10 deletions

View file

@ -31,7 +31,7 @@ export function bootstrapMfeApp(createApp: () => Promise<NgModuleRef<unknown> |
params?: any params?: any
} = { } = {
standalone: false, standalone: false,
startUrl: '/mfe/business-metrics' startUrl: '/mfe/account-applications'
}, },
) { ) {
let containerBaseUrl = settings.containerBaseUrl || ''; // префикс ресурса let containerBaseUrl = settings.containerBaseUrl || ''; // префикс ресурса
@ -47,7 +47,7 @@ export function bootstrapMfeApp(createApp: () => Promise<NgModuleRef<unknown> |
parentEventHandler(eventType: ParentEventType, url: string) { parentEventHandler(eventType: ParentEventType, url: string) {
}, },
unmount() { unmount() {
console.log("Unmounting business-metrics application"); console.log("Unmounting account-applications application");
platformBrowserDynamic().destroy(); platformBrowserDynamic().destroy();
}, },
} }

View file

@ -13,7 +13,6 @@ import {
} from "@webbpm/base-package"; } from "@webbpm/base-package";
import {AppHeaderComponent} from "./component/app-header.component"; import {AppHeaderComponent} from "./component/app-header.component";
import {AppFooterComponent} from "./component/app-footer.component"; import {AppFooterComponent} from "./component/app-footer.component";
import {AccessDeniedComponent} from "./component/access-denied.component";
import {ApplicationVersionComponent} from "./component/application-version.component"; import {ApplicationVersionComponent} from "./component/application-version.component";
import {RouterModule} from "@angular/router"; import {RouterModule} from "@angular/router";
import {InternationalPhoneNumberModule} from "ngx-international-phone-number"; import {InternationalPhoneNumberModule} from "ngx-international-phone-number";
@ -28,7 +27,6 @@ export const DIRECTIVES = [
forwardRef(() => AppHeaderComponent), forwardRef(() => AppHeaderComponent),
forwardRef(() => AppFooterComponent), forwardRef(() => AppFooterComponent),
forwardRef(() => ApplicationVersionComponent), forwardRef(() => ApplicationVersionComponent),
forwardRef(() => AccessDeniedComponent),
forwardRef(() => AppProgressIndicationComponent), forwardRef(() => AppProgressIndicationComponent),
forwardRef(() => VBoxLoadValues), forwardRef(() => VBoxLoadValues),
forwardRef(() => ErvuAccountTextFieldGridEditor) forwardRef(() => ErvuAccountTextFieldGridEditor)
@ -55,7 +53,7 @@ export const DIRECTIVES = [
], ],
providers: [ providers: [
TokenInterceptor, TokenInterceptor,
{ provide: ProgressIndicationService, useClass: AppProgressIndicationService } {provide: ProgressIndicationService, useClass: AppProgressIndicationService }
], ],
bootstrap: [], bootstrap: [],
entryComponents: [AppProgressIndicationComponent] entryComponents: [AppProgressIndicationComponent]

View file

@ -1,7 +1,9 @@
import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from "@angular/common/http"; import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from "@angular/common/http";
import {from, Observable} from "rxjs"; import {from, Observable} from "rxjs";
import {TokenProvider} from "../provider/token.provider"; import {TokenProvider} from "../provider/token.provider";
import {Injectable} from "@angular/core";
@Injectable({providedIn: 'root'})
export class TokenInterceptor implements HttpInterceptor{ export class TokenInterceptor implements HttpInterceptor{
constructor(protected tokenProvider: TokenProvider) { } constructor(protected tokenProvider: TokenProvider) { }
@ -12,7 +14,7 @@ export class TokenInterceptor implements HttpInterceptor{
private async handle(request: HttpRequest<any>, next: HttpHandler): Promise<HttpEvent<any>> { private async handle(request: HttpRequest<any>, next: HttpHandler): Promise<HttpEvent<any>> {
const token = await this.tokenProvider.getToken(); const token = await this.tokenProvider.getToken();
request = request.clone({ request = request.clone({
setHeaders: { Authorization: `Bearer ${token}` } setHeaders: {Authorization: `Bearer ${token}`}
}); });
return next.handle(request).toPromise(); return next.handle(request).toPromise();
} }

View file

@ -1,6 +1,9 @@
import {HTTP_INTERCEPTORS} from "@angular/common/http"; import {HTTP_INTERCEPTORS} from "@angular/common/http";
import {
FormDirtyInterceptor,
HttpSecurityErrorInterceptor
} from "@webbpm/base-package";
import {MfeHttpBackendInterceptor} from "./mfe-http-backend-interceptor"; import {MfeHttpBackendInterceptor} from "./mfe-http-backend-interceptor";
import {FormDirtyInterceptor, HttpSecurityErrorInterceptor} from "@webbpm/base-package";
import {TokenInterceptor} from "../../app/interceptor/token.interceptor.service"; import {TokenInterceptor} from "../../app/interceptor/token.interceptor.service";

View file

@ -13,7 +13,7 @@ const webbpmRoutes: Routes = [
}, },
{ {
path: '', path: '',
loadChildren: 'generated-sources/page-conversion.module#PageconversionModule', loadChildren: 'generated-sources/page-home.module#PagehomeModule',
canActivate: [ConfirmExitGuard, RolesGuard], canActivate: [ConfirmExitGuard, RolesGuard],
pathMatch: 'full', pathMatch: 'full',
}, },

View file

@ -8,7 +8,12 @@ import {PreviewContainerComponent} from "./component/preview-container.component
import {NgbModule} from "@ng-bootstrap/ng-bootstrap"; import {NgbModule} from "@ng-bootstrap/ng-bootstrap";
import {ToastNoAnimationModule} from "ngx-toastr"; import {ToastNoAnimationModule} from "ngx-toastr";
import {AppModule} from "../app/app.module"; 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 {HTTP_INTERCEPTORS} from "@angular/common/http";
import {HttpPreviewInterceptor} from "./service/http-preview-interceptor.service"; import {HttpPreviewInterceptor} from "./service/http-preview-interceptor.service";
@ -37,6 +42,7 @@ let IMPORTS = [
], ],
exports: [], exports: [],
providers: [ providers: [
TaskParamsProvider,
HTTP_INTERCEPTOR_PROVIDERS HTTP_INTERCEPTOR_PROVIDERS
], ],
bootstrap: [ bootstrap: [

View file

@ -129,7 +129,7 @@ module.exports = {
Popper: ['popper.js', 'default'] Popper: ['popper.js', 'default']
}), }),
new ModuleFederationPlugin({ new ModuleFederationPlugin({
name: 'account-applications', name: 'account_applications',
filename: 'remoteEntry.js', filename: 'remoteEntry.js',
exposes: { exposes: {
"./account-applications": "./build/scripts/mfe-main.aot", "./account-applications": "./build/scripts/mfe-main.aot",