Merge pull request #16024 from abpframework/auto-merge/rel-7-1/1814

Merge branch dev with rel-7.1
pull/16032/head
Enis Necipoglu 3 years ago committed by GitHub
commit 47308dfe98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,7 +6,7 @@ The following figure shows a few microservices behind an API Gateway that is con
![integration-services](images/integration-services.png)
HTTP requests coming from out of the API Gateway can be called as *external request*, while the HTTP requests performed between microservices can be considered as *internal requests*. The application services that are designed to respond to these external requests are called as *integration services*, because their purpose is to integrate microservices in the system, rather than respond to user requests.
HTTP requests coming from out of the API Gateway can be called as *external request*, while the HTTP requests performed between microservices can be considered as *internal requests*. The application services that are designed to respond to these internal requests are called as *integration services*, because their purpose is to integrate microservices in the system, rather than respond to user requests.
## Marking an Application Service as Integration Service
@ -77,4 +77,4 @@ Tip: You can call the `options.ConventionalControllers.Create` multiple times to
* [Application Services](Application-Services.md)
* [Auto API Controllers](API/Auto-API-Controllers.md)
* [Audit Logging](Audit-Logging.md)
* [Audit Logging](Audit-Logging.md)

@ -1,4 +1,4 @@
import { Inject, Injectable } from '@angular/core';
import { inject, Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { map, switchMap, take, tap } from 'rxjs/operators';
import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service';
@ -15,6 +15,9 @@ import { InternalStore } from '../utils/internal-store-utils';
})
export class ConfigStateService {
private readonly store = new InternalStore({} as ApplicationConfigurationDto);
private readonly includeLocalizationResources = inject(INCUDE_LOCALIZATION_RESOURCES_TOKEN);
private abpConfigService = inject(AbpApplicationConfigurationService);
private abpApplicationLocalizationService = inject(AbpApplicationLocalizationService);
get createOnUpdateStream() {
return this.store.sliceUpdate;
@ -22,12 +25,7 @@ export class ConfigStateService {
private updateSubject = new Subject<void>();
constructor(
private abpConfigService: AbpApplicationConfigurationService,
private abpApplicationLocalizationService: AbpApplicationLocalizationService,
@Inject(INCUDE_LOCALIZATION_RESOURCES_TOKEN)
private readonly includeLocalizationResources: boolean,
) {
constructor() {
this.initUpdateStream();
}
@ -61,6 +59,7 @@ export class ConfigStateService {
onlyDynamics: false,
});
}
refreshAppState() {
this.updateSubject.next();
return this.createOnUpdateStream(state => state).pipe(take(1));
@ -141,7 +140,7 @@ export class ConfigStateService {
return keys.reduce((acc, key) => ({ ...acc, [key]: features.values[key] }), {});
}
getFeatures$(keys: string[]): Observable<{[key: string]: string} | undefined> {
getFeatures$(keys: string[]): Observable<{ [key: string]: string } | undefined> {
return this.store.sliceState(({ features }) => {
if (!features?.values) return;

@ -7,6 +7,7 @@ import {
LOADER_DELAY,
PermissionService,
RestService,
INCUDE_LOCALIZATION_RESOURCES_TOKEN,
} from '@abp/ng.core';
import { APP_BASE_HREF } from '@angular/common';
import { ModuleWithProviders, NgModule } from '@angular/core';
@ -60,6 +61,10 @@ export class CoreTestingModule {
provide: LOADER_DELAY,
useValue: 0,
},
{
provide: INCUDE_LOCALIZATION_RESOURCES_TOKEN,
useValue: false,
},
provideRoutes(routes),
],
};

@ -1,7 +1,7 @@
import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest';
import { OAuthService } from 'angular-oauth2-oidc';
import { AbpOAuthGuard } from '../guards/oauth.guard';
import { AuthService } from '@Abp/ng.core';
import { AuthService } from '@abp/ng.core';
describe('AuthGuard', () => {
let spectator: SpectatorService<AbpOAuthGuard>;

Loading…
Cancel
Save