Browse Source

Merge pull request #14962 from abpframework/auto-merge/rel-7-0/1534

Merge branch dev with rel-7.0
pull/14995/head
Enis Necipoglu 4 years ago
committed by GitHub
parent
commit
429fe6c427
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      docs/en/Application-Startup.md
  2. 2
      docs/en/Audit-Logging.md
  3. 35
      docs/en/Deployment/Distributed-Microservice.md
  4. 1
      docs/en/Deployment/Index.md
  5. 72
      docs/en/docs-nav.json
  6. 7
      npm/ng-packs/packages/core/src/lib/services/session-state.service.ts
  7. 29
      npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts

3
docs/en/Application-Startup.md

@ -0,0 +1,3 @@
## ABP Application Startup
TODO

2
docs/en/Audit-Logging.md

@ -42,7 +42,7 @@ Here, a list of the options you can configure:
* `AlwaysLogOnException` (default: `true`): If you set to true, it always saves the audit log on an exception/error case without checking other options (except `IsEnabled`, which completely disables the audit logging).
* `IsEnabledForGetRequests` (default: `false`): HTTP GET requests should not make any change in the database normally and audit log system doesn't save audit log objects for GET request. Set this to `true` to enable it also for the GET requests.
* `DisableLogActionInfo` (default: `false`):If you set to true, Will no longer log `AuditLogActionInfo`.
* `ApplicationName`: If multiple applications saving audit logs into a single database, set this property to your application name, so you can distinguish the logs of different applications.
* `ApplicationName`: If multiple applications saving audit logs into a single database, set this property to your application name, so you can distinguish the logs of different applications. If you don't set, it is set from the `IApplicationInfoAccessor.ApplicationName` value, which is the entry assembly name by default.
* `IgnoredTypes`: A list of `Type`s to be ignored for audit logging. If this is an entity type, changes for this type of entities will not be saved. This list is also used while serializing the action parameters.
* `EntityHistorySelectors`: A list of selectors those are used to determine if an entity type is selected for saving the entity change. See the section below for details.
* `Contributors`: A list of `AuditLogContributor` implementations. A contributor is a way of extending the audit log system. See the "Audit Log Contributors" section below.

35
docs/en/Deployment/Distributed-Microservice.md

@ -0,0 +1,35 @@
# Deploying Distributed / Microservice Solutions
The ABP Framework is designed to consider distributed and microservice systems, where you have multiple applications and/or services communicating internally. All of its features are compatible with distributed scenarios. This document highlights some points you should care when you deploy your distributed or microservice solution.
## Application Name & Instance Id
ABP provides `IApplicationInfoAccessor` service that provides the following properties:
* `ApplicationName`: A human-readable name for an application. It is a unique value for an application.
* `InstanceId`: A random (GUID) value generated by the ABP Framework each time you start the application.
These values are used by the ABP Framework for several places to distinguish the application and the application instance (process) in the system. For example, [audit logging](../Audit-Logging.md) system saves the `ApplicationName` in each audit log record written by the related application, so you can understand which application has created the audit log entry. So, if your system consists of multiple applications saving audit logs to a single point, you should be sure that each application has a different `ApplicationName`.
The `ApplicationName` property's value is set automatically from the **entry assembly's name** (generally, the project name in a .NET solution) by default, which is proper for most cases, since each application typically has a unique entry assembly name.
There are two ways to set the application name to a different value. In this first approach, you can set the `ApplicationName` property in your application's [configuration](../Configuration.md). The easiest way is to add an `ApplicationName` field to your `appsettings.json` file:
````json
{
"ApplicationName": "Services.Ordering"
}
````
Alternatively, you can set `AbpApplicationCreationOptions.ApplicationName` while creating the ABP application. You can find the `AddApplication` or `AddApplicationAsync` call in your solution (typically in the `Program.cs` file), and set the `ApplicationName` option as shown below:
````csharp
await builder.AddApplicationAsync<OrderingServiceHttpApiHostModule>(options =>
{
options.ApplicationName = "Services.Ordering";
});
````
s

1
docs/en/Deployment/Index.md

@ -9,3 +9,4 @@ However, there are some topics that you should care about when you are deploying
* [Configuring for Production](Configuring-Production.md): Notes for some essential configurations for production environments.
* [Optimization for Production](Optimizing-Production.md): Tips and suggestions for optimizing your application on production environments.
* [Deploying to a Clustered Environment](Clustered-Environment.md): Explains how to configure your application when you want to run multiple instances of your application concurrently.
* [Deploying Distributed / Microservice Solutions](Distributed-Microservice.md): Deployment notes for solutions consisting of multiple applications and/or services.

72
docs/en/docs-nav.json

@ -154,48 +154,38 @@
"text": "Fundamentals",
"items": [
{
"text": "Dependency Injection",
"path": "Dependency-Injection.md",
"items": [
{
"text": "AutoFac Integration",
"path": "Autofac-Integration.md"
}
]
},
{
"text": "Configuration",
"path": "Configuration.md"
},
{
"text": "Options",
"path": "Options.md"
"text": "Application Startup",
"path": "Application-Startup.md"
},
{
"text": "Authorization",
"path": "Authorization.md"
},
{
"text": "Validation",
"path": "Validation.md",
"text": "Caching",
"path": "Caching.md",
"items": [
{
"text": "FluentValidation Integration",
"path": "FluentValidation.md"
"text": "Redis Cache",
"path": "Redis-Cache.md"
}
]
},
{
"text": "Localization",
"path": "Localization.md"
"text": "Configuration",
"path": "Configuration.md"
},
{
"text": "Caching",
"path": "Caching.md",
"text": "Connection Strings",
"path": "Connection-Strings.md"
},
{
"text": "Dependency Injection",
"path": "Dependency-Injection.md",
"items": [
{
"text": "Redis Cache",
"path": "Redis-Cache.md"
"text": "AutoFac Integration",
"path": "Autofac-Integration.md"
}
]
},
@ -204,20 +194,34 @@
"path": "Exception-Handling.md"
},
{
"text": "Settings",
"path": "Settings.md"
"text": "Localization",
"path": "Localization.md"
},
{
"text": "Connection Strings",
"path": "Connection-Strings.md"
"text": "Logging",
"path": "Logging.md"
},
{
"text": "Object Extensions",
"path": "Object-Extensions.md"
},
{
"text": "Logging",
"path": "Logging.md"
"text": "Options",
"path": "Options.md"
},
{
"text": "Settings",
"path": "Settings.md"
},
{
"text": "Validation",
"path": "Validation.md",
"items": [
{
"text": "FluentValidation Integration",
"path": "FluentValidation.md"
}
]
}
]
},
@ -1311,6 +1315,10 @@
"text": "Deploying to a Clustered Environment",
"path": "Deployment/Clustered-Environment.md"
},
{
"text": "Distributed / Microservice Solutions",
"path": "Distributed-Microservice.md"
},
{
"text": "Optimizing for Production",
"path": "Deployment/Optimizing-Production.md"

7
npm/ng-packs/packages/core/src/lib/services/session-state.service.ts

@ -31,7 +31,7 @@ export class SessionStateService {
}
private setInitialLanguage() {
if (this.getLanguage()) return;
const appLanguage = this.getLanguage();
this.configState
.getDeep$('localization.currentCulture.cultureName')
@ -43,8 +43,9 @@ export class SessionStateService {
if (lang.includes(';')) {
lang = lang.split(';')[0];
}
this.setLanguage(lang);
if (appLanguage !== lang) {
this.setLanguage(lang);
}
});
}

29
npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts

@ -164,25 +164,16 @@ export class PermissionManagementComponent
return;
setTimeout(() => {
this.permissions = this.permissions
.map(per => {
if (clickedPermission.name === per.name) {
return { ...per, isGranted: !per.isGranted };
} else if (clickedPermission.name === per.parentName && clickedPermission.isGranted) {
return { ...per, isGranted: false };
} else if (clickedPermission.parentName === per.name && !clickedPermission.isGranted) {
return { ...per, isGranted: true };
}
return per;
})
.map((per, index, permissions) => {
const childrens = permissions.filter(p => p.parentName === per.name);
if (childrens.length > 0 && childrens.every(x => !x.isGranted)) {
return { ...per, isGranted: false };
}
return per;
});
this.permissions = this.permissions.map(per => {
if (clickedPermission.name === per.name) {
return { ...per, isGranted: !per.isGranted };
} else if (clickedPermission.name === per.parentName && clickedPermission.isGranted) {
return { ...per, isGranted: false };
} else if (clickedPermission.parentName === per.name && !clickedPermission.isGranted) {
return { ...per, isGranted: true };
}
return per;
});
this.setTabCheckboxState();
this.setGrantCheckboxState();
}, 0);

Loading…
Cancel
Save