@volo/abp.ng.audit-logging 7.2.1 → 7.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/enums/index.d.ts +1 -1
- package/common/enums/route-names.d.ts +3 -3
- package/common/index.d.ts +5 -5
- package/common/public-api.d.ts +2 -2
- package/common/tokens/features.token.d.ts +12 -12
- package/common/tokens/index.d.ts +1 -1
- package/config/audit-logging-config.module.d.ts +12 -12
- package/config/components/entity-change-details.component.d.ts +19 -19
- package/config/components/entity-change-modal.component.d.ts +15 -15
- package/config/components/index.d.ts +2 -2
- package/config/enums/index.d.ts +2 -2
- package/config/enums/policy-names.d.ts +3 -3
- package/config/enums/route-names.d.ts +2 -2
- package/config/index.d.ts +5 -5
- package/config/providers/entity-details.provider.d.ts +7 -7
- package/config/providers/entity-history.provider.d.ts +7 -7
- package/config/providers/index.d.ts +3 -3
- package/config/providers/route.provider.d.ts +8 -8
- package/config/public-api.d.ts +5 -5
- package/config/services/entity-change-modal.service.d.ts +15 -15
- package/config/services/index.d.ts +1 -1
- package/{esm2020 → esm2022}/common/enums/index.mjs +1 -1
- package/{esm2020 → esm2022}/common/enums/route-names.mjs +1 -1
- package/{esm2020 → esm2022}/common/public-api.mjs +2 -2
- package/{esm2020 → esm2022}/common/tokens/features.token.mjs +30 -30
- package/{esm2020 → esm2022}/common/tokens/index.mjs +1 -1
- package/{esm2020 → esm2022}/common/volo-abp.ng.audit-logging-common.mjs +4 -4
- package/esm2022/config/audit-logging-config.module.mjs +35 -0
- package/esm2022/config/components/entity-change-details.component.mjs +46 -0
- package/esm2022/config/components/entity-change-modal.component.mjs +23 -0
- package/{esm2020 → esm2022}/config/components/index.mjs +2 -2
- package/{esm2020 → esm2022}/config/enums/index.mjs +2 -2
- package/{esm2020 → esm2022}/config/enums/policy-names.mjs +1 -1
- package/{esm2020 → esm2022}/config/enums/route-names.mjs +1 -1
- package/{esm2020 → esm2022}/config/providers/entity-details.provider.mjs +12 -12
- package/{esm2020 → esm2022}/config/providers/entity-history.provider.mjs +12 -12
- package/{esm2020 → esm2022}/config/providers/index.mjs +3 -3
- package/{esm2020 → esm2022}/config/providers/route.provider.mjs +20 -20
- package/{esm2020 → esm2022}/config/public-api.mjs +5 -5
- package/esm2022/config/services/entity-change-modal.service.mjs +52 -0
- package/{esm2020 → esm2022}/config/services/index.mjs +1 -1
- package/{esm2020 → esm2022}/config/volo-abp.ng.audit-logging-config.mjs +4 -4
- package/esm2022/lib/audit-logging-routing.module.mjs +42 -0
- package/esm2022/lib/audit-logging.module.mjs +98 -0
- package/esm2022/lib/components/audit-log-datetime-picker/audit-log-datetime-picker.component.mjs +63 -0
- package/esm2022/lib/components/audit-logs/audit-logs.component.mjs +115 -0
- package/esm2022/lib/components/entity-change/entity-changes.component.mjs +82 -0
- package/{esm2020 → esm2022}/lib/components/index.mjs +4 -4
- package/esm2022/lib/components/widgets/average-execution-duration-widget.component.mjs +116 -0
- package/esm2022/lib/components/widgets/error-rate-widget.component.mjs +117 -0
- package/{esm2020 → esm2022}/lib/constants/http.mjs +63 -63
- package/{esm2020 → esm2022}/lib/constants/index.mjs +1 -1
- package/{esm2020 → esm2022}/lib/defaults/default-audit-logs-entity-actions.mjs +12 -12
- package/{esm2020 → esm2022}/lib/defaults/default-audit-logs-entity-props.mjs +56 -56
- package/{esm2020 → esm2022}/lib/defaults/default-audit-logs-toolbar-actions.mjs +2 -2
- package/{esm2020 → esm2022}/lib/defaults/default-entity-changes-entity-actions.mjs +21 -21
- package/{esm2020 → esm2022}/lib/enums/components.mjs +1 -1
- package/{esm2020 → esm2022}/lib/enums/entity-change.mjs +6 -6
- package/{esm2020 → esm2022}/lib/enums/index.mjs +2 -2
- package/esm2022/lib/guards/audit-logging.guard.mjs +24 -0
- package/esm2022/lib/guards/extensions.guard.mjs +32 -0
- package/{esm2020 → esm2022}/lib/guards/index.mjs +2 -2
- package/{esm2020 → esm2022}/lib/models/audit-logging.mjs +1 -1
- package/{esm2020 → esm2022}/lib/models/config-options.mjs +1 -1
- package/{esm2020 → esm2022}/lib/models/index.mjs +2 -2
- package/{esm2020 → esm2022}/lib/tokens/entity-details.token.mjs +2 -2
- package/{esm2020 → esm2022}/lib/tokens/extensions.token.mjs +18 -18
- package/{esm2020 → esm2022}/lib/tokens/index.mjs +2 -2
- package/{esm2020 → esm2022}/proxy/lib/index.mjs +2 -2
- package/esm2022/proxy/lib/proxy/audit-logging/audit-logs.service.mjs +57 -0
- package/{esm2020 → esm2022}/proxy/lib/proxy/audit-logging/index.mjs +2 -2
- package/{esm2020 → esm2022}/proxy/lib/proxy/audit-logging/models.mjs +1 -1
- package/{esm2020 → esm2022}/proxy/lib/proxy/auditing/entity-change-type.enum.mjs +8 -8
- package/{esm2020 → esm2022}/proxy/lib/proxy/auditing/index.mjs +1 -1
- package/{esm2020 → esm2022}/proxy/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/proxy/volo-abp.ng.audit-logging-proxy.mjs +4 -4
- package/{esm2020 → esm2022}/public-api.mjs +7 -7
- package/{esm2020 → esm2022}/volo-abp.ng.audit-logging.mjs +4 -4
- package/{fesm2015 → fesm2022}/volo-abp.ng.audit-logging-common.mjs +28 -28
- package/{fesm2020 → fesm2022}/volo-abp.ng.audit-logging-config.mjs +151 -151
- package/{fesm2020 → fesm2022}/volo-abp.ng.audit-logging-config.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/volo-abp.ng.audit-logging-proxy.mjs +60 -60
- package/{fesm2020 → fesm2022}/volo-abp.ng.audit-logging-proxy.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/volo-abp.ng.audit-logging.mjs +635 -635
- package/fesm2022/volo-abp.ng.audit-logging.mjs.map +1 -0
- package/index.d.ts +5 -5
- package/lib/audit-logging-routing.module.d.ts +7 -7
- package/lib/audit-logging.module.d.ts +22 -22
- package/lib/components/audit-log-datetime-picker/audit-log-datetime-picker.component.d.ts +19 -19
- package/lib/components/audit-logs/audit-logs.component.d.ts +32 -32
- package/lib/components/entity-change/entity-changes.component.d.ts +24 -24
- package/lib/components/index.d.ts +4 -4
- package/lib/components/widgets/average-execution-duration-widget.component.d.ts +25 -25
- package/lib/components/widgets/error-rate-widget.component.d.ts +24 -24
- package/lib/constants/http.d.ts +5 -5
- package/lib/constants/index.d.ts +1 -1
- package/lib/defaults/default-audit-logs-entity-actions.d.ts +3 -3
- package/lib/defaults/default-audit-logs-entity-props.d.ts +3 -3
- package/lib/defaults/default-audit-logs-toolbar-actions.d.ts +3 -3
- package/lib/defaults/default-entity-changes-entity-actions.d.ts +3 -3
- package/lib/enums/components.d.ts +4 -4
- package/lib/enums/entity-change.d.ts +5 -5
- package/lib/enums/index.d.ts +2 -2
- package/lib/guards/audit-logging.guard.d.ts +10 -11
- package/lib/guards/extensions.guard.d.ts +10 -11
- package/lib/guards/index.d.ts +2 -2
- package/lib/models/audit-logging.d.ts +9 -9
- package/lib/models/config-options.d.ts +18 -18
- package/lib/models/index.d.ts +2 -2
- package/lib/tokens/entity-details.token.d.ts +2 -2
- package/lib/tokens/extensions.token.d.ts +23 -23
- package/lib/tokens/index.d.ts +2 -2
- package/package.json +17 -29
- package/proxy/index.d.ts +5 -5
- package/proxy/lib/index.d.ts +2 -2
- package/proxy/lib/proxy/audit-logging/audit-logs.service.d.ts +19 -19
- package/proxy/lib/proxy/audit-logging/index.d.ts +2 -2
- package/proxy/lib/proxy/audit-logging/models.d.ts +93 -93
- package/proxy/lib/proxy/auditing/entity-change-type.enum.d.ts +6 -6
- package/proxy/lib/proxy/auditing/index.d.ts +1 -1
- package/proxy/public-api.d.ts +1 -1
- package/public-api.d.ts +7 -7
- package/esm2020/config/audit-logging-config.module.mjs +0 -34
- package/esm2020/config/components/entity-change-details.component.mjs +0 -45
- package/esm2020/config/components/entity-change-modal.component.mjs +0 -22
- package/esm2020/config/services/entity-change-modal.service.mjs +0 -51
- package/esm2020/lib/audit-logging-routing.module.mjs +0 -41
- package/esm2020/lib/audit-logging.module.mjs +0 -97
- package/esm2020/lib/components/audit-log-datetime-picker/audit-log-datetime-picker.component.mjs +0 -62
- package/esm2020/lib/components/audit-logs/audit-logs.component.mjs +0 -114
- package/esm2020/lib/components/entity-change/entity-changes.component.mjs +0 -81
- package/esm2020/lib/components/widgets/average-execution-duration-widget.component.mjs +0 -115
- package/esm2020/lib/components/widgets/error-rate-widget.component.mjs +0 -116
- package/esm2020/lib/guards/audit-logging.guard.mjs +0 -23
- package/esm2020/lib/guards/extensions.guard.mjs +0 -31
- package/esm2020/proxy/lib/proxy/audit-logging/audit-logs.service.mjs +0 -56
- package/fesm2015/volo-abp.ng.audit-logging-common.mjs.map +0 -1
- package/fesm2015/volo-abp.ng.audit-logging-config.mjs +0 -182
- package/fesm2015/volo-abp.ng.audit-logging-config.mjs.map +0 -1
- package/fesm2015/volo-abp.ng.audit-logging-proxy.mjs.map +0 -1
- package/fesm2015/volo-abp.ng.audit-logging.mjs +0 -785
- package/fesm2015/volo-abp.ng.audit-logging.mjs.map +0 -1
- package/fesm2020/volo-abp.ng.audit-logging-common.mjs +0 -38
- package/fesm2020/volo-abp.ng.audit-logging-proxy.mjs +0 -71
- package/fesm2020/volo-abp.ng.audit-logging.mjs.map +0 -1
- package/proxy/src/lib/proxy/README.md +0 -17
- /package/{fesm2020 → fesm2022}/volo-abp.ng.audit-logging-common.mjs.map +0 -0
|
@@ -11,171 +11,171 @@ import { SHOW_ENTITY_DETAILS } from '@volo/abp.ng.audit-logging';
|
|
|
11
11
|
import { SHOW_ENTITY_HISTORY } from '@volo/abp.commercial.ng.ui';
|
|
12
12
|
import { AUDIT_LOGGING_FEATURES_PROVIDERS } from '@volo/abp.ng.audit-logging/common';
|
|
13
13
|
|
|
14
|
-
class EntityChangeDetailsComponent {
|
|
15
|
-
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
this.
|
|
30
|
-
}
|
|
31
|
-
getPropColor(propertyChange) {
|
|
32
|
-
return this.entityChange.changeType === EntityChangeType.Updated &&
|
|
33
|
-
propertyChange.newValue !== propertyChange.originalValue
|
|
34
|
-
? 'red'
|
|
35
|
-
: undefined;
|
|
36
|
-
}
|
|
37
|
-
getInterpolationParams(changeTime) {
|
|
38
|
-
return [this.changeType, changeTime, this.userName];
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
44
|
-
type: Component,
|
|
45
|
-
args: [{ selector: 'abp-entity-change-details', animations: [collapse], template: "<div\r\n class=\"mb-3 border border-dark rounded\"\r\n *ngIf=\"getInterpolationParams(entityChange.changeTime | date: 'medium') as params\"\r\n>\r\n <div class=\"d-grid\">\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-{{ color }}\"\r\n (click)=\"isCollapsed = !isCollapsed\"\r\n [attr.aria-expanded]=\"!isCollapsed\"\r\n [attr.aria-controls]=\"uuid\"\r\n >\r\n {{ 'AbpAuditLogging::DaysAgoWithUserTitle' | abpLocalization: params }}\r\n </button>\r\n </div>\r\n <div [id]=\"uuid\" [@collapse]=\"isCollapsed ? 'collapsed' : 'expanded'\">\r\n <div class=\"m-3\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'AbpAuditLogging::PropertyName' | abpLocalization }}</th>\r\n <th>{{ 'AbpAuditLogging::OriginalValue' | abpLocalization }}</th>\r\n <th>{{ 'AbpAuditLogging::NewValue' | abpLocalization }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let prop of entityChange.propertyChanges; trackBy: track.by('id')\">\r\n <td>{{ prop.propertyName }}</td>\r\n <td>{{ prop.originalValue }}</td>\r\n <td [style.color]=\"getPropColor(prop)\">{{ prop.newValue }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
|
|
46
|
-
}], ctorParameters: function () { return [{ type: i1.TrackByService }]; }, propDecorators: { itemWithUserName: [{
|
|
47
|
-
type: Input
|
|
48
|
-
}], isCollapsed: [{
|
|
49
|
-
type: Input
|
|
14
|
+
class EntityChangeDetailsComponent {
|
|
15
|
+
set itemWithUserName(item) {
|
|
16
|
+
this.changeType = EntityChangeType[item.entityChange.changeType];
|
|
17
|
+
this.color = this.colors[item.entityChange.changeType];
|
|
18
|
+
this.userName = item.userName;
|
|
19
|
+
this.entityChange = item.entityChange;
|
|
20
|
+
}
|
|
21
|
+
constructor(track) {
|
|
22
|
+
this.track = track;
|
|
23
|
+
this.isCollapsed = false;
|
|
24
|
+
this.colors = {
|
|
25
|
+
[EntityChangeType.Created]: 'success',
|
|
26
|
+
[EntityChangeType.Updated]: 'info',
|
|
27
|
+
[EntityChangeType.Deleted]: 'danger',
|
|
28
|
+
};
|
|
29
|
+
this.uuid = uuid();
|
|
30
|
+
}
|
|
31
|
+
getPropColor(propertyChange) {
|
|
32
|
+
return this.entityChange.changeType === EntityChangeType.Updated &&
|
|
33
|
+
propertyChange.newValue !== propertyChange.originalValue
|
|
34
|
+
? 'red'
|
|
35
|
+
: undefined;
|
|
36
|
+
}
|
|
37
|
+
getInterpolationParams(changeTime) {
|
|
38
|
+
return [this.changeType, changeTime, this.userName];
|
|
39
|
+
}
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: EntityChangeDetailsComponent, deps: [{ token: i1.TrackByService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
41
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: EntityChangeDetailsComponent, selector: "abp-entity-change-details", inputs: { itemWithUserName: "itemWithUserName", isCollapsed: "isCollapsed" }, ngImport: i0, template: "<div\r\n class=\"mb-3 border border-dark rounded\"\r\n *ngIf=\"getInterpolationParams(entityChange.changeTime | date: 'medium') as params\"\r\n>\r\n <div class=\"d-grid\">\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-{{ color }}\"\r\n (click)=\"isCollapsed = !isCollapsed\"\r\n [attr.aria-expanded]=\"!isCollapsed\"\r\n [attr.aria-controls]=\"uuid\"\r\n >\r\n {{ 'AbpAuditLogging::DaysAgoWithUserTitle' | abpLocalization: params }}\r\n </button>\r\n </div>\r\n <div [id]=\"uuid\" [@collapse]=\"isCollapsed ? 'collapsed' : 'expanded'\">\r\n <div class=\"m-3\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'AbpAuditLogging::PropertyName' | abpLocalization }}</th>\r\n <th>{{ 'AbpAuditLogging::OriginalValue' | abpLocalization }}</th>\r\n <th>{{ 'AbpAuditLogging::NewValue' | abpLocalization }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let prop of entityChange.propertyChanges; trackBy: track.by('id')\">\r\n <td>{{ prop.propertyName }}</td>\r\n <td>{{ prop.originalValue }}</td>\r\n <td [style.color]=\"getPropColor(prop)\">{{ prop.newValue }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }], animations: [collapse] }); }
|
|
42
|
+
}
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: EntityChangeDetailsComponent, decorators: [{
|
|
44
|
+
type: Component,
|
|
45
|
+
args: [{ selector: 'abp-entity-change-details', animations: [collapse], template: "<div\r\n class=\"mb-3 border border-dark rounded\"\r\n *ngIf=\"getInterpolationParams(entityChange.changeTime | date: 'medium') as params\"\r\n>\r\n <div class=\"d-grid\">\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-{{ color }}\"\r\n (click)=\"isCollapsed = !isCollapsed\"\r\n [attr.aria-expanded]=\"!isCollapsed\"\r\n [attr.aria-controls]=\"uuid\"\r\n >\r\n {{ 'AbpAuditLogging::DaysAgoWithUserTitle' | abpLocalization: params }}\r\n </button>\r\n </div>\r\n <div [id]=\"uuid\" [@collapse]=\"isCollapsed ? 'collapsed' : 'expanded'\">\r\n <div class=\"m-3\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'AbpAuditLogging::PropertyName' | abpLocalization }}</th>\r\n <th>{{ 'AbpAuditLogging::OriginalValue' | abpLocalization }}</th>\r\n <th>{{ 'AbpAuditLogging::NewValue' | abpLocalization }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let prop of entityChange.propertyChanges; trackBy: track.by('id')\">\r\n <td>{{ prop.propertyName }}</td>\r\n <td>{{ prop.originalValue }}</td>\r\n <td [style.color]=\"getPropColor(prop)\">{{ prop.newValue }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
|
|
46
|
+
}], ctorParameters: function () { return [{ type: i1.TrackByService }]; }, propDecorators: { itemWithUserName: [{
|
|
47
|
+
type: Input
|
|
48
|
+
}], isCollapsed: [{
|
|
49
|
+
type: Input
|
|
50
50
|
}] } });
|
|
51
51
|
|
|
52
|
-
class EntityChangeModalComponent {
|
|
53
|
-
constructor(cdRef, track) {
|
|
54
|
-
this.cdRef = cdRef;
|
|
55
|
-
this.track = track;
|
|
56
|
-
this.history = [];
|
|
57
|
-
this.visible = false;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
-
type: Component,
|
|
64
|
-
args: [{ selector: 'abp-entity-change-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "<abp-modal [(visible)]=\"visible\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ entityTypeFullName }}\r\n <br />\r\n <span style=\"font-size: small\">({{ entityId }})</span>\r\n </h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <ng-container *ngIf=\"history.length; else noChanges\">\r\n <abp-entity-change-details\r\n *ngFor=\"let change of history; first as f; trackBy: track.byDeep('entityChange', 'id')\"\r\n [itemWithUserName]=\"change\"\r\n [isCollapsed]=\"!f\"\r\n ></abp-entity-change-details>\r\n </ng-container>\r\n\r\n <ng-template #noChanges\r\n ><div class=\"text-center\">\r\n {{ 'AbpAuditLogging::NoChanges' | abpLocalization }}\r\n </div></ng-template\r\n >\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpAuditLogging::Close' | abpLocalization }}\r\n </button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
|
|
52
|
+
class EntityChangeModalComponent {
|
|
53
|
+
constructor(cdRef, track) {
|
|
54
|
+
this.cdRef = cdRef;
|
|
55
|
+
this.track = track;
|
|
56
|
+
this.history = [];
|
|
57
|
+
this.visible = false;
|
|
58
|
+
}
|
|
59
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: EntityChangeModalComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TrackByService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
60
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: EntityChangeModalComponent, selector: "abp-entity-change-modal", ngImport: i0, template: "<abp-modal [(visible)]=\"visible\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ entityTypeFullName }}\r\n <br />\r\n <span style=\"font-size: small\">({{ entityId }})</span>\r\n </h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <ng-container *ngIf=\"history.length; else noChanges\">\r\n <abp-entity-change-details\r\n *ngFor=\"let change of history; first as f; trackBy: track.byDeep('entityChange', 'id')\"\r\n [itemWithUserName]=\"change\"\r\n [isCollapsed]=\"!f\"\r\n ></abp-entity-change-details>\r\n </ng-container>\r\n\r\n <ng-template #noChanges\r\n ><div class=\"text-center\">\r\n {{ 'AbpAuditLogging::NoChanges' | abpLocalization }}\r\n </div></ng-template\r\n >\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpAuditLogging::Close' | abpLocalization }}\r\n </button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: EntityChangeDetailsComponent, selector: "abp-entity-change-details", inputs: ["itemWithUserName", "isCollapsed"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
61
|
+
}
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: EntityChangeModalComponent, decorators: [{
|
|
63
|
+
type: Component,
|
|
64
|
+
args: [{ selector: 'abp-entity-change-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "<abp-modal [(visible)]=\"visible\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ entityTypeFullName }}\r\n <br />\r\n <span style=\"font-size: small\">({{ entityId }})</span>\r\n </h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <ng-container *ngIf=\"history.length; else noChanges\">\r\n <abp-entity-change-details\r\n *ngFor=\"let change of history; first as f; trackBy: track.byDeep('entityChange', 'id')\"\r\n [itemWithUserName]=\"change\"\r\n [isCollapsed]=\"!f\"\r\n ></abp-entity-change-details>\r\n </ng-container>\r\n\r\n <ng-template #noChanges\r\n ><div class=\"text-center\">\r\n {{ 'AbpAuditLogging::NoChanges' | abpLocalization }}\r\n </div></ng-template\r\n >\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpAuditLogging::Close' | abpLocalization }}\r\n </button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
|
|
65
65
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TrackByService }]; } });
|
|
66
66
|
|
|
67
|
-
class EntityChangeModalService {
|
|
68
|
-
constructor(auditLogsService, contentProjectionService) {
|
|
69
|
-
this.auditLogsService = auditLogsService;
|
|
70
|
-
this.contentProjectionService = contentProjectionService;
|
|
71
|
-
this.projectModal();
|
|
72
|
-
}
|
|
73
|
-
projectModal() {
|
|
74
|
-
this.modalRef = this.contentProjectionService.projectContent(PROJECTION_STRATEGY.AppendComponentToBody(EntityChangeModalComponent));
|
|
75
|
-
this.modalRef.changeDetectorRef.detectChanges();
|
|
76
|
-
}
|
|
77
|
-
detectChanges() {
|
|
78
|
-
this.modalRef.changeDetectorRef.detectChanges();
|
|
79
|
-
this.modalRef.instance.cdRef.detectChanges();
|
|
80
|
-
}
|
|
81
|
-
showDetails(entityChangeId) {
|
|
82
|
-
this.auditLogsService.getEntityChangeWithUsername(entityChangeId).subscribe(change => {
|
|
83
|
-
this.modalRef.instance.entityId = change.entityChange.entityId;
|
|
84
|
-
this.modalRef.instance.entityTypeFullName = change.entityChange.entityTypeFullName;
|
|
85
|
-
this.modalRef.instance.history = [change].filter(Boolean);
|
|
86
|
-
this.modalRef.instance.visible = true;
|
|
87
|
-
this.detectChanges();
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
showHistory(entityId, entityTypeFullName) {
|
|
91
|
-
this.auditLogsService
|
|
92
|
-
.getEntityChangesWithUsername({ entityId, entityTypeFullName })
|
|
93
|
-
.subscribe(changes => {
|
|
94
|
-
this.modalRef.instance.entityId = entityId;
|
|
95
|
-
this.modalRef.instance.entityTypeFullName = entityTypeFullName;
|
|
96
|
-
this.modalRef.instance.history = changes;
|
|
97
|
-
this.modalRef.instance.visible = true;
|
|
98
|
-
this.detectChanges();
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
105
|
-
type: Injectable,
|
|
106
|
-
args: [{
|
|
107
|
-
providedIn: 'root',
|
|
108
|
-
}]
|
|
67
|
+
class EntityChangeModalService {
|
|
68
|
+
constructor(auditLogsService, contentProjectionService) {
|
|
69
|
+
this.auditLogsService = auditLogsService;
|
|
70
|
+
this.contentProjectionService = contentProjectionService;
|
|
71
|
+
this.projectModal();
|
|
72
|
+
}
|
|
73
|
+
projectModal() {
|
|
74
|
+
this.modalRef = this.contentProjectionService.projectContent(PROJECTION_STRATEGY.AppendComponentToBody(EntityChangeModalComponent));
|
|
75
|
+
this.modalRef.changeDetectorRef.detectChanges();
|
|
76
|
+
}
|
|
77
|
+
detectChanges() {
|
|
78
|
+
this.modalRef.changeDetectorRef.detectChanges();
|
|
79
|
+
this.modalRef.instance.cdRef.detectChanges();
|
|
80
|
+
}
|
|
81
|
+
showDetails(entityChangeId) {
|
|
82
|
+
this.auditLogsService.getEntityChangeWithUsername(entityChangeId).subscribe(change => {
|
|
83
|
+
this.modalRef.instance.entityId = change.entityChange.entityId;
|
|
84
|
+
this.modalRef.instance.entityTypeFullName = change.entityChange.entityTypeFullName;
|
|
85
|
+
this.modalRef.instance.history = [change].filter(Boolean);
|
|
86
|
+
this.modalRef.instance.visible = true;
|
|
87
|
+
this.detectChanges();
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
showHistory(entityId, entityTypeFullName) {
|
|
91
|
+
this.auditLogsService
|
|
92
|
+
.getEntityChangesWithUsername({ entityId, entityTypeFullName })
|
|
93
|
+
.subscribe(changes => {
|
|
94
|
+
this.modalRef.instance.entityId = entityId;
|
|
95
|
+
this.modalRef.instance.entityTypeFullName = entityTypeFullName;
|
|
96
|
+
this.modalRef.instance.history = changes;
|
|
97
|
+
this.modalRef.instance.visible = true;
|
|
98
|
+
this.detectChanges();
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: EntityChangeModalService, deps: [{ token: i1$1.AuditLogsService }, { token: i1.ContentProjectionService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
102
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: EntityChangeModalService, providedIn: 'root' }); }
|
|
103
|
+
}
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: EntityChangeModalService, decorators: [{
|
|
105
|
+
type: Injectable,
|
|
106
|
+
args: [{
|
|
107
|
+
providedIn: 'root',
|
|
108
|
+
}]
|
|
109
109
|
}], ctorParameters: function () { return [{ type: i1$1.AuditLogsService }, { type: i1.ContentProjectionService }]; } });
|
|
110
110
|
|
|
111
|
-
const ENTITY_DETAILS_PROVIDERS = [
|
|
112
|
-
{
|
|
113
|
-
provide: SHOW_ENTITY_DETAILS,
|
|
114
|
-
useFactory: bindShowDetails,
|
|
115
|
-
deps: [EntityChangeModalService],
|
|
116
|
-
},
|
|
117
|
-
];
|
|
118
|
-
function bindShowDetails(service) {
|
|
119
|
-
return service.showDetails.bind(service);
|
|
111
|
+
const ENTITY_DETAILS_PROVIDERS = [
|
|
112
|
+
{
|
|
113
|
+
provide: SHOW_ENTITY_DETAILS,
|
|
114
|
+
useFactory: bindShowDetails,
|
|
115
|
+
deps: [EntityChangeModalService],
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
function bindShowDetails(service) {
|
|
119
|
+
return service.showDetails.bind(service);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
const ENTITY_HISTORY_PROVIDERS = [
|
|
123
|
-
{
|
|
124
|
-
provide: SHOW_ENTITY_HISTORY,
|
|
125
|
-
useFactory: bindShowHistory,
|
|
126
|
-
deps: [EntityChangeModalService],
|
|
127
|
-
},
|
|
128
|
-
];
|
|
129
|
-
function bindShowHistory(service) {
|
|
130
|
-
return service.showHistory.bind(service);
|
|
122
|
+
const ENTITY_HISTORY_PROVIDERS = [
|
|
123
|
+
{
|
|
124
|
+
provide: SHOW_ENTITY_HISTORY,
|
|
125
|
+
useFactory: bindShowHistory,
|
|
126
|
+
deps: [EntityChangeModalService],
|
|
127
|
+
},
|
|
128
|
+
];
|
|
129
|
+
function bindShowHistory(service) {
|
|
130
|
+
return service.showHistory.bind(service);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
const AUDIT_LOGGING_ROUTE_PROVIDERS = [
|
|
134
|
-
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },
|
|
135
|
-
];
|
|
136
|
-
function configureRoutes(routes) {
|
|
137
|
-
return () => {
|
|
138
|
-
routes.add([
|
|
139
|
-
{
|
|
140
|
-
name: "AbpAuditLogging::Menu:AuditLogging" /* eAuditLoggingRouteNames.AuditLogging */,
|
|
141
|
-
path: '/audit-logs',
|
|
142
|
-
parentName: "AbpUiNavigation::Menu:Administration" /* eThemeSharedRouteNames.Administration */,
|
|
143
|
-
layout: "application" /* eLayoutType.application */,
|
|
144
|
-
iconClass: 'fa fa-file-text',
|
|
145
|
-
order: 6,
|
|
146
|
-
requiredPolicy: "AuditLogging.AuditLogs" /* eAuditLoggingPolicyNames.AuditLogging */,
|
|
147
|
-
},
|
|
148
|
-
]);
|
|
149
|
-
};
|
|
133
|
+
const AUDIT_LOGGING_ROUTE_PROVIDERS = [
|
|
134
|
+
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },
|
|
135
|
+
];
|
|
136
|
+
function configureRoutes(routes) {
|
|
137
|
+
return () => {
|
|
138
|
+
routes.add([
|
|
139
|
+
{
|
|
140
|
+
name: "AbpAuditLogging::Menu:AuditLogging" /* eAuditLoggingRouteNames.AuditLogging */,
|
|
141
|
+
path: '/audit-logs',
|
|
142
|
+
parentName: "AbpUiNavigation::Menu:Administration" /* eThemeSharedRouteNames.Administration */,
|
|
143
|
+
layout: "application" /* eLayoutType.application */,
|
|
144
|
+
iconClass: 'fa fa-file-text',
|
|
145
|
+
order: 6,
|
|
146
|
+
requiredPolicy: "AuditLogging.AuditLogs" /* eAuditLoggingPolicyNames.AuditLogging */,
|
|
147
|
+
},
|
|
148
|
+
]);
|
|
149
|
+
};
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
class AuditLoggingConfigModule {
|
|
153
|
-
static forRoot() {
|
|
154
|
-
return {
|
|
155
|
-
ngModule: AuditLoggingConfigModule,
|
|
156
|
-
providers: [
|
|
157
|
-
AUDIT_LOGGING_ROUTE_PROVIDERS,
|
|
158
|
-
ENTITY_DETAILS_PROVIDERS,
|
|
159
|
-
ENTITY_HISTORY_PROVIDERS,
|
|
160
|
-
AUDIT_LOGGING_FEATURES_PROVIDERS,
|
|
161
|
-
],
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
169
|
-
type: NgModule,
|
|
170
|
-
args: [{
|
|
171
|
-
declarations: [EntityChangeDetailsComponent, EntityChangeModalComponent],
|
|
172
|
-
exports: [EntityChangeDetailsComponent, EntityChangeModalComponent],
|
|
173
|
-
imports: [CoreModule, ThemeSharedModule],
|
|
174
|
-
}]
|
|
152
|
+
class AuditLoggingConfigModule {
|
|
153
|
+
static forRoot() {
|
|
154
|
+
return {
|
|
155
|
+
ngModule: AuditLoggingConfigModule,
|
|
156
|
+
providers: [
|
|
157
|
+
AUDIT_LOGGING_ROUTE_PROVIDERS,
|
|
158
|
+
ENTITY_DETAILS_PROVIDERS,
|
|
159
|
+
ENTITY_HISTORY_PROVIDERS,
|
|
160
|
+
AUDIT_LOGGING_FEATURES_PROVIDERS,
|
|
161
|
+
],
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AuditLoggingConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
165
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: AuditLoggingConfigModule, declarations: [EntityChangeDetailsComponent, EntityChangeModalComponent], imports: [CoreModule, ThemeSharedModule], exports: [EntityChangeDetailsComponent, EntityChangeModalComponent] }); }
|
|
166
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AuditLoggingConfigModule, imports: [CoreModule, ThemeSharedModule] }); }
|
|
167
|
+
}
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AuditLoggingConfigModule, decorators: [{
|
|
169
|
+
type: NgModule,
|
|
170
|
+
args: [{
|
|
171
|
+
declarations: [EntityChangeDetailsComponent, EntityChangeModalComponent],
|
|
172
|
+
exports: [EntityChangeDetailsComponent, EntityChangeModalComponent],
|
|
173
|
+
imports: [CoreModule, ThemeSharedModule],
|
|
174
|
+
}]
|
|
175
175
|
}] });
|
|
176
176
|
|
|
177
|
-
/**
|
|
178
|
-
* Generated bundle index. Do not edit.
|
|
177
|
+
/**
|
|
178
|
+
* Generated bundle index. Do not edit.
|
|
179
179
|
*/
|
|
180
180
|
|
|
181
181
|
export { AUDIT_LOGGING_ROUTE_PROVIDERS, AuditLoggingConfigModule, ENTITY_DETAILS_PROVIDERS, ENTITY_HISTORY_PROVIDERS, EntityChangeDetailsComponent, EntityChangeModalComponent, EntityChangeModalService, bindShowDetails, bindShowHistory, configureRoutes };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volo-abp.ng.audit-logging-config.mjs","sources":["../../../../packages/audit-logging/config/src/components/entity-change-details.component.ts","../../../../packages/audit-logging/config/src/components/entity-change-details.component.html","../../../../packages/audit-logging/config/src/components/entity-change-modal.component.ts","../../../../packages/audit-logging/config/src/components/entity-change-modal.component.html","../../../../packages/audit-logging/config/src/services/entity-change-modal.service.ts","../../../../packages/audit-logging/config/src/providers/entity-details.provider.ts","../../../../packages/audit-logging/config/src/providers/entity-history.provider.ts","../../../../packages/audit-logging/config/src/providers/route.provider.ts","../../../../packages/audit-logging/config/src/audit-logging-config.module.ts","../../../../packages/audit-logging/config/src/volo-abp.ng.audit-logging-config.ts"],"sourcesContent":["import { TrackByService, uuid } from '@abp/ng.core';\r\nimport { collapse } from '@abp/ng.theme.shared';\r\nimport { Component, Input } from '@angular/core';\r\nimport {\r\n EntityChangeDto,\r\n EntityChangeType,\r\n EntityChangeWithUsernameDto,\r\n EntityPropertyChangeDto,\r\n} from '@volo/abp.ng.audit-logging/proxy';\r\n\r\n@Component({\r\n selector: 'abp-entity-change-details',\r\n templateUrl: './entity-change-details.component.html',\r\n animations: [collapse],\r\n})\r\nexport class EntityChangeDetailsComponent {\r\n @Input() set itemWithUserName(item: EntityChangeWithUsernameDto) {\r\n this.changeType = EntityChangeType[item.entityChange.changeType];\r\n this.color = this.colors[item.entityChange.changeType];\r\n this.userName = item.userName;\r\n this.entityChange = item.entityChange;\r\n }\r\n\r\n @Input() isCollapsed = false;\r\n\r\n entityChange: EntityChangeDto;\r\n\r\n userName: string;\r\n\r\n changeType: string;\r\n\r\n color: 'success' | 'info' | 'danger';\r\n\r\n private colors = {\r\n [EntityChangeType.Created]: 'success',\r\n [EntityChangeType.Updated]: 'info',\r\n [EntityChangeType.Deleted]: 'danger',\r\n } as const;\r\n\r\n uuid = uuid();\r\n\r\n constructor(public readonly track: TrackByService<EntityPropertyChangeDto>) {}\r\n\r\n getPropColor(propertyChange: EntityPropertyChangeDto): 'red' | undefined {\r\n return this.entityChange.changeType === EntityChangeType.Updated &&\r\n propertyChange.newValue !== propertyChange.originalValue\r\n ? 'red'\r\n : undefined;\r\n }\r\n\r\n getInterpolationParams(changeTime: string): string[] {\r\n return [this.changeType, changeTime, this.userName];\r\n }\r\n}\r\n","<div\r\n class=\"mb-3 border border-dark rounded\"\r\n *ngIf=\"getInterpolationParams(entityChange.changeTime | date: 'medium') as params\"\r\n>\r\n <div class=\"d-grid\">\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-{{ color }}\"\r\n (click)=\"isCollapsed = !isCollapsed\"\r\n [attr.aria-expanded]=\"!isCollapsed\"\r\n [attr.aria-controls]=\"uuid\"\r\n >\r\n {{ 'AbpAuditLogging::DaysAgoWithUserTitle' | abpLocalization: params }}\r\n </button>\r\n </div>\r\n <div [id]=\"uuid\" [@collapse]=\"isCollapsed ? 'collapsed' : 'expanded'\">\r\n <div class=\"m-3\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'AbpAuditLogging::PropertyName' | abpLocalization }}</th>\r\n <th>{{ 'AbpAuditLogging::OriginalValue' | abpLocalization }}</th>\r\n <th>{{ 'AbpAuditLogging::NewValue' | abpLocalization }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let prop of entityChange.propertyChanges; trackBy: track.by('id')\">\r\n <td>{{ prop.propertyName }}</td>\r\n <td>{{ prop.originalValue }}</td>\r\n <td [style.color]=\"getPropColor(prop)\">{{ prop.newValue }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n</div>\r\n","import { TrackByService } from '@abp/ng.core';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core';\r\nimport { EntityChangeWithUsernameDto } from '@volo/abp.ng.audit-logging/proxy';\r\n\r\n@Component({\r\n selector: 'abp-entity-change-modal',\r\n templateUrl: './entity-change-modal.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class EntityChangeModalComponent {\r\n history: EntityChangeWithUsernameDto[] = [];\r\n\r\n entityId: string;\r\n\r\n entityTypeFullName: string;\r\n\r\n visible = false;\r\n\r\n constructor(public readonly cdRef: ChangeDetectorRef, public readonly track: TrackByService) {}\r\n}\r\n","<abp-modal [(visible)]=\"visible\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ entityTypeFullName }}\r\n <br />\r\n <span style=\"font-size: small\">({{ entityId }})</span>\r\n </h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <ng-container *ngIf=\"history.length; else noChanges\">\r\n <abp-entity-change-details\r\n *ngFor=\"let change of history; first as f; trackBy: track.byDeep('entityChange', 'id')\"\r\n [itemWithUserName]=\"change\"\r\n [isCollapsed]=\"!f\"\r\n ></abp-entity-change-details>\r\n </ng-container>\r\n\r\n <ng-template #noChanges\r\n ><div class=\"text-center\">\r\n {{ 'AbpAuditLogging::NoChanges' | abpLocalization }}\r\n </div></ng-template\r\n >\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpAuditLogging::Close' | abpLocalization }}\r\n </button>\r\n </ng-template>\r\n</abp-modal>\r\n","import { ContentProjectionService, PROJECTION_STRATEGY } from '@abp/ng.core';\r\nimport { ComponentRef, Injectable } from '@angular/core';\r\nimport { AuditLogsService } from '@volo/abp.ng.audit-logging/proxy';\r\nimport { EntityChangeModalComponent } from '../components/entity-change-modal.component';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class EntityChangeModalService {\r\n private modalRef: ComponentRef<EntityChangeModalComponent>;\r\n\r\n constructor(\r\n private auditLogsService: AuditLogsService,\r\n private contentProjectionService: ContentProjectionService,\r\n ) {\r\n this.projectModal();\r\n }\r\n\r\n private projectModal() {\r\n this.modalRef = this.contentProjectionService.projectContent(\r\n PROJECTION_STRATEGY.AppendComponentToBody(EntityChangeModalComponent),\r\n );\r\n\r\n this.modalRef.changeDetectorRef.detectChanges();\r\n }\r\n\r\n detectChanges() {\r\n this.modalRef.changeDetectorRef.detectChanges();\r\n this.modalRef.instance.cdRef.detectChanges();\r\n }\r\n\r\n showDetails(entityChangeId: string) {\r\n this.auditLogsService.getEntityChangeWithUsername(entityChangeId).subscribe(change => {\r\n this.modalRef.instance.entityId = change.entityChange.entityId;\r\n this.modalRef.instance.entityTypeFullName = change.entityChange.entityTypeFullName;\r\n this.modalRef.instance.history = [change].filter(Boolean);\r\n this.modalRef.instance.visible = true;\r\n this.detectChanges();\r\n });\r\n }\r\n\r\n showHistory(entityId: string, entityTypeFullName: string) {\r\n this.auditLogsService\r\n .getEntityChangesWithUsername({ entityId, entityTypeFullName })\r\n .subscribe(changes => {\r\n this.modalRef.instance.entityId = entityId;\r\n this.modalRef.instance.entityTypeFullName = entityTypeFullName;\r\n this.modalRef.instance.history = changes;\r\n this.modalRef.instance.visible = true;\r\n this.detectChanges();\r\n });\r\n }\r\n}\r\n","import { SHOW_ENTITY_DETAILS } from '@volo/abp.ng.audit-logging';\r\nimport { EntityChangeModalService } from '../services/entity-change-modal.service';\r\n\r\nexport const ENTITY_DETAILS_PROVIDERS = [\r\n {\r\n provide: SHOW_ENTITY_DETAILS,\r\n useFactory: bindShowDetails,\r\n deps: [EntityChangeModalService],\r\n },\r\n];\r\n\r\nexport function bindShowDetails(service: EntityChangeModalService) {\r\n return service.showDetails.bind(service);\r\n}\r\n","import { SHOW_ENTITY_HISTORY } from '@volo/abp.commercial.ng.ui';\r\nimport { EntityChangeModalService } from '../services/entity-change-modal.service';\r\n\r\nexport const ENTITY_HISTORY_PROVIDERS = [\r\n {\r\n provide: SHOW_ENTITY_HISTORY,\r\n useFactory: bindShowHistory,\r\n deps: [EntityChangeModalService],\r\n },\r\n];\r\n\r\nexport function bindShowHistory(service: EntityChangeModalService) {\r\n return service.showHistory.bind(service);\r\n}\r\n","import { eLayoutType, RoutesService } from '@abp/ng.core';\r\nimport { eThemeSharedRouteNames } from '@abp/ng.theme.shared';\r\nimport { APP_INITIALIZER } from '@angular/core';\r\nimport { eAuditLoggingPolicyNames } from '../enums/policy-names';\r\nimport { eAuditLoggingRouteNames } from '../enums/route-names';\r\n\r\nexport const AUDIT_LOGGING_ROUTE_PROVIDERS = [\r\n { provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },\r\n];\r\n\r\nexport function configureRoutes(routes: RoutesService) {\r\n return () => {\r\n routes.add([\r\n {\r\n name: eAuditLoggingRouteNames.AuditLogging,\r\n path: '/audit-logs',\r\n parentName: eThemeSharedRouteNames.Administration,\r\n layout: eLayoutType.application,\r\n iconClass: 'fa fa-file-text',\r\n order: 6,\r\n requiredPolicy: eAuditLoggingPolicyNames.AuditLogging,\r\n },\r\n ]);\r\n };\r\n}\r\n","import { CoreModule } from '@abp/ng.core';\r\nimport { ThemeSharedModule } from '@abp/ng.theme.shared';\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { EntityChangeDetailsComponent } from './components/entity-change-details.component';\r\nimport { EntityChangeModalComponent } from './components/entity-change-modal.component';\r\nimport { ENTITY_DETAILS_PROVIDERS, ENTITY_HISTORY_PROVIDERS } from './providers';\r\nimport { AUDIT_LOGGING_ROUTE_PROVIDERS } from './providers/route.provider';\r\nimport { AUDIT_LOGGING_FEATURES_PROVIDERS } from '@volo/abp.ng.audit-logging/common';\r\n\r\n@NgModule({\r\n declarations: [EntityChangeDetailsComponent, EntityChangeModalComponent],\r\n exports: [EntityChangeDetailsComponent, EntityChangeModalComponent],\r\n imports: [CoreModule, ThemeSharedModule],\r\n})\r\nexport class AuditLoggingConfigModule {\r\n static forRoot(): ModuleWithProviders<AuditLoggingConfigModule> {\r\n return {\r\n ngModule: AuditLoggingConfigModule,\r\n providers: [\r\n AUDIT_LOGGING_ROUTE_PROVIDERS,\r\n ENTITY_DETAILS_PROVIDERS,\r\n ENTITY_HISTORY_PROVIDERS,\r\n AUDIT_LOGGING_FEATURES_PROVIDERS,\r\n ],\r\n };\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i4.EntityChangeDetailsComponent","i1","i2"],"mappings":";;;;;;;;;;;;;MAea,4BAA4B,CAAA;AA0BvC,IAAA,WAAA,CAA4B,KAA8C,EAAA;QAA9C,IAAK,CAAA,KAAA,GAAL,KAAK,CAAyC;QAlBjE,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AAUrB,QAAA,IAAA,CAAA,MAAM,GAAG;AACf,YAAA,CAAC,gBAAgB,CAAC,OAAO,GAAG,SAAS;AACrC,YAAA,CAAC,gBAAgB,CAAC,OAAO,GAAG,MAAM;AAClC,YAAA,CAAC,gBAAgB,CAAC,OAAO,GAAG,QAAQ;SAC5B,CAAC;QAEX,IAAI,CAAA,IAAA,GAAG,IAAI,EAAE,CAAC;KAEgE;IAzB9E,IAAa,gBAAgB,CAAC,IAAiC,EAAA;QAC7D,IAAI,CAAC,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;AACjE,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;AACvD,QAAA,IAAI,CAAC,QAAQ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AAA,EAAA,CAAA;kBALpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,4BAA4B,EAAE,0BAA0B,CAAC;AACxE,oBAAA,OAAO,EAAE,CAAC,4BAA4B,EAAE,0BAA0B,CAAC;AACnE,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,iBAAiB,CAAC;AACzC,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"volo-abp.ng.audit-logging-config.mjs","sources":["../../../../packages/audit-logging/config/src/components/entity-change-details.component.ts","../../../../packages/audit-logging/config/src/components/entity-change-details.component.html","../../../../packages/audit-logging/config/src/components/entity-change-modal.component.ts","../../../../packages/audit-logging/config/src/components/entity-change-modal.component.html","../../../../packages/audit-logging/config/src/services/entity-change-modal.service.ts","../../../../packages/audit-logging/config/src/providers/entity-details.provider.ts","../../../../packages/audit-logging/config/src/providers/entity-history.provider.ts","../../../../packages/audit-logging/config/src/providers/route.provider.ts","../../../../packages/audit-logging/config/src/audit-logging-config.module.ts","../../../../packages/audit-logging/config/src/volo-abp.ng.audit-logging-config.ts"],"sourcesContent":["import { TrackByService, uuid } from '@abp/ng.core';\r\nimport { collapse } from '@abp/ng.theme.shared';\r\nimport { Component, Input } from '@angular/core';\r\nimport {\r\n EntityChangeDto,\r\n EntityChangeType,\r\n EntityChangeWithUsernameDto,\r\n EntityPropertyChangeDto,\r\n} from '@volo/abp.ng.audit-logging/proxy';\r\n\r\n@Component({\r\n selector: 'abp-entity-change-details',\r\n templateUrl: './entity-change-details.component.html',\r\n animations: [collapse],\r\n})\r\nexport class EntityChangeDetailsComponent {\r\n @Input() set itemWithUserName(item: EntityChangeWithUsernameDto) {\r\n this.changeType = EntityChangeType[item.entityChange.changeType];\r\n this.color = this.colors[item.entityChange.changeType];\r\n this.userName = item.userName;\r\n this.entityChange = item.entityChange;\r\n }\r\n\r\n @Input() isCollapsed = false;\r\n\r\n entityChange: EntityChangeDto;\r\n\r\n userName: string;\r\n\r\n changeType: string;\r\n\r\n color: 'success' | 'info' | 'danger';\r\n\r\n private colors = {\r\n [EntityChangeType.Created]: 'success',\r\n [EntityChangeType.Updated]: 'info',\r\n [EntityChangeType.Deleted]: 'danger',\r\n } as const;\r\n\r\n uuid = uuid();\r\n\r\n constructor(public readonly track: TrackByService<EntityPropertyChangeDto>) {}\r\n\r\n getPropColor(propertyChange: EntityPropertyChangeDto): 'red' | undefined {\r\n return this.entityChange.changeType === EntityChangeType.Updated &&\r\n propertyChange.newValue !== propertyChange.originalValue\r\n ? 'red'\r\n : undefined;\r\n }\r\n\r\n getInterpolationParams(changeTime: string): string[] {\r\n return [this.changeType, changeTime, this.userName];\r\n }\r\n}\r\n","<div\r\n class=\"mb-3 border border-dark rounded\"\r\n *ngIf=\"getInterpolationParams(entityChange.changeTime | date: 'medium') as params\"\r\n>\r\n <div class=\"d-grid\">\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-{{ color }}\"\r\n (click)=\"isCollapsed = !isCollapsed\"\r\n [attr.aria-expanded]=\"!isCollapsed\"\r\n [attr.aria-controls]=\"uuid\"\r\n >\r\n {{ 'AbpAuditLogging::DaysAgoWithUserTitle' | abpLocalization: params }}\r\n </button>\r\n </div>\r\n <div [id]=\"uuid\" [@collapse]=\"isCollapsed ? 'collapsed' : 'expanded'\">\r\n <div class=\"m-3\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'AbpAuditLogging::PropertyName' | abpLocalization }}</th>\r\n <th>{{ 'AbpAuditLogging::OriginalValue' | abpLocalization }}</th>\r\n <th>{{ 'AbpAuditLogging::NewValue' | abpLocalization }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let prop of entityChange.propertyChanges; trackBy: track.by('id')\">\r\n <td>{{ prop.propertyName }}</td>\r\n <td>{{ prop.originalValue }}</td>\r\n <td [style.color]=\"getPropColor(prop)\">{{ prop.newValue }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n</div>\r\n","import { TrackByService } from '@abp/ng.core';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core';\r\nimport { EntityChangeWithUsernameDto } from '@volo/abp.ng.audit-logging/proxy';\r\n\r\n@Component({\r\n selector: 'abp-entity-change-modal',\r\n templateUrl: './entity-change-modal.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class EntityChangeModalComponent {\r\n history: EntityChangeWithUsernameDto[] = [];\r\n\r\n entityId: string;\r\n\r\n entityTypeFullName: string;\r\n\r\n visible = false;\r\n\r\n constructor(public readonly cdRef: ChangeDetectorRef, public readonly track: TrackByService) {}\r\n}\r\n","<abp-modal [(visible)]=\"visible\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ entityTypeFullName }}\r\n <br />\r\n <span style=\"font-size: small\">({{ entityId }})</span>\r\n </h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <ng-container *ngIf=\"history.length; else noChanges\">\r\n <abp-entity-change-details\r\n *ngFor=\"let change of history; first as f; trackBy: track.byDeep('entityChange', 'id')\"\r\n [itemWithUserName]=\"change\"\r\n [isCollapsed]=\"!f\"\r\n ></abp-entity-change-details>\r\n </ng-container>\r\n\r\n <ng-template #noChanges\r\n ><div class=\"text-center\">\r\n {{ 'AbpAuditLogging::NoChanges' | abpLocalization }}\r\n </div></ng-template\r\n >\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpAuditLogging::Close' | abpLocalization }}\r\n </button>\r\n </ng-template>\r\n</abp-modal>\r\n","import { ContentProjectionService, PROJECTION_STRATEGY } from '@abp/ng.core';\r\nimport { ComponentRef, Injectable } from '@angular/core';\r\nimport { AuditLogsService } from '@volo/abp.ng.audit-logging/proxy';\r\nimport { EntityChangeModalComponent } from '../components/entity-change-modal.component';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class EntityChangeModalService {\r\n private modalRef: ComponentRef<EntityChangeModalComponent>;\r\n\r\n constructor(\r\n private auditLogsService: AuditLogsService,\r\n private contentProjectionService: ContentProjectionService,\r\n ) {\r\n this.projectModal();\r\n }\r\n\r\n private projectModal() {\r\n this.modalRef = this.contentProjectionService.projectContent(\r\n PROJECTION_STRATEGY.AppendComponentToBody(EntityChangeModalComponent),\r\n );\r\n\r\n this.modalRef.changeDetectorRef.detectChanges();\r\n }\r\n\r\n detectChanges() {\r\n this.modalRef.changeDetectorRef.detectChanges();\r\n this.modalRef.instance.cdRef.detectChanges();\r\n }\r\n\r\n showDetails(entityChangeId: string) {\r\n this.auditLogsService.getEntityChangeWithUsername(entityChangeId).subscribe(change => {\r\n this.modalRef.instance.entityId = change.entityChange.entityId;\r\n this.modalRef.instance.entityTypeFullName = change.entityChange.entityTypeFullName;\r\n this.modalRef.instance.history = [change].filter(Boolean);\r\n this.modalRef.instance.visible = true;\r\n this.detectChanges();\r\n });\r\n }\r\n\r\n showHistory(entityId: string, entityTypeFullName: string) {\r\n this.auditLogsService\r\n .getEntityChangesWithUsername({ entityId, entityTypeFullName })\r\n .subscribe(changes => {\r\n this.modalRef.instance.entityId = entityId;\r\n this.modalRef.instance.entityTypeFullName = entityTypeFullName;\r\n this.modalRef.instance.history = changes;\r\n this.modalRef.instance.visible = true;\r\n this.detectChanges();\r\n });\r\n }\r\n}\r\n","import { SHOW_ENTITY_DETAILS } from '@volo/abp.ng.audit-logging';\r\nimport { EntityChangeModalService } from '../services/entity-change-modal.service';\r\n\r\nexport const ENTITY_DETAILS_PROVIDERS = [\r\n {\r\n provide: SHOW_ENTITY_DETAILS,\r\n useFactory: bindShowDetails,\r\n deps: [EntityChangeModalService],\r\n },\r\n];\r\n\r\nexport function bindShowDetails(service: EntityChangeModalService) {\r\n return service.showDetails.bind(service);\r\n}\r\n","import { SHOW_ENTITY_HISTORY } from '@volo/abp.commercial.ng.ui';\r\nimport { EntityChangeModalService } from '../services/entity-change-modal.service';\r\n\r\nexport const ENTITY_HISTORY_PROVIDERS = [\r\n {\r\n provide: SHOW_ENTITY_HISTORY,\r\n useFactory: bindShowHistory,\r\n deps: [EntityChangeModalService],\r\n },\r\n];\r\n\r\nexport function bindShowHistory(service: EntityChangeModalService) {\r\n return service.showHistory.bind(service);\r\n}\r\n","import { eLayoutType, RoutesService } from '@abp/ng.core';\r\nimport { eThemeSharedRouteNames } from '@abp/ng.theme.shared';\r\nimport { APP_INITIALIZER } from '@angular/core';\r\nimport { eAuditLoggingPolicyNames } from '../enums/policy-names';\r\nimport { eAuditLoggingRouteNames } from '../enums/route-names';\r\n\r\nexport const AUDIT_LOGGING_ROUTE_PROVIDERS = [\r\n { provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },\r\n];\r\n\r\nexport function configureRoutes(routes: RoutesService) {\r\n return () => {\r\n routes.add([\r\n {\r\n name: eAuditLoggingRouteNames.AuditLogging,\r\n path: '/audit-logs',\r\n parentName: eThemeSharedRouteNames.Administration,\r\n layout: eLayoutType.application,\r\n iconClass: 'fa fa-file-text',\r\n order: 6,\r\n requiredPolicy: eAuditLoggingPolicyNames.AuditLogging,\r\n },\r\n ]);\r\n };\r\n}\r\n","import { CoreModule } from '@abp/ng.core';\r\nimport { ThemeSharedModule } from '@abp/ng.theme.shared';\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { EntityChangeDetailsComponent } from './components/entity-change-details.component';\r\nimport { EntityChangeModalComponent } from './components/entity-change-modal.component';\r\nimport { ENTITY_DETAILS_PROVIDERS, ENTITY_HISTORY_PROVIDERS } from './providers';\r\nimport { AUDIT_LOGGING_ROUTE_PROVIDERS } from './providers/route.provider';\r\nimport { AUDIT_LOGGING_FEATURES_PROVIDERS } from '@volo/abp.ng.audit-logging/common';\r\n\r\n@NgModule({\r\n declarations: [EntityChangeDetailsComponent, EntityChangeModalComponent],\r\n exports: [EntityChangeDetailsComponent, EntityChangeModalComponent],\r\n imports: [CoreModule, ThemeSharedModule],\r\n})\r\nexport class AuditLoggingConfigModule {\r\n static forRoot(): ModuleWithProviders<AuditLoggingConfigModule> {\r\n return {\r\n ngModule: AuditLoggingConfigModule,\r\n providers: [\r\n AUDIT_LOGGING_ROUTE_PROVIDERS,\r\n ENTITY_DETAILS_PROVIDERS,\r\n ENTITY_HISTORY_PROVIDERS,\r\n AUDIT_LOGGING_FEATURES_PROVIDERS,\r\n ],\r\n };\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i4.EntityChangeDetailsComponent","i1","i2"],"mappings":";;;;;;;;;;;;;AAUA,MAKa,4BAA4B,CAAA;IACvC,IAAa,gBAAgB,CAAC,IAAiC,EAAA;QAC7D,IAAI,CAAC,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;AACjE,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;AACvD,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;AAC9B,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;KACvC;AAoBD,IAAA,WAAA,CAA4B,KAA8C,EAAA;QAA9C,IAAK,CAAA,KAAA,GAAL,KAAK,CAAyC;QAlBjE,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AAUrB,QAAA,IAAA,CAAA,MAAM,GAAG;AACf,YAAA,CAAC,gBAAgB,CAAC,OAAO,GAAG,SAAS;AACrC,YAAA,CAAC,gBAAgB,CAAC,OAAO,GAAG,MAAM;AAClC,YAAA,CAAC,gBAAgB,CAAC,OAAO,GAAG,QAAQ;SAC5B,CAAC;QAEX,IAAI,CAAA,IAAA,GAAG,IAAI,EAAE,CAAC;KAEgE;AAE9E,IAAA,YAAY,CAAC,cAA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,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,4BAA4B,EAAE,0BAA0B,CAAC;AACxE,oBAAA,OAAO,EAAE,CAAC,4BAA4B,EAAE,0BAA0B,CAAC;AACnE,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,iBAAiB,CAAC;AACzC,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
1
|
import * as i1 from '@abp/ng.core';
|
|
4
2
|
import { mapEnumToOptions } from '@abp/ng.core';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Injectable } from '@angular/core';
|
|
5
5
|
|
|
6
|
-
class AuditLogsService {
|
|
7
|
-
constructor(restService) {
|
|
8
|
-
this.restService = restService;
|
|
9
|
-
this.apiName = 'AbpAuditLogging';
|
|
10
|
-
this.get = (id) => this.restService.request({
|
|
11
|
-
method: 'GET',
|
|
12
|
-
url: `/api/audit-logging/audit-logs/${id}`,
|
|
13
|
-
}, { apiName: this.apiName });
|
|
14
|
-
this.getAverageExecutionDurationPerDay = (filter) => this.restService.request({
|
|
15
|
-
method: 'GET',
|
|
16
|
-
url: '/api/audit-logging/audit-logs/statistics/average-execution-duration-per-day',
|
|
17
|
-
params: { startDate: filter.startDate, endDate: filter.endDate },
|
|
18
|
-
}, { apiName: this.apiName });
|
|
19
|
-
this.getEntityChange = (entityChangeId) => this.restService.request({
|
|
20
|
-
method: 'GET',
|
|
21
|
-
url: `/api/audit-logging/audit-logs/entity-changes/${entityChangeId}`,
|
|
22
|
-
}, { apiName: this.apiName });
|
|
23
|
-
this.getEntityChangeWithUsername = (entityChangeId) => this.restService.request({
|
|
24
|
-
method: 'GET',
|
|
25
|
-
url: `/api/audit-logging/audit-logs/entity-change-with-username/${entityChangeId}`,
|
|
26
|
-
}, { apiName: this.apiName });
|
|
27
|
-
this.getEntityChanges = (input) => this.restService.request({
|
|
28
|
-
method: 'GET',
|
|
29
|
-
url: '/api/audit-logging/audit-logs/entity-changes',
|
|
30
|
-
params: { auditLogId: input.auditLogId, entityChangeType: input.entityChangeType, entityId: input.entityId, entityTypeFullName: input.entityTypeFullName, startDate: input.startDate, endDate: input.endDate, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
31
|
-
}, { apiName: this.apiName });
|
|
32
|
-
this.getEntityChangesWithUsername = (input) => this.restService.request({
|
|
33
|
-
method: 'GET',
|
|
34
|
-
url: '/api/audit-logging/audit-logs/entity-changes-with-username',
|
|
35
|
-
params: { entityId: input.entityId, entityTypeFullName: input.entityTypeFullName },
|
|
36
|
-
}, { apiName: this.apiName });
|
|
37
|
-
this.getErrorRate = (filter) => this.restService.request({
|
|
38
|
-
method: 'GET',
|
|
39
|
-
url: '/api/audit-logging/audit-logs/statistics/error-rate',
|
|
40
|
-
params: { startDate: filter.startDate, endDate: filter.endDate },
|
|
41
|
-
}, { apiName: this.apiName });
|
|
42
|
-
this.getList = (input) => this.restService.request({
|
|
43
|
-
method: 'GET',
|
|
44
|
-
url: '/api/audit-logging/audit-logs',
|
|
45
|
-
params: { startTime: input.startTime, endTime: input.endTime, url: input.url, userName: input.userName, applicationName: input.applicationName, clientIpAddress: input.clientIpAddress, correlationId: input.correlationId, httpMethod: input.httpMethod, httpStatusCode: input.httpStatusCode, maxExecutionDuration: input.maxExecutionDuration, minExecutionDuration: input.minExecutionDuration, hasException: input.hasException, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
46
|
-
}, { apiName: this.apiName });
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
52
|
-
type: Injectable,
|
|
53
|
-
args: [{
|
|
54
|
-
providedIn: 'root',
|
|
55
|
-
}]
|
|
6
|
+
class AuditLogsService {
|
|
7
|
+
constructor(restService) {
|
|
8
|
+
this.restService = restService;
|
|
9
|
+
this.apiName = 'AbpAuditLogging';
|
|
10
|
+
this.get = (id) => this.restService.request({
|
|
11
|
+
method: 'GET',
|
|
12
|
+
url: `/api/audit-logging/audit-logs/${id}`,
|
|
13
|
+
}, { apiName: this.apiName });
|
|
14
|
+
this.getAverageExecutionDurationPerDay = (filter) => this.restService.request({
|
|
15
|
+
method: 'GET',
|
|
16
|
+
url: '/api/audit-logging/audit-logs/statistics/average-execution-duration-per-day',
|
|
17
|
+
params: { startDate: filter.startDate, endDate: filter.endDate },
|
|
18
|
+
}, { apiName: this.apiName });
|
|
19
|
+
this.getEntityChange = (entityChangeId) => this.restService.request({
|
|
20
|
+
method: 'GET',
|
|
21
|
+
url: `/api/audit-logging/audit-logs/entity-changes/${entityChangeId}`,
|
|
22
|
+
}, { apiName: this.apiName });
|
|
23
|
+
this.getEntityChangeWithUsername = (entityChangeId) => this.restService.request({
|
|
24
|
+
method: 'GET',
|
|
25
|
+
url: `/api/audit-logging/audit-logs/entity-change-with-username/${entityChangeId}`,
|
|
26
|
+
}, { apiName: this.apiName });
|
|
27
|
+
this.getEntityChanges = (input) => this.restService.request({
|
|
28
|
+
method: 'GET',
|
|
29
|
+
url: '/api/audit-logging/audit-logs/entity-changes',
|
|
30
|
+
params: { auditLogId: input.auditLogId, entityChangeType: input.entityChangeType, entityId: input.entityId, entityTypeFullName: input.entityTypeFullName, startDate: input.startDate, endDate: input.endDate, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
31
|
+
}, { apiName: this.apiName });
|
|
32
|
+
this.getEntityChangesWithUsername = (input) => this.restService.request({
|
|
33
|
+
method: 'GET',
|
|
34
|
+
url: '/api/audit-logging/audit-logs/entity-changes-with-username',
|
|
35
|
+
params: { entityId: input.entityId, entityTypeFullName: input.entityTypeFullName },
|
|
36
|
+
}, { apiName: this.apiName });
|
|
37
|
+
this.getErrorRate = (filter) => this.restService.request({
|
|
38
|
+
method: 'GET',
|
|
39
|
+
url: '/api/audit-logging/audit-logs/statistics/error-rate',
|
|
40
|
+
params: { startDate: filter.startDate, endDate: filter.endDate },
|
|
41
|
+
}, { apiName: this.apiName });
|
|
42
|
+
this.getList = (input) => this.restService.request({
|
|
43
|
+
method: 'GET',
|
|
44
|
+
url: '/api/audit-logging/audit-logs',
|
|
45
|
+
params: { startTime: input.startTime, endTime: input.endTime, url: input.url, userName: input.userName, applicationName: input.applicationName, clientIpAddress: input.clientIpAddress, correlationId: input.correlationId, httpMethod: input.httpMethod, httpStatusCode: input.httpStatusCode, maxExecutionDuration: input.maxExecutionDuration, minExecutionDuration: input.minExecutionDuration, hasException: input.hasException, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
46
|
+
}, { apiName: this.apiName });
|
|
47
|
+
}
|
|
48
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AuditLogsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
49
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AuditLogsService, providedIn: 'root' }); }
|
|
50
|
+
}
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AuditLogsService, decorators: [{
|
|
52
|
+
type: Injectable,
|
|
53
|
+
args: [{
|
|
54
|
+
providedIn: 'root',
|
|
55
|
+
}]
|
|
56
56
|
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
57
57
|
|
|
58
|
-
var EntityChangeType;
|
|
59
|
-
(function (EntityChangeType) {
|
|
60
|
-
EntityChangeType[EntityChangeType["Created"] = 0] = "Created";
|
|
61
|
-
EntityChangeType[EntityChangeType["Updated"] = 1] = "Updated";
|
|
62
|
-
EntityChangeType[EntityChangeType["Deleted"] = 2] = "Deleted";
|
|
63
|
-
})(EntityChangeType || (EntityChangeType = {}));
|
|
58
|
+
var EntityChangeType;
|
|
59
|
+
(function (EntityChangeType) {
|
|
60
|
+
EntityChangeType[EntityChangeType["Created"] = 0] = "Created";
|
|
61
|
+
EntityChangeType[EntityChangeType["Updated"] = 1] = "Updated";
|
|
62
|
+
EntityChangeType[EntityChangeType["Deleted"] = 2] = "Deleted";
|
|
63
|
+
})(EntityChangeType || (EntityChangeType = {}));
|
|
64
64
|
const entityChangeTypeOptions = mapEnumToOptions(EntityChangeType);
|
|
65
65
|
|
|
66
|
-
/**
|
|
67
|
-
* Generated bundle index. Do not edit.
|
|
66
|
+
/**
|
|
67
|
+
* Generated bundle index. Do not edit.
|
|
68
68
|
*/
|
|
69
69
|
|
|
70
70
|
export { AuditLogsService, EntityChangeType, entityChangeTypeOptions };
|