@volo/abp.ng.audit-logging 5.0.0-rc.1 → 5.1.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/README.md +2 -2
- package/common/package.json +5 -5
- package/config/package.json +5 -5
- package/esm2020/common/enums/index.mjs +2 -0
- package/esm2020/common/enums/route-names.mjs +2 -0
- package/esm2020/common/public-api.mjs +3 -0
- package/esm2020/common/tokens/features.token.mjs +31 -0
- package/esm2020/common/tokens/index.mjs +2 -0
- package/esm2020/common/volo-abp.ng.audit-logging-common.mjs +5 -0
- package/esm2020/config/audit-logging-config.module.mjs +34 -0
- package/esm2020/config/components/entity-change-details.component.mjs +45 -0
- package/esm2020/config/components/entity-change-modal.component.mjs +22 -0
- package/esm2020/config/components/index.mjs +3 -0
- package/esm2020/config/enums/index.mjs +3 -0
- package/esm2020/config/enums/policy-names.mjs +2 -0
- package/esm2020/config/enums/route-names.mjs +2 -0
- package/esm2020/config/providers/entity-details.provider.mjs +13 -0
- package/esm2020/config/providers/entity-history.provider.mjs +13 -0
- package/esm2020/config/providers/index.mjs +4 -0
- package/esm2020/config/providers/route.provider.mjs +21 -0
- package/esm2020/config/public-api.mjs +6 -0
- package/esm2020/config/services/entity-change-modal.service.mjs +51 -0
- package/esm2020/config/services/index.mjs +2 -0
- package/esm2020/config/volo-abp.ng.audit-logging-config.mjs +5 -0
- package/esm2020/lib/audit-logging-routing.module.mjs +41 -0
- package/esm2020/lib/audit-logging.module.mjs +95 -0
- package/esm2020/lib/components/audit-logs/audit-logs.component.mjs +113 -0
- package/esm2020/lib/components/entity-change/entity-changes.component.mjs +70 -0
- package/esm2020/lib/components/index.mjs +5 -0
- package/esm2020/lib/components/widgets/average-execution-duration-widget.component.mjs +115 -0
- package/esm2020/lib/components/widgets/error-rate-widget.component.mjs +116 -0
- package/esm2020/lib/constants/http.mjs +64 -0
- package/esm2020/lib/constants/index.mjs +2 -0
- package/esm2020/lib/defaults/default-audit-logs-entity-actions.mjs +13 -0
- package/esm2020/lib/defaults/default-audit-logs-entity-props.mjs +57 -0
- package/esm2020/lib/defaults/default-audit-logs-toolbar-actions.mjs +3 -0
- package/esm2020/lib/defaults/default-entity-changes-entity-actions.mjs +22 -0
- package/esm2020/lib/enums/components.mjs +2 -0
- package/esm2020/lib/enums/entity-change.mjs +7 -0
- package/esm2020/lib/enums/index.mjs +3 -0
- package/esm2020/lib/guards/audit-logging.guard.mjs +23 -0
- package/esm2020/lib/guards/extensions.guard.mjs +31 -0
- package/esm2020/lib/guards/index.mjs +3 -0
- package/esm2020/lib/models/audit-logging.mjs +2 -0
- package/esm2020/lib/models/config-options.mjs +2 -0
- package/esm2020/lib/models/index.mjs +3 -0
- package/esm2020/lib/tokens/entity-details.token.mjs +3 -0
- package/esm2020/lib/tokens/extensions.token.mjs +19 -0
- package/esm2020/lib/tokens/index.mjs +3 -0
- package/esm2020/proxy/lib/index.mjs +3 -0
- package/esm2020/proxy/lib/proxy/audit-logging/audit-logs.service.mjs +56 -0
- package/esm2020/proxy/lib/proxy/audit-logging/index.mjs +3 -0
- package/esm2020/proxy/lib/proxy/audit-logging/models.mjs +2 -0
- package/esm2020/proxy/lib/proxy/auditing/entity-change-type.enum.mjs +9 -0
- package/esm2020/proxy/lib/proxy/auditing/index.mjs +2 -0
- package/esm2020/proxy/public-api.mjs +2 -0
- package/esm2020/proxy/volo-abp.ng.audit-logging-proxy.mjs +5 -0
- package/esm2020/public-api.mjs +8 -0
- package/esm2020/volo-abp.ng.audit-logging.mjs +5 -0
- package/fesm2015/{volo-abp.ng.audit-logging-common.js → volo-abp.ng.audit-logging-common.mjs} +1 -1
- package/fesm2015/volo-abp.ng.audit-logging-common.mjs.map +1 -0
- package/fesm2015/{volo-abp.ng.audit-logging-config.js → volo-abp.ng.audit-logging-config.mjs} +16 -25
- package/fesm2015/volo-abp.ng.audit-logging-config.mjs.map +1 -0
- package/fesm2015/{volo-abp.ng.audit-logging-proxy.js → volo-abp.ng.audit-logging-proxy.mjs} +6 -6
- package/fesm2015/volo-abp.ng.audit-logging-proxy.mjs.map +1 -0
- package/fesm2015/volo-abp.ng.audit-logging.mjs +720 -0
- package/fesm2015/volo-abp.ng.audit-logging.mjs.map +1 -0
- package/fesm2020/volo-abp.ng.audit-logging-common.mjs +38 -0
- package/fesm2020/volo-abp.ng.audit-logging-common.mjs.map +1 -0
- package/fesm2020/volo-abp.ng.audit-logging-config.mjs +182 -0
- package/fesm2020/volo-abp.ng.audit-logging-config.mjs.map +1 -0
- package/fesm2020/volo-abp.ng.audit-logging-proxy.mjs +71 -0
- package/fesm2020/volo-abp.ng.audit-logging-proxy.mjs.map +1 -0
- package/fesm2020/volo-abp.ng.audit-logging.mjs +723 -0
- package/fesm2020/volo-abp.ng.audit-logging.mjs.map +1 -0
- package/package.json +46 -9
- package/proxy/package.json +5 -5
- package/proxy/src/lib/proxy/README.md +17 -0
- package/bundles/volo-abp.ng.audit-logging-common.umd.js +0 -1
- package/bundles/volo-abp.ng.audit-logging-config.umd.js +0 -1
- package/bundles/volo-abp.ng.audit-logging-proxy.umd.js +0 -1
- package/bundles/volo-abp.ng.audit-logging.umd.js +0 -1
- package/esm2015/common/enums/index.js +0 -1
- package/esm2015/common/enums/route-names.js +0 -1
- package/esm2015/common/public-api.js +0 -1
- package/esm2015/common/tokens/features.token.js +0 -1
- package/esm2015/common/tokens/index.js +0 -1
- package/esm2015/common/volo-abp.ng.audit-logging-common.js +0 -1
- package/esm2015/config/audit-logging-config.module.js +0 -1
- package/esm2015/config/components/entity-change-details.component.js +0 -1
- package/esm2015/config/components/entity-change-modal.component.js +0 -1
- package/esm2015/config/components/index.js +0 -1
- package/esm2015/config/enums/index.js +0 -1
- package/esm2015/config/enums/policy-names.js +0 -1
- package/esm2015/config/enums/route-names.js +0 -1
- package/esm2015/config/providers/entity-details.provider.js +0 -1
- package/esm2015/config/providers/entity-history.provider.js +0 -1
- package/esm2015/config/providers/index.js +0 -1
- package/esm2015/config/providers/route.provider.js +0 -1
- package/esm2015/config/public-api.js +0 -1
- package/esm2015/config/services/entity-change-modal.service.js +0 -1
- package/esm2015/config/services/index.js +0 -1
- package/esm2015/config/volo-abp.ng.audit-logging-config.js +0 -1
- package/esm2015/lib/audit-logging-routing.module.js +0 -1
- package/esm2015/lib/audit-logging.module.js +0 -1
- package/esm2015/lib/components/audit-logs/audit-logs.component.js +0 -1
- package/esm2015/lib/components/entity-change/entity-changes.component.js +0 -1
- package/esm2015/lib/components/index.js +0 -1
- package/esm2015/lib/components/widgets/average-execution-duration-widget.component.js +0 -1
- package/esm2015/lib/components/widgets/error-rate-widget.component.js +0 -1
- package/esm2015/lib/constants/http.js +0 -1
- package/esm2015/lib/constants/index.js +0 -1
- package/esm2015/lib/defaults/default-audit-logs-entity-actions.js +0 -1
- package/esm2015/lib/defaults/default-audit-logs-entity-props.js +0 -1
- package/esm2015/lib/defaults/default-audit-logs-toolbar-actions.js +0 -1
- package/esm2015/lib/defaults/default-entity-changes-entity-actions.js +0 -1
- package/esm2015/lib/enums/components.js +0 -1
- package/esm2015/lib/enums/entity-change.js +0 -1
- package/esm2015/lib/enums/index.js +0 -1
- package/esm2015/lib/guards/audit-logging.guard.js +0 -1
- package/esm2015/lib/guards/extensions.guard.js +0 -1
- package/esm2015/lib/guards/index.js +0 -1
- package/esm2015/lib/models/audit-logging.js +0 -1
- package/esm2015/lib/models/config-options.js +0 -1
- package/esm2015/lib/models/index.js +0 -1
- package/esm2015/lib/tokens/entity-details.token.js +0 -1
- package/esm2015/lib/tokens/extensions.token.js +0 -1
- package/esm2015/lib/tokens/index.js +0 -1
- package/esm2015/proxy/lib/index.js +0 -1
- package/esm2015/proxy/lib/proxy/audit-logging/audit-logs.service.js +0 -1
- package/esm2015/proxy/lib/proxy/audit-logging/index.js +0 -1
- package/esm2015/proxy/lib/proxy/audit-logging/models.js +0 -1
- package/esm2015/proxy/lib/proxy/auditing/entity-change-type.enum.js +0 -1
- package/esm2015/proxy/lib/proxy/auditing/index.js +0 -1
- package/esm2015/proxy/public-api.js +0 -1
- package/esm2015/proxy/volo-abp.ng.audit-logging-proxy.js +0 -1
- package/esm2015/public-api.js +0 -1
- package/esm2015/volo-abp.ng.audit-logging.js +0 -1
- package/fesm2015/volo-abp.ng.audit-logging.js +0 -729
|
@@ -1,729 +0,0 @@
|
|
|
1
|
-
import * as i3$1 from '@abp/ng.components/chart.js';
|
|
2
|
-
import { ChartComponent, ChartModule } from '@abp/ng.components/chart.js';
|
|
3
|
-
import * as i3 from '@abp/ng.components/page';
|
|
4
|
-
import { PageModule } from '@abp/ng.components/page';
|
|
5
|
-
import * as i1 from '@abp/ng.core';
|
|
6
|
-
import { mapEnumToOptions, ListService, ConfigStateService, DynamicLayoutComponent, AuthGuard, PermissionGuard, ReplaceableRouteContainerComponent, LazyModuleFactory, CoreModule } from '@abp/ng.core';
|
|
7
|
-
import * as i8 from '@abp/ng.theme.shared';
|
|
8
|
-
import { collapse, fadeIn, ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
9
|
-
import * as i0 from '@angular/core';
|
|
10
|
-
import { Component, ChangeDetectionStrategy, Injectable, Inject, InjectionToken, NgModule, Output, Input, ViewChild } from '@angular/core';
|
|
11
|
-
import * as i7 from '@ng-bootstrap/ng-bootstrap';
|
|
12
|
-
import { NgbDateAdapter, NgbNavModule, NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap';
|
|
13
|
-
import { SHOW_ENTITY_HISTORY, CommercialUiModule } from '@volo/abp.commercial.ng.ui';
|
|
14
|
-
import * as i1$2 from '@angular/router';
|
|
15
|
-
import { RouterModule } from '@angular/router';
|
|
16
|
-
import * as i5 from '@abp/ng.theme.shared/extensions';
|
|
17
|
-
import { EXTENSIONS_IDENTIFIER, DateAdapter, EntityAction, EntityProp, ToolbarAction, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps } from '@abp/ng.theme.shared/extensions';
|
|
18
|
-
import { trigger, transition, useAnimation } from '@angular/animations';
|
|
19
|
-
import * as i2$1 from '@volo/abp.ng.audit-logging/proxy';
|
|
20
|
-
import { EntityChangeType } from '@volo/abp.ng.audit-logging/proxy';
|
|
21
|
-
import { take, map, tap, mapTo } from 'rxjs/operators';
|
|
22
|
-
import * as i2 from '@angular/forms';
|
|
23
|
-
import * as i4 from '@swimlane/ngx-datatable';
|
|
24
|
-
import * as i9 from '@angular/common';
|
|
25
|
-
import { AUDIT_LOGGING_FEATURES } from '@volo/abp.ng.audit-logging/common';
|
|
26
|
-
import * as i1$1 from 'rxjs';
|
|
27
|
-
import { of, BehaviorSubject } from 'rxjs';
|
|
28
|
-
|
|
29
|
-
const HTTP_METHODS = ['GET', 'POST', 'DELETE', 'PUT', 'HEAD', 'CONNECT', 'OPTIONS', 'TRACE'];
|
|
30
|
-
const HTTP_STATUS_CODES = [
|
|
31
|
-
{ code: 100, message: 'Continue' },
|
|
32
|
-
{ code: 101, message: 'Switching Protocols' },
|
|
33
|
-
{ code: 102, message: 'Processing' },
|
|
34
|
-
{ code: 103, message: 'Early Hints' },
|
|
35
|
-
{ code: 200, message: 'OK' },
|
|
36
|
-
{ code: 201, message: 'Created' },
|
|
37
|
-
{ code: 202, message: 'Accepted' },
|
|
38
|
-
{ code: 203, message: 'Non-authoritative Information' },
|
|
39
|
-
{ code: 204, message: 'No Content' },
|
|
40
|
-
{ code: 205, message: 'Reset Content' },
|
|
41
|
-
{ code: 206, message: 'Partial Content' },
|
|
42
|
-
{ code: 207, message: 'Multi-Status' },
|
|
43
|
-
{ code: 208, message: 'Already Registered' },
|
|
44
|
-
{ code: 226, message: 'IM Used' },
|
|
45
|
-
{ code: 300, message: 'Multiple Choices' },
|
|
46
|
-
{ code: 301, message: 'Moved Permanently' },
|
|
47
|
-
{ code: 302, message: 'Found' },
|
|
48
|
-
{ code: 303, message: 'See Other' },
|
|
49
|
-
{ code: 304, message: 'Not Modified' },
|
|
50
|
-
{ code: 305, message: 'Use Proxy' },
|
|
51
|
-
{ code: 306, message: 'Switch Proxy' },
|
|
52
|
-
{ code: 307, message: 'Temporary Redirect' },
|
|
53
|
-
{ code: 308, message: 'Permanent Redirect' },
|
|
54
|
-
{ code: 400, message: 'Bad Request' },
|
|
55
|
-
{ code: 401, message: 'Unauthorized' },
|
|
56
|
-
{ code: 402, message: 'Payment Required' },
|
|
57
|
-
{ code: 403, message: 'Forbidden' },
|
|
58
|
-
{ code: 404, message: 'Not Found' },
|
|
59
|
-
{ code: 405, message: 'Method Not Allowed' },
|
|
60
|
-
{ code: 406, message: 'Not Acceptable' },
|
|
61
|
-
{ code: 407, message: 'Proxy Authentication Required' },
|
|
62
|
-
{ code: 408, message: 'Request Timeout' },
|
|
63
|
-
{ code: 409, message: 'Conflict' },
|
|
64
|
-
{ code: 410, message: 'Gone' },
|
|
65
|
-
{ code: 411, message: 'Length Required' },
|
|
66
|
-
{ code: 412, message: 'Precondition Failed' },
|
|
67
|
-
{ code: 413, message: 'Payload Too Large' },
|
|
68
|
-
{ code: 414, message: 'Request-URI Too Long' },
|
|
69
|
-
{ code: 415, message: 'Unsupported Media Type' },
|
|
70
|
-
{ code: 416, message: 'Requested Range Not Satisfiable' },
|
|
71
|
-
{ code: 417, message: 'Expectation Failed' },
|
|
72
|
-
{ code: 421, message: 'Misdirected Request' },
|
|
73
|
-
{ code: 423, message: 'Locked' },
|
|
74
|
-
{ code: 424, message: 'Failed Dependency' },
|
|
75
|
-
{ code: 426, message: 'Upgrade Required' },
|
|
76
|
-
{ code: 428, message: 'Precondition Required' },
|
|
77
|
-
{ code: 429, message: 'Too Many Requests' },
|
|
78
|
-
{ code: 431, message: 'Request Header Fields Too Large' },
|
|
79
|
-
{ code: 451, message: 'Unavailable For Legal Reasons' },
|
|
80
|
-
{ code: 500, message: 'Internal Server Error' },
|
|
81
|
-
{ code: 501, message: 'Not Implemented' },
|
|
82
|
-
{ code: 502, message: 'Bad Gateway' },
|
|
83
|
-
{ code: 503, message: 'Service Unavailable' },
|
|
84
|
-
{ code: 504, message: 'Gateway Timeout' },
|
|
85
|
-
{ code: 505, message: 'HTTP Version Not Supported' },
|
|
86
|
-
{ code: 506, message: 'Variant Also Negotiates' },
|
|
87
|
-
{ code: 507, message: 'Insufficient Storage' },
|
|
88
|
-
{ code: 508, message: 'Loop Detected' },
|
|
89
|
-
{ code: 510, message: 'Not Extended' },
|
|
90
|
-
{ code: 511, message: 'Network Authentication Required' },
|
|
91
|
-
];
|
|
92
|
-
|
|
93
|
-
class EntityChangesComponent {
|
|
94
|
-
constructor(list, fb, auditLogsService, track) {
|
|
95
|
-
this.list = list;
|
|
96
|
-
this.fb = fb;
|
|
97
|
-
this.auditLogsService = auditLogsService;
|
|
98
|
-
this.track = track;
|
|
99
|
-
this.form = this.fb.group({
|
|
100
|
-
entityChangeType: [''],
|
|
101
|
-
entityTypeFullName: [''],
|
|
102
|
-
startDate: [''],
|
|
103
|
-
endDate: [''],
|
|
104
|
-
});
|
|
105
|
-
this.response = { items: [], totalCount: 0 };
|
|
106
|
-
this.changeType = EntityChangeType;
|
|
107
|
-
this.changeTypes = mapEnumToOptions(EntityChangeType);
|
|
108
|
-
}
|
|
109
|
-
get data() {
|
|
110
|
-
return this.response.items;
|
|
111
|
-
}
|
|
112
|
-
get count() {
|
|
113
|
-
return this.response.totalCount;
|
|
114
|
-
}
|
|
115
|
-
ngAfterViewInit() {
|
|
116
|
-
this.hookToQuery();
|
|
117
|
-
}
|
|
118
|
-
hookToQuery() {
|
|
119
|
-
this.list
|
|
120
|
-
.hookToQuery(query => this.auditLogsService.getEntityChanges(Object.assign(Object.assign({}, this.form.value), query)))
|
|
121
|
-
.subscribe(res => (this.response = res));
|
|
122
|
-
}
|
|
123
|
-
handleSubmit() {
|
|
124
|
-
this.list.get();
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
EntityChangesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: EntityChangesComponent, deps: [{ token: i1.ListService }, { token: i2.FormBuilder }, { token: i2$1.AuditLogsService }, { token: i1.TrackByService }], target: i0.ɵɵFactoryTarget.Component });
|
|
128
|
-
EntityChangesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: EntityChangesComponent, selector: "abp-entity-changes", providers: [
|
|
129
|
-
ListService,
|
|
130
|
-
{
|
|
131
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
132
|
-
useValue: "AuditLogging.EntityChangesComponent" /* EntityChanges */,
|
|
133
|
-
},
|
|
134
|
-
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
135
|
-
], ngImport: i0, template: "<div class=\"card\">\n <div class=\"card-body pb-lg-3\">\n <form [formGroup]=\"form\" (ngSubmit)=\"handleSubmit()\">\n <div class=\"row\">\n <div class=\"col-md-6 col-xl-3\">\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"start-date\">{{\n 'AbpAuditLogging::EntityChangeStartTime' | abpLocalization\n }}</label\n ><input\n ngbDatepicker\n #pickerStart=\"ngbDatepicker\"\n id=\"start-date\"\n class=\"form-control\"\n formControlName=\"startDate\"\n readonly\n (click)=\"pickerStart.toggle()\"\n (keyup.space)=\"pickerStart.open()\"\n />\n </div>\n </div>\n <div class=\"col-md-6 col-xl-3\">\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"end-date\">{{\n 'AbpAuditLogging::EntityChangeEndTime' | abpLocalization\n }}</label\n ><input\n ngbDatepicker\n #pickerEnd=\"ngbDatepicker\"\n id=\"end-date\"\n class=\"form-control\"\n formControlName=\"endDate\"\n readonly\n (click)=\"pickerEnd.toggle()\"\n (keyup.space)=\"pickerEnd.open()\"\n />\n </div>\n </div>\n <div class=\"col-md-6 col-xl-3\">\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"change-type\">{{\n 'AbpAuditLogging::ChangeType' | abpLocalization\n }}</label\n ><select\n id=\"change-type\"\n class=\"form-select form-control\"\n formControlName=\"entityChangeType\"\n (change)=\"handleSubmit()\"\n >\n <option [ngValue]=\"\"></option>\n <option\n *ngFor=\"let type of changeTypes; trackBy: track.by('id')\"\n [ngValue]=\"type.value\"\n >\n {{ 'AbpAuditLogging::' + type.key | abpLocalization }}\n </option>\n </select>\n </div>\n </div>\n <div class=\"col-md-6 col-xl-3\">\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"entity-type-full-name\">{{\n 'AbpAuditLogging::EntityTypeFullName' | abpLocalization\n }}</label\n ><input\n id=\"entity-type-full-name\"\n type=\"text\"\n class=\"form-control\"\n formControlName=\"entityTypeFullName\"\n />\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 d-grid d-md-block text-end\">\n <button type=\"submit\" class=\"btn btn-primary\">\n <span>\n {{ 'AbpAuditLogging::Refresh' | abpLocalization }}\n </span>\n </button>\n </div>\n </div>\n </form>\n </div>\n</div>\n<div class=\"card\">\n <div class=\"card-body p-0\">\n <ngx-datatable default [rows]=\"data\" [count]=\"count\" [list]=\"list\">\n <ngx-datatable-column\n [name]=\"'AbpAuditLogging::Detail' | abpLocalization\"\n [maxWidth]=\"150\"\n [width]=\"150\"\n [sortable]=\"false\"\n >\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\n <abp-grid-actions\n [index]=\"i\"\n [record]=\"row\"\n text=\"AbpAuditLogging::Actions\"\n ></abp-grid-actions>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column\n [name]=\"'AbpAuditLogging::Time' | abpLocalization\"\n [width]=\"230\"\n prop=\"changeTime\"\n >\n </ngx-datatable-column>\n <ngx-datatable-column\n [name]=\"'AbpAuditLogging::ChangeType' | abpLocalization\"\n [width]=\"140\"\n [sortable]=\"false\"\n >\n <ng-template let-row=\"row\" ngx-datatable-cell-template>\n {{ 'AbpAuditLogging::' + changeType[row.changeType] | abpLocalization }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column name=\"TenantId\" [width]=\"150\" [sortable]=\"false\">\n <ng-template let-row=\"row\" ngx-datatable-cell-template>\n <div abpEllipsis>{{ row.tenantId }}</div>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column\n [name]=\"'AbpAuditLogging::EntityTypeFullName' | abpLocalization\"\n [width]=\"150\"\n [sortable]=\"false\"\n >\n <ng-template let-row=\"row\" ngx-datatable-cell-template>\n <div abpEllipsis>{{ row.entityTypeFullName }}</div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n</div>\n", components: [{ type: i4.DatatableComponent, selector: "ngx-datatable", inputs: ["selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "loadingIndicator", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "groupExpansionDefault", "selectAllRowsOnPage", "virtualization", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity", "rows", "groupedRows", "groupRowsBy", "columns", "limit", "count", "offset", "targetMarkerTemplate", "selectionType", "rowClass", "selectCheck", "displayCheck", "trackByProp", "treeFromRelation", "treeToRelation"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { type: i5.GridActionsComponent, selector: "abp-grid-actions", inputs: ["icon", "index", "text"], exportAs: ["abpGridActions"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit"], outputs: ["ngSubmit"] }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["disabled", "autoClose", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekdays", "showWeekNumbers", "startDate", "container", "positionTarget"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: ["class"], exportAs: ["ngxDatatableDefault"] }, { type: i8.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { type: i4.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { type: i4.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { type: i8.EllipsisDirective, selector: "[abpEllipsis]", inputs: ["abpEllipsis", "title", "abpEllipsisEnabled"] }], pipes: { "abpLocalization": i1.LocalizationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: EntityChangesComponent, decorators: [{
|
|
137
|
-
type: Component,
|
|
138
|
-
args: [{
|
|
139
|
-
selector: 'abp-entity-changes',
|
|
140
|
-
templateUrl: './entity-changes.component.html',
|
|
141
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
142
|
-
providers: [
|
|
143
|
-
ListService,
|
|
144
|
-
{
|
|
145
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
146
|
-
useValue: "AuditLogging.EntityChangesComponent" /* EntityChanges */,
|
|
147
|
-
},
|
|
148
|
-
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
149
|
-
],
|
|
150
|
-
}]
|
|
151
|
-
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: i2.FormBuilder }, { type: i2$1.AuditLogsService }, { type: i1.TrackByService }]; } });
|
|
152
|
-
|
|
153
|
-
class AuditLogsComponent {
|
|
154
|
-
constructor(list, service) {
|
|
155
|
-
this.list = list;
|
|
156
|
-
this.service = service;
|
|
157
|
-
this.data = { items: [], totalCount: 0 };
|
|
158
|
-
this.selected = {};
|
|
159
|
-
this.pageQuery = {
|
|
160
|
-
maxResultCount: 10,
|
|
161
|
-
skipCount: 0,
|
|
162
|
-
};
|
|
163
|
-
this.httpMethods = HTTP_METHODS;
|
|
164
|
-
this.httpStatusCodes = HTTP_STATUS_CODES;
|
|
165
|
-
this.modalVisible = false;
|
|
166
|
-
this.collapseActionStates = [true];
|
|
167
|
-
this.collapseChangeStates = [true];
|
|
168
|
-
this.sortOrder = '';
|
|
169
|
-
this.sortKey = '';
|
|
170
|
-
this.selectedTab = 'audit-logs';
|
|
171
|
-
}
|
|
172
|
-
ngOnInit() {
|
|
173
|
-
this.hookToQuery();
|
|
174
|
-
}
|
|
175
|
-
hookToQuery() {
|
|
176
|
-
this.list
|
|
177
|
-
.hookToQuery(query => this.service.getList(Object.assign(Object.assign(Object.assign(Object.assign({}, this.pageQuery), (this.pageQuery.minExecutionDuration === null && {
|
|
178
|
-
minExecutionDuration: undefined,
|
|
179
|
-
})), (this.pageQuery.maxExecutionDuration === null && {
|
|
180
|
-
maxExecutionDuration: undefined,
|
|
181
|
-
})), query)))
|
|
182
|
-
.subscribe(res => (this.data = res));
|
|
183
|
-
}
|
|
184
|
-
openModal(id) {
|
|
185
|
-
this.service
|
|
186
|
-
.get(id)
|
|
187
|
-
.pipe(take(1))
|
|
188
|
-
.subscribe(log => {
|
|
189
|
-
this.selected = log;
|
|
190
|
-
this.modalVisible = true;
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
httpCodeClass(httpStatusCode) {
|
|
194
|
-
switch (httpStatusCode === null || httpStatusCode === void 0 ? void 0 : httpStatusCode.toString()[0]) {
|
|
195
|
-
case '2':
|
|
196
|
-
return 'badge-success';
|
|
197
|
-
case '3':
|
|
198
|
-
return 'badge-warning';
|
|
199
|
-
case '4':
|
|
200
|
-
case '5':
|
|
201
|
-
return 'badge-danger';
|
|
202
|
-
default:
|
|
203
|
-
return 'badge-light';
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
httpMethodClass(httpMethod) {
|
|
207
|
-
switch (httpMethod) {
|
|
208
|
-
case 'GET':
|
|
209
|
-
return 'badge-info';
|
|
210
|
-
case 'POST':
|
|
211
|
-
return 'badge-success';
|
|
212
|
-
case 'DELETE':
|
|
213
|
-
return 'badge-danger';
|
|
214
|
-
case 'PUT':
|
|
215
|
-
return 'badge-warning';
|
|
216
|
-
default:
|
|
217
|
-
return '';
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
AuditLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLogsComponent, deps: [{ token: i1.ListService }, { token: i2$1.AuditLogsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
222
|
-
AuditLogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: AuditLogsComponent, selector: "abp-audit-logs", providers: [
|
|
223
|
-
ListService,
|
|
224
|
-
{
|
|
225
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
226
|
-
useValue: "AuditLogging.AuditLogsComponent" /* AuditLogs */,
|
|
227
|
-
},
|
|
228
|
-
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
229
|
-
], ngImport: i0, template: "<div id=\"wrapper\">\n <abp-page [title]=\"'AbpAuditLogging::AuditLogs' | abpLocalization\" [toolbar]=\"data.items\">\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a\n class=\"nav-link pointer\"\n [class.active]=\"selectedTab === 'audit-logs'\"\n (click)=\"selectedTab = 'audit-logs'\"\n >{{ 'AbpAuditLogging::AuditLogs' | abpLocalization }}</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link pointer\"\n [class.active]=\"selectedTab === 'entity-changes'\"\n (click)=\"selectedTab = 'entity-changes'\"\n >{{ 'AbpAuditLogging::EntityChanges' | abpLocalization }}</a\n >\n </li>\n </ul>\n <div class=\"tab-content\" [class.p-0]=\"selectedTab !== 'audit-logs'\">\n <div class=\"tab-pane\" [class.active]=\"selectedTab === 'audit-logs'\" [@fadeIn]=\"selectedTab\">\n <div class=\"card\">\n <div class=\"card-body pb-lg-3\">\n <form (keyup.enter)=\"list.get()\">\n <div class=\"row\">\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"mb-3\">\n <label for=\"startTime\" class=\"form-label\">{{\n 'AbpAuditLogging::StartTime' | abpLocalization\n }}</label\n ><input\n #startTime=\"ngbDatepicker\"\n class=\"form-control\"\n id=\"startTime\"\n name=\"startTime\"\n readonly\n [(ngModel)]=\"pageQuery.startTime\"\n ngbDatepicker\n (click)=\"startTime.toggle()\"\n />\n </div>\n </div>\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"mb-3\">\n <label for=\"endTime\" class=\"form-label\">{{\n 'AbpAuditLogging::EndTime' | abpLocalization\n }}</label\n ><input\n #endTime=\"ngbDatepicker\"\n class=\"form-control\"\n id=\"endTime\"\n name=\"endTime\"\n readonly\n [(ngModel)]=\"pageQuery.endTime\"\n ngbDatepicker\n (click)=\"endTime.toggle()\"\n />\n </div>\n </div>\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"mb-3\">\n <label for=\"userName\" class=\"form-label\">{{\n 'AbpAuditLogging::UserName' | abpLocalization\n }}</label\n ><input\n id=\"userName\"\n type=\"text\"\n class=\"form-control\"\n [(ngModel)]=\"pageQuery.userName\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n </div>\n </div>\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"url\">{{\n 'AbpAuditLogging::UrlFilter' | abpLocalization\n }}</label\n ><input\n id=\"url\"\n type=\"text\"\n class=\"form-control\"\n [(ngModel)]=\"pageQuery.url\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n </div>\n </div>\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"mb-3\">\n <label for=\"minDuration\" class=\"form-label\">{{\n 'AbpAuditLogging::MinDuration' | abpLocalization\n }}</label\n ><input\n id=\"minDuration\"\n type=\"number\"\n class=\"form-control\"\n [(ngModel)]=\"pageQuery.minExecutionDuration\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n </div>\n </div>\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"mb-3\">\n <label for=\"maxDuration\" class=\"form-label\">{{\n 'AbpAuditLogging::MaxDuration' | abpLocalization\n }}</label\n ><input\n id=\"maxDuration\"\n type=\"number\"\n class=\"form-control\"\n [(ngModel)]=\"pageQuery.maxExecutionDuration\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n </div>\n </div>\n </div>\n <div class=\"row justify-content-end\">\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"mb-3\">\n <label for=\"httpMethod\" class=\"form-label\">{{\n 'AbpAuditLogging::HttpMethod' | abpLocalization\n }}</label\n ><select\n id=\"httpMethod\"\n class=\"form-select form-control\"\n [(ngModel)]=\"pageQuery.httpMethod\"\n [ngModelOptions]=\"{ standalone: true }\"\n (change)=\"list.get()\"\n >\n <option [ngValue]=\"\"></option>\n <option *ngFor=\"let method of httpMethods\" [ngValue]=\"method\">\n {{ method }}\n </option>\n </select>\n </div>\n </div>\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"mb-3\">\n <label for=\"httpStatusCode\" class=\"form-label\">{{\n 'AbpAuditLogging::HttpStatusCode' | abpLocalization\n }}</label\n ><select\n id=\"httpStatusCode\"\n class=\"form-select form-control\"\n [(ngModel)]=\"pageQuery.httpStatusCode\"\n [ngModelOptions]=\"{ standalone: true }\"\n (change)=\"list.get()\"\n >\n <option [ngValue]=\"\"></option>\n <option *ngFor=\"let h of httpStatusCodes\" [ngValue]=\"h.code\">\n {{ h.code }} - {{ h.message }}\n </option>\n </select>\n </div>\n </div>\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"mb-3 mb-lg-0\">\n <label for=\"applicationName\" class=\"form-label\">{{\n 'AbpAuditLogging::ApplicationName' | abpLocalization\n }}</label\n ><input\n id=\"applicationName\"\n type=\"text\"\n class=\"form-control\"\n [(ngModel)]=\"pageQuery.applicationName\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n </div>\n </div>\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"mb-3 mb-lg-0\">\n <label for=\"correlationId\" class=\"form-label\">{{\n 'AbpAuditLogging::ClientIpAddress' | abpLocalization\n }}</label\n ><input\n id=\"clientIpAddress\"\n type=\"text\"\n class=\"form-control\"\n [(ngModel)]=\"pageQuery.clientIpAddress\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n </div>\n </div>\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"mb-3 mb-lg-0\">\n <label for=\"correlationId\" class=\"form-label\">{{\n 'AbpAuditLogging::CorrelationId' | abpLocalization\n }}</label\n ><input\n id=\"correlationId\"\n type=\"text\"\n class=\"form-control\"\n [(ngModel)]=\"pageQuery.correlationId\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n </div>\n </div>\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"mb-3 mb-lg-0\">\n <label for=\"hasException\" class=\"form-label\">{{\n 'AbpAuditLogging::HasException' | abpLocalization\n }}</label>\n <select\n name=\"hasException\"\n id=\"hasException\"\n class=\"form-select form-control\"\n [(ngModel)]=\"pageQuery.hasException\"\n [ngModelOptions]=\"{ standalone: true }\"\n (change)=\"list.get()\"\n >\n <option [ngValue]=\"\"></option>\n <option [ngValue]=\"true\">\n {{ 'AbpAuditLogging::Yes' | abpLocalization }}\n </option>\n <option [ngValue]=\"false\">\n {{ 'AbpAuditLogging::No' | abpLocalization }}\n </option>\n </select>\n </div>\n </div>\n <div class=\"col-md-6 col-lg-2 d-grid\">\n <button type=\"button\" class=\"btn btn-primary mt-0\" (click)=\"list.get()\">\n <span>\n {{ 'AbpAuditLogging::Refresh' | abpLocalization }}\n </span>\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n <div class=\"card\">\n <div class=\"card-body p-0\">\n <abp-extensible-table\n [data]=\"data.items\"\n [recordsTotal]=\"data.totalCount\"\n [list]=\"list\"\n ></abp-extensible-table>\n </div>\n </div>\n </div>\n </div>\n <div class=\"tab-content\" [class.p-0]=\"selectedTab !== 'entity-changes'\">\n <div\n class=\"tab-pane\"\n [class.active]=\"selectedTab === 'entity-changes'\"\n [@fadeIn]=\"selectedTab\"\n >\n <abp-entity-changes *ngIf=\"selectedTab === 'entity-changes'\"></abp-entity-changes>\n </div>\n </div>\n </abp-page>\n</div>\n\n<abp-modal *ngIf=\"selected\" [(visible)]=\"modalVisible\" [options]=\"{ size: 'lg' }\">\n <ng-template #abpHeader>\n <h5 class=\"modal-title\">\n {{ 'AbpAuditLogging::Detail' | abpLocalization }}\n </h5>\n </ng-template>\n <ng-template #abpBody>\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\n <li ngbNavItem>\n <a ngbNavLink>{{ 'AbpAuditLogging::Overall' | abpLocalization }}</a>\n <ng-template ngbNavContent>\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::HttpStatusCode' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">\n <span class=\"badge\" [ngClass]=\"httpCodeClass(selected.httpStatusCode)\">{{\n selected.httpStatusCode\n }}</span>\n </div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::HttpMethod' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">\n <span class=\"badge\" [ngClass]=\"httpMethodClass(selected.httpMethod)\">{{\n selected.httpMethod\n }}</span>\n </div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::Url' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">{{ selected.url }}</div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::ClientIpAddress' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">{{ selected.clientIpAddress }}</div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::ClientName' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">{{ selected.clientName }}</div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::Exceptions' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">\n <pre lang=\"c-sharp\">\n {{ selected.exceptions }}\n </pre>\n </div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::UserName' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">{{ selected.userName }}</div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::Time' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">{{ selected.executionTime }}</div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::Duration' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">{{ selected.executionDuration }}</div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::BrowserInfo' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">{{ selected.browserInfo }}</div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::ApplicationName' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">{{ selected.applicationName }}</div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::CorrelationId' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">{{ selected.correlationId }}</div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::Comments' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">{{ selected.comments }}</div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::ExtraProperties' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">\n <pre lang=\"json\" class=\"p-2\">\n {{ selected.extraProperties | json }}\n </pre>\n </div>\n </div>\n </ng-template>\n </li>\n <li ngbNavItem>\n <a ngbNavLink\n >{{ 'AbpAuditLogging::Actions' | abpLocalization }} ({{ selected.actions.length }})</a\n >\n <ng-template ngbNavContent>\n <div\n class=\"mb-3 border border-dark rounded\"\n *ngFor=\"let action of selected.actions; let i = index\"\n >\n <div class=\"d-grid\">\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n (click)=\"collapseActionStates[i] = !collapseActionStates[i]\"\n >\n {{ action.serviceName }}\n </button>\n </div>\n <div [@collapse]=\"collapseActionStates[i] ? 'expanded' : 'collapsed'\">\n <div class=\"m-3\">\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::Duration' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">\n {{ action.executionDuration ? action.executionDuration + ' ms' : '' }}\n </div>\n </div>\n <hr />\n <div class=\"row\">\n <div class=\"col-form-label col col-lg-3\">\n <strong>{{ 'AbpAuditLogging::Parameters' | abpLocalization }}</strong>\n </div>\n <div class=\"col-form-label col col-lg-9\">\n <pre lang=\"json\" class=\"p-2\">{{ action.parameters }}</pre>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\"></div>\n </ng-template>\n <ng-template #abpFooter>\n <button class=\"btn btn-secondary\" abpClose>\n {{ 'AbpAuditLogging::Close' | abpLocalization }}\n </button>\n </ng-template>\n</abp-modal>\n", components: [{ type: i3.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { type: i5.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: EntityChangesComponent, selector: "abp-entity-changes" }, { type: i8.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i7.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["disabled", "autoClose", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekdays", "showWeekNumbers", "startDate", "container", "positionTarget"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgbNav, selector: "[ngbNav]", inputs: ["destroyOnHide", "orientation", "roles", "keyboard", "activeId"], outputs: ["activeIdChange", "navChange"], exportAs: ["ngbNav"] }, { type: i7.NgbNavItem, selector: "[ngbNavItem]", inputs: ["disabled", "domId", "destroyOnHide", "ngbNavItem"], exportAs: ["ngbNavItem"] }, { type: i7.NgbNavLink, selector: "a[ngbNavLink]" }, { type: i7.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.ModalCloseDirective, selector: "[abpClose]" }], pipes: { "abpLocalization": i1.LocalizationPipe, "json": i9.JsonPipe }, animations: [collapse, trigger('fadeIn', [transition('* <=> *', useAnimation(fadeIn))])] });
|
|
230
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLogsComponent, decorators: [{
|
|
231
|
-
type: Component,
|
|
232
|
-
args: [{
|
|
233
|
-
selector: 'abp-audit-logs',
|
|
234
|
-
templateUrl: './audit-logs.component.html',
|
|
235
|
-
animations: [collapse, trigger('fadeIn', [transition('* <=> *', useAnimation(fadeIn))])],
|
|
236
|
-
providers: [
|
|
237
|
-
ListService,
|
|
238
|
-
{
|
|
239
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
240
|
-
useValue: "AuditLogging.AuditLogsComponent" /* AuditLogs */,
|
|
241
|
-
},
|
|
242
|
-
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
243
|
-
],
|
|
244
|
-
}]
|
|
245
|
-
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: i2$1.AuditLogsService }]; } });
|
|
246
|
-
|
|
247
|
-
class AuditLoggingGuard {
|
|
248
|
-
constructor(auditLoggingFeatures) {
|
|
249
|
-
this.auditLoggingFeatures = auditLoggingFeatures;
|
|
250
|
-
}
|
|
251
|
-
canActivate() {
|
|
252
|
-
return this.auditLoggingFeatures.pipe(map(features => features.enable));
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
AuditLoggingGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingGuard, deps: [{ token: AUDIT_LOGGING_FEATURES }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
256
|
-
AuditLoggingGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingGuard });
|
|
257
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingGuard, decorators: [{
|
|
258
|
-
type: Injectable
|
|
259
|
-
}], ctorParameters: function () { return [{ type: i1$1.Observable, decorators: [{
|
|
260
|
-
type: Inject,
|
|
261
|
-
args: [AUDIT_LOGGING_FEATURES]
|
|
262
|
-
}] }]; } });
|
|
263
|
-
|
|
264
|
-
const DEFAULT_AUDIT_LOGS_ENTITY_ACTIONS = EntityAction.createMany([
|
|
265
|
-
{
|
|
266
|
-
text: 'AbpAuditLogging::Detail',
|
|
267
|
-
action: data => {
|
|
268
|
-
const component = data.getInjected(AuditLogsComponent);
|
|
269
|
-
component.openModal(data.record.id);
|
|
270
|
-
},
|
|
271
|
-
icon: 'fa fa-search',
|
|
272
|
-
},
|
|
273
|
-
]);
|
|
274
|
-
|
|
275
|
-
const DEFAULT_AUDIT_LOGS_ENTITY_PROPS = EntityProp.createMany([
|
|
276
|
-
{
|
|
277
|
-
type: "string" /* String */,
|
|
278
|
-
name: 'url',
|
|
279
|
-
displayName: 'AbpAuditLogging::HttpRequest',
|
|
280
|
-
sortable: true,
|
|
281
|
-
columnWidth: 600,
|
|
282
|
-
valueResolver: data => {
|
|
283
|
-
const component = data.getInjected(AuditLogsComponent);
|
|
284
|
-
const { httpMethod, httpStatusCode, url } = data.record;
|
|
285
|
-
const methodClass = component.httpMethodClass(httpMethod);
|
|
286
|
-
const statusClass = component.httpCodeClass(httpStatusCode);
|
|
287
|
-
return of(`<span class="badge ${statusClass} me-1">${httpStatusCode}</span>` +
|
|
288
|
-
`<span class="badge ${methodClass} me-1">${httpMethod}</span>` +
|
|
289
|
-
(url || ''));
|
|
290
|
-
},
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
type: "string" /* String */,
|
|
294
|
-
name: 'userName',
|
|
295
|
-
displayName: 'AbpAuditLogging::User',
|
|
296
|
-
sortable: true,
|
|
297
|
-
columnWidth: 150,
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
type: "string" /* String */,
|
|
301
|
-
name: 'clientIpAddress',
|
|
302
|
-
displayName: 'AbpAuditLogging::IpAddress',
|
|
303
|
-
sortable: true,
|
|
304
|
-
columnWidth: 150,
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
type: "dateTime" /* DateTime */,
|
|
308
|
-
name: 'executionTime',
|
|
309
|
-
displayName: 'AbpAuditLogging::Time',
|
|
310
|
-
sortable: true,
|
|
311
|
-
columnWidth: 150,
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
type: "number" /* Number */,
|
|
315
|
-
name: 'executionDuration',
|
|
316
|
-
displayName: 'AbpAuditLogging::Duration',
|
|
317
|
-
sortable: true,
|
|
318
|
-
columnWidth: 150,
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
type: "string" /* String */,
|
|
322
|
-
name: 'applicationName',
|
|
323
|
-
displayName: 'AbpAuditLogging::ApplicationName',
|
|
324
|
-
sortable: true,
|
|
325
|
-
columnWidth: 200,
|
|
326
|
-
},
|
|
327
|
-
]);
|
|
328
|
-
|
|
329
|
-
const DEFAULT_AUDIT_LOGS_TOOLBAR_ACTIONS = ToolbarAction.createMany([]);
|
|
330
|
-
|
|
331
|
-
const SHOW_ENTITY_DETAILS = new InjectionToken('SHOW_ENTITY_DETAILS');
|
|
332
|
-
|
|
333
|
-
const DEFAULT_ENTITY_CHANGES_ENTITY_ACTIONS = EntityAction.createMany([
|
|
334
|
-
{
|
|
335
|
-
text: 'AbpAuditLogging::ChangeDetails',
|
|
336
|
-
action: data => {
|
|
337
|
-
const showDetails = data.getInjected(SHOW_ENTITY_DETAILS);
|
|
338
|
-
showDetails(data.record.id);
|
|
339
|
-
},
|
|
340
|
-
icon: 'fa fa-search',
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
text: 'AbpAuditLogging::FullChangeHistory',
|
|
344
|
-
action: data => {
|
|
345
|
-
const showHistory = data.getInjected(SHOW_ENTITY_HISTORY);
|
|
346
|
-
showHistory(data.record.entityId, data.record.entityTypeFullName);
|
|
347
|
-
},
|
|
348
|
-
icon: 'fa fa-history',
|
|
349
|
-
},
|
|
350
|
-
]);
|
|
351
|
-
|
|
352
|
-
const DEFAULT_AUDIT_LOGGING_ENTITY_ACTIONS = {
|
|
353
|
-
["AuditLogging.AuditLogsComponent" /* AuditLogs */]: DEFAULT_AUDIT_LOGS_ENTITY_ACTIONS,
|
|
354
|
-
["AuditLogging.EntityChangesComponent" /* EntityChanges */]: DEFAULT_ENTITY_CHANGES_ENTITY_ACTIONS,
|
|
355
|
-
};
|
|
356
|
-
const DEFAULT_AUDIT_LOGGING_TOOLBAR_ACTIONS = {
|
|
357
|
-
["AuditLogging.AuditLogsComponent" /* AuditLogs */]: DEFAULT_AUDIT_LOGS_TOOLBAR_ACTIONS,
|
|
358
|
-
};
|
|
359
|
-
const DEFAULT_AUDIT_LOGGING_ENTITY_PROPS = {
|
|
360
|
-
["AuditLogging.AuditLogsComponent" /* AuditLogs */]: DEFAULT_AUDIT_LOGS_ENTITY_PROPS,
|
|
361
|
-
};
|
|
362
|
-
const AUDIT_LOGGING_ENTITY_ACTION_CONTRIBUTORS = new InjectionToken('AUDIT_LOGGING_ENTITY_ACTION_CONTRIBUTORS');
|
|
363
|
-
const AUDIT_LOGGING_TOOLBAR_ACTION_CONTRIBUTORS = new InjectionToken('AUDIT_LOGGING_TOOLBAR_ACTION_CONTRIBUTORS');
|
|
364
|
-
const AUDIT_LOGGING_ENTITY_PROP_CONTRIBUTORS = new InjectionToken('AUDIT_LOGGING_ENTITY_PROP_CONTRIBUTORS');
|
|
365
|
-
|
|
366
|
-
class AuditLoggingExtensionsGuard {
|
|
367
|
-
constructor(injector) {
|
|
368
|
-
this.injector = injector;
|
|
369
|
-
}
|
|
370
|
-
canActivate() {
|
|
371
|
-
const extensions = this.injector.get(ExtensionsService);
|
|
372
|
-
const actionContributors = this.injector.get(AUDIT_LOGGING_ENTITY_ACTION_CONTRIBUTORS, null) || {};
|
|
373
|
-
const toolbarContributors = this.injector.get(AUDIT_LOGGING_TOOLBAR_ACTION_CONTRIBUTORS, null) || {};
|
|
374
|
-
const propContributors = this.injector.get(AUDIT_LOGGING_ENTITY_PROP_CONTRIBUTORS, null) || {};
|
|
375
|
-
const configState = this.injector.get(ConfigStateService);
|
|
376
|
-
return getObjectExtensionEntitiesFromStore(configState, 'AuditLogging').pipe(map(entities => ({
|
|
377
|
-
["AuditLogging.AuditLogsComponent" /* AuditLogs */]: entities.AuditLog,
|
|
378
|
-
})), mapEntitiesToContributors(configState, 'AuditLogging'), tap(objectExtensionContributors => {
|
|
379
|
-
mergeWithDefaultActions(extensions.entityActions, DEFAULT_AUDIT_LOGGING_ENTITY_ACTIONS, actionContributors);
|
|
380
|
-
mergeWithDefaultActions(extensions.toolbarActions, DEFAULT_AUDIT_LOGGING_TOOLBAR_ACTIONS, toolbarContributors);
|
|
381
|
-
mergeWithDefaultProps(extensions.entityProps, DEFAULT_AUDIT_LOGGING_ENTITY_PROPS, objectExtensionContributors.prop, propContributors);
|
|
382
|
-
}), mapTo(true));
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
AuditLoggingExtensionsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingExtensionsGuard, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
386
|
-
AuditLoggingExtensionsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingExtensionsGuard });
|
|
387
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingExtensionsGuard, decorators: [{
|
|
388
|
-
type: Injectable
|
|
389
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
390
|
-
|
|
391
|
-
const routes = [
|
|
392
|
-
{
|
|
393
|
-
path: '',
|
|
394
|
-
component: DynamicLayoutComponent,
|
|
395
|
-
canActivate: [AuthGuard, PermissionGuard, AuditLoggingExtensionsGuard, AuditLoggingGuard],
|
|
396
|
-
children: [
|
|
397
|
-
{
|
|
398
|
-
path: '',
|
|
399
|
-
component: ReplaceableRouteContainerComponent,
|
|
400
|
-
data: {
|
|
401
|
-
requiredPolicy: 'AuditLogging.AuditLogs',
|
|
402
|
-
replaceableComponent: {
|
|
403
|
-
key: "AuditLogging.AuditLogsComponent" /* AuditLogs */,
|
|
404
|
-
defaultComponent: AuditLogsComponent,
|
|
405
|
-
},
|
|
406
|
-
},
|
|
407
|
-
},
|
|
408
|
-
],
|
|
409
|
-
},
|
|
410
|
-
];
|
|
411
|
-
class AuditLoggingRoutingModule {
|
|
412
|
-
}
|
|
413
|
-
AuditLoggingRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
414
|
-
AuditLoggingRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingRoutingModule, imports: [i1$2.RouterModule], exports: [RouterModule] });
|
|
415
|
-
AuditLoggingRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingRoutingModule, imports: [[RouterModule.forChild(routes)], RouterModule] });
|
|
416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingRoutingModule, decorators: [{
|
|
417
|
-
type: NgModule,
|
|
418
|
-
args: [{
|
|
419
|
-
imports: [RouterModule.forChild(routes)],
|
|
420
|
-
exports: [RouterModule],
|
|
421
|
-
}]
|
|
422
|
-
}] });
|
|
423
|
-
|
|
424
|
-
class AverageExecutionDurationWidgetComponent {
|
|
425
|
-
constructor(localizationService, permissionService, service) {
|
|
426
|
-
this.localizationService = localizationService;
|
|
427
|
-
this.permissionService = permissionService;
|
|
428
|
-
this.service = service;
|
|
429
|
-
this.data = {};
|
|
430
|
-
this.initialized = new BehaviorSubject(this);
|
|
431
|
-
this.width = 273;
|
|
432
|
-
this.height = 136;
|
|
433
|
-
this.chartData = {};
|
|
434
|
-
this.draw = (filter) => {
|
|
435
|
-
if (!this.permissionService.getGrantedPolicy('AuditLogging.AuditLogs')) {
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
this.service
|
|
439
|
-
.getAverageExecutionDurationPerDay({ startDate: filter.startDate, endDate: filter.endDate })
|
|
440
|
-
.subscribe(res => {
|
|
441
|
-
this.data = res.data;
|
|
442
|
-
this.setChartData();
|
|
443
|
-
});
|
|
444
|
-
};
|
|
445
|
-
}
|
|
446
|
-
setChartData() {
|
|
447
|
-
if (!this.data || JSON.stringify(this.data) === '{}') {
|
|
448
|
-
this.chartData = {};
|
|
449
|
-
return;
|
|
450
|
-
}
|
|
451
|
-
const dataKeys = Object.keys(this.data);
|
|
452
|
-
setTimeout(() => {
|
|
453
|
-
this.chartData = {
|
|
454
|
-
labels: dataKeys,
|
|
455
|
-
datasets: [
|
|
456
|
-
{
|
|
457
|
-
label: this.localizationService.instant('AbpAuditLogging::AverageExecutionDurationInMilliseconds'),
|
|
458
|
-
backgroundColor: '#fa6e6e',
|
|
459
|
-
data: dataKeys.map(key => this.data[key]),
|
|
460
|
-
},
|
|
461
|
-
],
|
|
462
|
-
};
|
|
463
|
-
this.chart.refresh();
|
|
464
|
-
}, 0);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
AverageExecutionDurationWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AverageExecutionDurationWidgetComponent, deps: [{ token: i1.LocalizationService }, { token: i1.PermissionService }, { token: i2$1.AuditLogsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
468
|
-
AverageExecutionDurationWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: AverageExecutionDurationWidgetComponent, selector: "abp-average-execution-duration-widget", inputs: { width: "width", height: "height" }, outputs: { initialized: "initialized" }, viewQueries: [{ propertyName: "chart", first: true, predicate: ChartComponent, descendants: true }], ngImport: i0, template: `
|
|
469
|
-
<div *abpPermission="'AuditLogging.AuditLogs'" class="abp-widget-wrapper">
|
|
470
|
-
<div class="card">
|
|
471
|
-
<div class="card-header">
|
|
472
|
-
<h5 class="card-title">
|
|
473
|
-
{{ 'AbpAuditLogging::AverageExecutionDurationInLogsPerDay' | abpLocalization }}
|
|
474
|
-
</h5>
|
|
475
|
-
</div>
|
|
476
|
-
<div class="card-body">
|
|
477
|
-
<div class="row">
|
|
478
|
-
<abp-chart
|
|
479
|
-
#chart
|
|
480
|
-
class="w-100"
|
|
481
|
-
type="bar"
|
|
482
|
-
[data]="chartData"
|
|
483
|
-
[width]="width"
|
|
484
|
-
[height]="height"
|
|
485
|
-
></abp-chart>
|
|
486
|
-
</div>
|
|
487
|
-
</div>
|
|
488
|
-
</div>
|
|
489
|
-
</div>
|
|
490
|
-
`, isInline: true, components: [{ type: i3$1.ChartComponent, selector: "abp-chart", inputs: ["type", "data", "options", "plugins", "width", "height", "responsive"], outputs: ["dataSelect", "initialized"], exportAs: ["abpChart"] }], directives: [{ type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }], pipes: { "abpLocalization": i1.LocalizationPipe } });
|
|
491
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AverageExecutionDurationWidgetComponent, decorators: [{
|
|
492
|
-
type: Component,
|
|
493
|
-
args: [{
|
|
494
|
-
selector: 'abp-average-execution-duration-widget',
|
|
495
|
-
template: `
|
|
496
|
-
<div *abpPermission="'AuditLogging.AuditLogs'" class="abp-widget-wrapper">
|
|
497
|
-
<div class="card">
|
|
498
|
-
<div class="card-header">
|
|
499
|
-
<h5 class="card-title">
|
|
500
|
-
{{ 'AbpAuditLogging::AverageExecutionDurationInLogsPerDay' | abpLocalization }}
|
|
501
|
-
</h5>
|
|
502
|
-
</div>
|
|
503
|
-
<div class="card-body">
|
|
504
|
-
<div class="row">
|
|
505
|
-
<abp-chart
|
|
506
|
-
#chart
|
|
507
|
-
class="w-100"
|
|
508
|
-
type="bar"
|
|
509
|
-
[data]="chartData"
|
|
510
|
-
[width]="width"
|
|
511
|
-
[height]="height"
|
|
512
|
-
></abp-chart>
|
|
513
|
-
</div>
|
|
514
|
-
</div>
|
|
515
|
-
</div>
|
|
516
|
-
</div>
|
|
517
|
-
`,
|
|
518
|
-
}]
|
|
519
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i1.PermissionService }, { type: i2$1.AuditLogsService }]; }, propDecorators: { initialized: [{
|
|
520
|
-
type: Output
|
|
521
|
-
}], width: [{
|
|
522
|
-
type: Input
|
|
523
|
-
}], height: [{
|
|
524
|
-
type: Input
|
|
525
|
-
}], chart: [{
|
|
526
|
-
type: ViewChild,
|
|
527
|
-
args: [ChartComponent]
|
|
528
|
-
}] } });
|
|
529
|
-
|
|
530
|
-
class ErrorRateWidgetComponent {
|
|
531
|
-
constructor(permissionService, service) {
|
|
532
|
-
this.permissionService = permissionService;
|
|
533
|
-
this.service = service;
|
|
534
|
-
this.data = {};
|
|
535
|
-
this.initialized = new BehaviorSubject(this);
|
|
536
|
-
this.width = 273;
|
|
537
|
-
this.height = 136;
|
|
538
|
-
this.chartData = {};
|
|
539
|
-
this.draw = (filter) => {
|
|
540
|
-
if (!this.permissionService.getGrantedPolicy('AuditLogging.AuditLogs')) {
|
|
541
|
-
return;
|
|
542
|
-
}
|
|
543
|
-
this.service
|
|
544
|
-
.getErrorRate({
|
|
545
|
-
startDate: filter.startDate,
|
|
546
|
-
endDate: filter.endDate,
|
|
547
|
-
})
|
|
548
|
-
.subscribe(res => {
|
|
549
|
-
this.data = res.data;
|
|
550
|
-
this.setChartData();
|
|
551
|
-
});
|
|
552
|
-
};
|
|
553
|
-
}
|
|
554
|
-
setChartData() {
|
|
555
|
-
if (!this.data || JSON.stringify(this.data) === '{}') {
|
|
556
|
-
this.chartData = {};
|
|
557
|
-
return;
|
|
558
|
-
}
|
|
559
|
-
const dataKeys = Object.keys(this.data);
|
|
560
|
-
setTimeout(() => {
|
|
561
|
-
this.chartData = {
|
|
562
|
-
labels: dataKeys,
|
|
563
|
-
datasets: [
|
|
564
|
-
{
|
|
565
|
-
data: dataKeys.map(key => this.data[key]),
|
|
566
|
-
backgroundColor: ['#d76e6e', '#63ac44'],
|
|
567
|
-
},
|
|
568
|
-
],
|
|
569
|
-
};
|
|
570
|
-
this.chart.refresh();
|
|
571
|
-
}, 0);
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
ErrorRateWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: ErrorRateWidgetComponent, deps: [{ token: i1.PermissionService }, { token: i2$1.AuditLogsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
575
|
-
ErrorRateWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: ErrorRateWidgetComponent, selector: "abp-error-rate-widget", inputs: { width: "width", height: "height" }, outputs: { initialized: "initialized" }, viewQueries: [{ propertyName: "chart", first: true, predicate: ChartComponent, descendants: true }], ngImport: i0, template: `
|
|
576
|
-
<div *abpPermission="'AuditLogging.AuditLogs'" class="abp-widget-wrapper">
|
|
577
|
-
<div class="card">
|
|
578
|
-
<div class="card-header">
|
|
579
|
-
<h5 class="card-title">
|
|
580
|
-
{{ 'AbpAuditLogging::ErrorRateInLogs' | abpLocalization }}
|
|
581
|
-
</h5>
|
|
582
|
-
</div>
|
|
583
|
-
<div class="card-body">
|
|
584
|
-
<div class="row">
|
|
585
|
-
<abp-chart
|
|
586
|
-
#chart
|
|
587
|
-
class="w-100"
|
|
588
|
-
type="pie"
|
|
589
|
-
[data]="chartData"
|
|
590
|
-
[width]="width"
|
|
591
|
-
[height]="height"
|
|
592
|
-
></abp-chart>
|
|
593
|
-
</div>
|
|
594
|
-
</div>
|
|
595
|
-
</div>
|
|
596
|
-
</div>
|
|
597
|
-
`, isInline: true, components: [{ type: i3$1.ChartComponent, selector: "abp-chart", inputs: ["type", "data", "options", "plugins", "width", "height", "responsive"], outputs: ["dataSelect", "initialized"], exportAs: ["abpChart"] }], directives: [{ type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }], pipes: { "abpLocalization": i1.LocalizationPipe } });
|
|
598
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: ErrorRateWidgetComponent, decorators: [{
|
|
599
|
-
type: Component,
|
|
600
|
-
args: [{
|
|
601
|
-
selector: 'abp-error-rate-widget',
|
|
602
|
-
template: `
|
|
603
|
-
<div *abpPermission="'AuditLogging.AuditLogs'" class="abp-widget-wrapper">
|
|
604
|
-
<div class="card">
|
|
605
|
-
<div class="card-header">
|
|
606
|
-
<h5 class="card-title">
|
|
607
|
-
{{ 'AbpAuditLogging::ErrorRateInLogs' | abpLocalization }}
|
|
608
|
-
</h5>
|
|
609
|
-
</div>
|
|
610
|
-
<div class="card-body">
|
|
611
|
-
<div class="row">
|
|
612
|
-
<abp-chart
|
|
613
|
-
#chart
|
|
614
|
-
class="w-100"
|
|
615
|
-
type="pie"
|
|
616
|
-
[data]="chartData"
|
|
617
|
-
[width]="width"
|
|
618
|
-
[height]="height"
|
|
619
|
-
></abp-chart>
|
|
620
|
-
</div>
|
|
621
|
-
</div>
|
|
622
|
-
</div>
|
|
623
|
-
</div>
|
|
624
|
-
`,
|
|
625
|
-
}]
|
|
626
|
-
}], ctorParameters: function () { return [{ type: i1.PermissionService }, { type: i2$1.AuditLogsService }]; }, propDecorators: { initialized: [{
|
|
627
|
-
type: Output
|
|
628
|
-
}], width: [{
|
|
629
|
-
type: Input
|
|
630
|
-
}], height: [{
|
|
631
|
-
type: Input
|
|
632
|
-
}], chart: [{
|
|
633
|
-
type: ViewChild,
|
|
634
|
-
args: [ChartComponent]
|
|
635
|
-
}] } });
|
|
636
|
-
|
|
637
|
-
class AuditLoggingModule {
|
|
638
|
-
static forChild(options = {}) {
|
|
639
|
-
return {
|
|
640
|
-
ngModule: AuditLoggingModule,
|
|
641
|
-
providers: [
|
|
642
|
-
{
|
|
643
|
-
provide: AUDIT_LOGGING_ENTITY_ACTION_CONTRIBUTORS,
|
|
644
|
-
useValue: options.entityActionContributors,
|
|
645
|
-
},
|
|
646
|
-
{
|
|
647
|
-
provide: AUDIT_LOGGING_TOOLBAR_ACTION_CONTRIBUTORS,
|
|
648
|
-
useValue: options.toolbarActionContributors,
|
|
649
|
-
},
|
|
650
|
-
{
|
|
651
|
-
provide: AUDIT_LOGGING_ENTITY_PROP_CONTRIBUTORS,
|
|
652
|
-
useValue: options.entityPropContributors,
|
|
653
|
-
},
|
|
654
|
-
AuditLoggingGuard,
|
|
655
|
-
AuditLoggingExtensionsGuard,
|
|
656
|
-
],
|
|
657
|
-
};
|
|
658
|
-
}
|
|
659
|
-
static forLazy(options = {}) {
|
|
660
|
-
return new LazyModuleFactory(AuditLoggingModule.forChild(options));
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
AuditLoggingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
664
|
-
AuditLoggingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingModule, declarations: [AuditLogsComponent,
|
|
665
|
-
EntityChangesComponent,
|
|
666
|
-
ErrorRateWidgetComponent,
|
|
667
|
-
AverageExecutionDurationWidgetComponent], imports: [AuditLoggingRoutingModule,
|
|
668
|
-
CoreModule,
|
|
669
|
-
CommercialUiModule,
|
|
670
|
-
ThemeSharedModule,
|
|
671
|
-
NgbNavModule,
|
|
672
|
-
NgbDatepickerModule,
|
|
673
|
-
PageModule,
|
|
674
|
-
ChartModule], exports: [AuditLogsComponent,
|
|
675
|
-
EntityChangesComponent,
|
|
676
|
-
ErrorRateWidgetComponent,
|
|
677
|
-
AverageExecutionDurationWidgetComponent] });
|
|
678
|
-
AuditLoggingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingModule, imports: [[
|
|
679
|
-
AuditLoggingRoutingModule,
|
|
680
|
-
CoreModule,
|
|
681
|
-
CommercialUiModule,
|
|
682
|
-
ThemeSharedModule,
|
|
683
|
-
NgbNavModule,
|
|
684
|
-
NgbDatepickerModule,
|
|
685
|
-
PageModule,
|
|
686
|
-
ChartModule,
|
|
687
|
-
]] });
|
|
688
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: AuditLoggingModule, decorators: [{
|
|
689
|
-
type: NgModule,
|
|
690
|
-
args: [{
|
|
691
|
-
declarations: [
|
|
692
|
-
AuditLogsComponent,
|
|
693
|
-
EntityChangesComponent,
|
|
694
|
-
ErrorRateWidgetComponent,
|
|
695
|
-
AverageExecutionDurationWidgetComponent,
|
|
696
|
-
],
|
|
697
|
-
exports: [
|
|
698
|
-
AuditLogsComponent,
|
|
699
|
-
EntityChangesComponent,
|
|
700
|
-
ErrorRateWidgetComponent,
|
|
701
|
-
AverageExecutionDurationWidgetComponent,
|
|
702
|
-
],
|
|
703
|
-
imports: [
|
|
704
|
-
AuditLoggingRoutingModule,
|
|
705
|
-
CoreModule,
|
|
706
|
-
CommercialUiModule,
|
|
707
|
-
ThemeSharedModule,
|
|
708
|
-
NgbNavModule,
|
|
709
|
-
NgbDatepickerModule,
|
|
710
|
-
PageModule,
|
|
711
|
-
ChartModule,
|
|
712
|
-
],
|
|
713
|
-
entryComponents: [EntityChangesComponent],
|
|
714
|
-
}]
|
|
715
|
-
}] });
|
|
716
|
-
|
|
717
|
-
var eEntityChangeType;
|
|
718
|
-
(function (eEntityChangeType) {
|
|
719
|
-
eEntityChangeType[eEntityChangeType["Created"] = 0] = "Created";
|
|
720
|
-
eEntityChangeType[eEntityChangeType["Updated"] = 1] = "Updated";
|
|
721
|
-
eEntityChangeType[eEntityChangeType["Deleted"] = 2] = "Deleted";
|
|
722
|
-
})(eEntityChangeType || (eEntityChangeType = {}));
|
|
723
|
-
|
|
724
|
-
/**
|
|
725
|
-
* Generated bundle index. Do not edit.
|
|
726
|
-
*/
|
|
727
|
-
|
|
728
|
-
export { AUDIT_LOGGING_ENTITY_ACTION_CONTRIBUTORS, AUDIT_LOGGING_ENTITY_PROP_CONTRIBUTORS, AUDIT_LOGGING_TOOLBAR_ACTION_CONTRIBUTORS, AuditLoggingExtensionsGuard, AuditLoggingGuard, AuditLoggingModule, AuditLogsComponent, AverageExecutionDurationWidgetComponent, DEFAULT_AUDIT_LOGGING_ENTITY_ACTIONS, DEFAULT_AUDIT_LOGGING_ENTITY_PROPS, DEFAULT_AUDIT_LOGGING_TOOLBAR_ACTIONS, EntityChangesComponent, ErrorRateWidgetComponent, HTTP_METHODS, HTTP_STATUS_CODES, SHOW_ENTITY_DETAILS, eEntityChangeType };
|
|
729
|
-
//# sourceMappingURL=volo-abp.ng.audit-logging.js.map
|