@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
|
@@ -0,0 +1,720 @@
|
|
|
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, RouterOutletComponent, 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 { take, map, tap, mapTo } from 'rxjs/operators';
|
|
20
|
+
import * as i2$1 from '@volo/abp.ng.audit-logging/proxy';
|
|
21
|
+
import { EntityChangeType } from '@volo/abp.ng.audit-logging/proxy';
|
|
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: "13.1.1", 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: "13.1.1", 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\">\r\n <div class=\"card-body pb-lg-3\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"handleSubmit()\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6 col-xl-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"start-date\">{{\r\n 'AbpAuditLogging::EntityChangeStartTime' | abpLocalization\r\n }}</label\r\n ><input\r\n ngbDatepicker\r\n #pickerStart=\"ngbDatepicker\"\r\n id=\"start-date\"\r\n class=\"form-control\"\r\n formControlName=\"startDate\"\r\n readonly\r\n (click)=\"pickerStart.toggle()\"\r\n (keyup.space)=\"pickerStart.open()\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-xl-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"end-date\">{{\r\n 'AbpAuditLogging::EntityChangeEndTime' | abpLocalization\r\n }}</label\r\n ><input\r\n ngbDatepicker\r\n #pickerEnd=\"ngbDatepicker\"\r\n id=\"end-date\"\r\n class=\"form-control\"\r\n formControlName=\"endDate\"\r\n readonly\r\n (click)=\"pickerEnd.toggle()\"\r\n (keyup.space)=\"pickerEnd.open()\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-xl-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"change-type\">{{\r\n 'AbpAuditLogging::ChangeType' | abpLocalization\r\n }}</label\r\n ><select\r\n id=\"change-type\"\r\n class=\"form-select form-control\"\r\n formControlName=\"entityChangeType\"\r\n (change)=\"handleSubmit()\"\r\n >\r\n <option [ngValue]=\"\"></option>\r\n <option\r\n *ngFor=\"let type of changeTypes; trackBy: track.by('id')\"\r\n [ngValue]=\"type.value\"\r\n >\r\n {{ 'AbpAuditLogging::' + type.key | abpLocalization }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-xl-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"entity-type-full-name\">{{\r\n 'AbpAuditLogging::EntityTypeFullName' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"entity-type-full-name\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n formControlName=\"entityTypeFullName\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-12 d-grid d-md-block text-end\">\r\n <button type=\"submit\" class=\"btn btn-primary\">\r\n <span>\r\n {{ 'AbpAuditLogging::Refresh' | abpLocalization }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n</div>\r\n<div class=\"card\">\r\n <div class=\"card-body p-0\">\r\n <ngx-datatable default [rows]=\"data\" [count]=\"count\" [list]=\"list\">\r\n <ngx-datatable-column\r\n [name]=\"'AbpAuditLogging::Detail' | abpLocalization\"\r\n [maxWidth]=\"150\"\r\n [width]=\"150\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <abp-grid-actions\r\n [index]=\"i\"\r\n [record]=\"row\"\r\n text=\"AbpAuditLogging::Actions\"\r\n ></abp-grid-actions>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column\r\n [name]=\"'AbpAuditLogging::Time' | abpLocalization\"\r\n [width]=\"230\"\r\n prop=\"changeTime\"\r\n >\r\n </ngx-datatable-column>\r\n <ngx-datatable-column\r\n [name]=\"'AbpAuditLogging::ChangeType' | abpLocalization\"\r\n [width]=\"140\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" ngx-datatable-cell-template>\r\n {{ 'AbpAuditLogging::' + changeType[row.changeType] | abpLocalization }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column name=\"TenantId\" [width]=\"150\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" ngx-datatable-cell-template>\r\n <div abpEllipsis>{{ row.tenantId }}</div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column\r\n [name]=\"'AbpAuditLogging::EntityTypeFullName' | abpLocalization\"\r\n [width]=\"150\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" ngx-datatable-cell-template>\r\n <div abpEllipsis>{{ row.entityTypeFullName }}</div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ngx-datatable>\r\n </div>\r\n</div>\r\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: ["autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], 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: ["formControlName", "disabled", "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: "13.1.1", ngImport: i0, type: EntityChangesComponent, decorators: [{
|
|
137
|
+
type: Component,
|
|
138
|
+
args: [{ selector: 'abp-entity-changes', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
139
|
+
ListService,
|
|
140
|
+
{
|
|
141
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
142
|
+
useValue: "AuditLogging.EntityChangesComponent" /* EntityChanges */,
|
|
143
|
+
},
|
|
144
|
+
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
145
|
+
], template: "<div class=\"card\">\r\n <div class=\"card-body pb-lg-3\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"handleSubmit()\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6 col-xl-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"start-date\">{{\r\n 'AbpAuditLogging::EntityChangeStartTime' | abpLocalization\r\n }}</label\r\n ><input\r\n ngbDatepicker\r\n #pickerStart=\"ngbDatepicker\"\r\n id=\"start-date\"\r\n class=\"form-control\"\r\n formControlName=\"startDate\"\r\n readonly\r\n (click)=\"pickerStart.toggle()\"\r\n (keyup.space)=\"pickerStart.open()\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-xl-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"end-date\">{{\r\n 'AbpAuditLogging::EntityChangeEndTime' | abpLocalization\r\n }}</label\r\n ><input\r\n ngbDatepicker\r\n #pickerEnd=\"ngbDatepicker\"\r\n id=\"end-date\"\r\n class=\"form-control\"\r\n formControlName=\"endDate\"\r\n readonly\r\n (click)=\"pickerEnd.toggle()\"\r\n (keyup.space)=\"pickerEnd.open()\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-xl-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"change-type\">{{\r\n 'AbpAuditLogging::ChangeType' | abpLocalization\r\n }}</label\r\n ><select\r\n id=\"change-type\"\r\n class=\"form-select form-control\"\r\n formControlName=\"entityChangeType\"\r\n (change)=\"handleSubmit()\"\r\n >\r\n <option [ngValue]=\"\"></option>\r\n <option\r\n *ngFor=\"let type of changeTypes; trackBy: track.by('id')\"\r\n [ngValue]=\"type.value\"\r\n >\r\n {{ 'AbpAuditLogging::' + type.key | abpLocalization }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-xl-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"entity-type-full-name\">{{\r\n 'AbpAuditLogging::EntityTypeFullName' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"entity-type-full-name\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n formControlName=\"entityTypeFullName\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-12 d-grid d-md-block text-end\">\r\n <button type=\"submit\" class=\"btn btn-primary\">\r\n <span>\r\n {{ 'AbpAuditLogging::Refresh' | abpLocalization }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n</div>\r\n<div class=\"card\">\r\n <div class=\"card-body p-0\">\r\n <ngx-datatable default [rows]=\"data\" [count]=\"count\" [list]=\"list\">\r\n <ngx-datatable-column\r\n [name]=\"'AbpAuditLogging::Detail' | abpLocalization\"\r\n [maxWidth]=\"150\"\r\n [width]=\"150\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <abp-grid-actions\r\n [index]=\"i\"\r\n [record]=\"row\"\r\n text=\"AbpAuditLogging::Actions\"\r\n ></abp-grid-actions>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column\r\n [name]=\"'AbpAuditLogging::Time' | abpLocalization\"\r\n [width]=\"230\"\r\n prop=\"changeTime\"\r\n >\r\n </ngx-datatable-column>\r\n <ngx-datatable-column\r\n [name]=\"'AbpAuditLogging::ChangeType' | abpLocalization\"\r\n [width]=\"140\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" ngx-datatable-cell-template>\r\n {{ 'AbpAuditLogging::' + changeType[row.changeType] | abpLocalization }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column name=\"TenantId\" [width]=\"150\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" ngx-datatable-cell-template>\r\n <div abpEllipsis>{{ row.tenantId }}</div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column\r\n [name]=\"'AbpAuditLogging::EntityTypeFullName' | abpLocalization\"\r\n [width]=\"150\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" ngx-datatable-cell-template>\r\n <div abpEllipsis>{{ row.entityTypeFullName }}</div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ngx-datatable>\r\n </div>\r\n</div>\r\n" }]
|
|
146
|
+
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: i2.FormBuilder }, { type: i2$1.AuditLogsService }, { type: i1.TrackByService }]; } });
|
|
147
|
+
|
|
148
|
+
class AuditLogsComponent {
|
|
149
|
+
constructor(list, service) {
|
|
150
|
+
this.list = list;
|
|
151
|
+
this.service = service;
|
|
152
|
+
this.data = { items: [], totalCount: 0 };
|
|
153
|
+
this.selected = {};
|
|
154
|
+
this.pageQuery = {
|
|
155
|
+
maxResultCount: 10,
|
|
156
|
+
skipCount: 0,
|
|
157
|
+
};
|
|
158
|
+
this.httpMethods = HTTP_METHODS;
|
|
159
|
+
this.httpStatusCodes = HTTP_STATUS_CODES;
|
|
160
|
+
this.modalVisible = false;
|
|
161
|
+
this.collapseActionStates = [true];
|
|
162
|
+
this.collapseChangeStates = [true];
|
|
163
|
+
this.sortOrder = '';
|
|
164
|
+
this.sortKey = '';
|
|
165
|
+
this.selectedTab = 'audit-logs';
|
|
166
|
+
}
|
|
167
|
+
ngOnInit() {
|
|
168
|
+
this.hookToQuery();
|
|
169
|
+
}
|
|
170
|
+
hookToQuery() {
|
|
171
|
+
this.list
|
|
172
|
+
.hookToQuery(query => this.service.getList(Object.assign(Object.assign(Object.assign(Object.assign({}, this.pageQuery), (this.pageQuery.minExecutionDuration === null && {
|
|
173
|
+
minExecutionDuration: undefined,
|
|
174
|
+
})), (this.pageQuery.maxExecutionDuration === null && {
|
|
175
|
+
maxExecutionDuration: undefined,
|
|
176
|
+
})), query)))
|
|
177
|
+
.subscribe(res => (this.data = res));
|
|
178
|
+
}
|
|
179
|
+
openModal(id) {
|
|
180
|
+
this.service
|
|
181
|
+
.get(id)
|
|
182
|
+
.pipe(take(1))
|
|
183
|
+
.subscribe(log => {
|
|
184
|
+
this.selected = log;
|
|
185
|
+
this.modalVisible = true;
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
httpCodeClass(httpStatusCode) {
|
|
189
|
+
switch (httpStatusCode === null || httpStatusCode === void 0 ? void 0 : httpStatusCode.toString()[0]) {
|
|
190
|
+
case '2':
|
|
191
|
+
return 'badge-success';
|
|
192
|
+
case '3':
|
|
193
|
+
return 'badge-warning';
|
|
194
|
+
case '4':
|
|
195
|
+
case '5':
|
|
196
|
+
return 'badge-danger';
|
|
197
|
+
default:
|
|
198
|
+
return 'badge-light';
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
httpMethodClass(httpMethod) {
|
|
202
|
+
switch (httpMethod) {
|
|
203
|
+
case 'GET':
|
|
204
|
+
return 'badge-info';
|
|
205
|
+
case 'POST':
|
|
206
|
+
return 'badge-success';
|
|
207
|
+
case 'DELETE':
|
|
208
|
+
return 'badge-danger';
|
|
209
|
+
case 'PUT':
|
|
210
|
+
return 'badge-warning';
|
|
211
|
+
default:
|
|
212
|
+
return '';
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
AuditLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLogsComponent, deps: [{ token: i1.ListService }, { token: i2$1.AuditLogsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
217
|
+
AuditLogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AuditLogsComponent, selector: "abp-audit-logs", providers: [
|
|
218
|
+
ListService,
|
|
219
|
+
{
|
|
220
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
221
|
+
useValue: "AuditLogging.AuditLogsComponent" /* AuditLogs */,
|
|
222
|
+
},
|
|
223
|
+
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
224
|
+
], ngImport: i0, template: "<div id=\"wrapper\">\r\n <abp-page [title]=\"'AbpAuditLogging::AuditLogs' | abpLocalization\" [toolbar]=\"data.items\">\r\n <ul class=\"nav nav-tabs\">\r\n <li class=\"nav-item\">\r\n <a\r\n class=\"nav-link pointer\"\r\n [class.active]=\"selectedTab === 'audit-logs'\"\r\n (click)=\"selectedTab = 'audit-logs'\"\r\n >{{ 'AbpAuditLogging::AuditLogs' | abpLocalization }}</a\r\n >\r\n </li>\r\n <li class=\"nav-item\">\r\n <a\r\n class=\"nav-link pointer\"\r\n [class.active]=\"selectedTab === 'entity-changes'\"\r\n (click)=\"selectedTab = 'entity-changes'\"\r\n >{{ 'AbpAuditLogging::EntityChanges' | abpLocalization }}</a\r\n >\r\n </li>\r\n </ul>\r\n <div class=\"tab-content\" [class.p-0]=\"selectedTab !== 'audit-logs'\">\r\n <div class=\"tab-pane\" [class.active]=\"selectedTab === 'audit-logs'\" [@fadeIn]=\"selectedTab\">\r\n <div class=\"card\">\r\n <div class=\"card-body pb-lg-3\">\r\n <form (keyup.enter)=\"list.get()\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"startTime\" class=\"form-label\">{{\r\n 'AbpAuditLogging::StartTime' | abpLocalization\r\n }}</label\r\n ><input\r\n #startTime=\"ngbDatepicker\"\r\n class=\"form-control\"\r\n id=\"startTime\"\r\n name=\"startTime\"\r\n readonly\r\n [(ngModel)]=\"pageQuery.startTime\"\r\n ngbDatepicker\r\n (click)=\"startTime.toggle()\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"endTime\" class=\"form-label\">{{\r\n 'AbpAuditLogging::EndTime' | abpLocalization\r\n }}</label\r\n ><input\r\n #endTime=\"ngbDatepicker\"\r\n class=\"form-control\"\r\n id=\"endTime\"\r\n name=\"endTime\"\r\n readonly\r\n [(ngModel)]=\"pageQuery.endTime\"\r\n ngbDatepicker\r\n (click)=\"endTime.toggle()\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"userName\" class=\"form-label\">{{\r\n 'AbpAuditLogging::UserName' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"userName\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.userName\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"url\">{{\r\n 'AbpAuditLogging::UrlFilter' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"url\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.url\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"minDuration\" class=\"form-label\">{{\r\n 'AbpAuditLogging::MinDuration' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"minDuration\"\r\n type=\"number\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.minExecutionDuration\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"maxDuration\" class=\"form-label\">{{\r\n 'AbpAuditLogging::MaxDuration' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"maxDuration\"\r\n type=\"number\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.maxExecutionDuration\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row justify-content-end\">\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"httpMethod\" class=\"form-label\">{{\r\n 'AbpAuditLogging::HttpMethod' | abpLocalization\r\n }}</label\r\n ><select\r\n id=\"httpMethod\"\r\n class=\"form-select form-control\"\r\n [(ngModel)]=\"pageQuery.httpMethod\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (change)=\"list.get()\"\r\n >\r\n <option [ngValue]=\"\"></option>\r\n <option *ngFor=\"let method of httpMethods\" [ngValue]=\"method\">\r\n {{ method }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"httpStatusCode\" class=\"form-label\">{{\r\n 'AbpAuditLogging::HttpStatusCode' | abpLocalization\r\n }}</label\r\n ><select\r\n id=\"httpStatusCode\"\r\n class=\"form-select form-control\"\r\n [(ngModel)]=\"pageQuery.httpStatusCode\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (change)=\"list.get()\"\r\n >\r\n <option [ngValue]=\"\"></option>\r\n <option *ngFor=\"let h of httpStatusCodes\" [ngValue]=\"h.code\">\r\n {{ h.code }} - {{ h.message }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3 mb-lg-0\">\r\n <label for=\"applicationName\" class=\"form-label\">{{\r\n 'AbpAuditLogging::ApplicationName' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"applicationName\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.applicationName\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3 mb-lg-0\">\r\n <label for=\"correlationId\" class=\"form-label\">{{\r\n 'AbpAuditLogging::ClientIpAddress' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"clientIpAddress\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.clientIpAddress\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3 mb-lg-0\">\r\n <label for=\"correlationId\" class=\"form-label\">{{\r\n 'AbpAuditLogging::CorrelationId' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"correlationId\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.correlationId\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3 mb-lg-0\">\r\n <label for=\"hasException\" class=\"form-label\">{{\r\n 'AbpAuditLogging::HasException' | abpLocalization\r\n }}</label>\r\n <select\r\n name=\"hasException\"\r\n id=\"hasException\"\r\n class=\"form-select form-control\"\r\n [(ngModel)]=\"pageQuery.hasException\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (change)=\"list.get()\"\r\n >\r\n <option [ngValue]=\"\"></option>\r\n <option [ngValue]=\"true\">\r\n {{ 'AbpAuditLogging::Yes' | abpLocalization }}\r\n </option>\r\n <option [ngValue]=\"false\">\r\n {{ 'AbpAuditLogging::No' | abpLocalization }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2 d-grid\">\r\n <button type=\"button\" class=\"btn btn-primary mt-0\" (click)=\"list.get()\">\r\n <span>\r\n {{ 'AbpAuditLogging::Refresh' | abpLocalization }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n <div class=\"card\">\r\n <div class=\"card-body p-0\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"tab-content\" [class.p-0]=\"selectedTab !== 'entity-changes'\">\r\n <div\r\n class=\"tab-pane\"\r\n [class.active]=\"selectedTab === 'entity-changes'\"\r\n [@fadeIn]=\"selectedTab\"\r\n >\r\n <abp-entity-changes *ngIf=\"selectedTab === 'entity-changes'\"></abp-entity-changes>\r\n </div>\r\n </div>\r\n </abp-page>\r\n</div>\r\n\r\n<abp-modal *ngIf=\"selected\" [(visible)]=\"modalVisible\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ 'AbpAuditLogging::Detail' | abpLocalization }}\r\n </h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpAuditLogging::Overall' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::HttpStatusCode' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">\r\n <span class=\"badge\" [ngClass]=\"httpCodeClass(selected.httpStatusCode)\">{{\r\n selected.httpStatusCode\r\n }}</span>\r\n </div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::HttpMethod' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">\r\n <span class=\"badge\" [ngClass]=\"httpMethodClass(selected.httpMethod)\">{{\r\n selected.httpMethod\r\n }}</span>\r\n </div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Url' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.url }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::ClientIpAddress' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.clientIpAddress }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::ClientName' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.clientName }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Exceptions' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">\r\n <pre lang=\"c-sharp\">\r\n {{ selected.exceptions }}\r\n </pre>\r\n </div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::UserName' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.userName }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Time' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.executionTime }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Duration' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.executionDuration }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::BrowserInfo' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.browserInfo }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::ApplicationName' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.applicationName }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::CorrelationId' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.correlationId }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Comments' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.comments }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::ExtraProperties' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">\r\n <pre lang=\"json\" class=\"p-2\">\r\n {{ selected.extraProperties | json }}\r\n </pre>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem>\r\n <a ngbNavLink\r\n >{{ 'AbpAuditLogging::Actions' | abpLocalization }} ({{ selected.actions.length }})</a\r\n >\r\n <ng-template ngbNavContent>\r\n <div\r\n class=\"mb-3 border border-dark rounded\"\r\n *ngFor=\"let action of selected.actions; let i = index\"\r\n >\r\n <div class=\"d-grid\">\r\n <button\r\n class=\"btn btn-primary\"\r\n type=\"button\"\r\n (click)=\"collapseActionStates[i] = !collapseActionStates[i]\"\r\n >\r\n {{ action.serviceName }}\r\n </button>\r\n </div>\r\n <div [@collapse]=\"collapseActionStates[i] ? 'expanded' : 'collapsed'\">\r\n <div class=\"m-3\">\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Duration' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">\r\n {{ action.executionDuration ? action.executionDuration + ' ms' : '' }}\r\n </div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Parameters' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">\r\n <pre lang=\"json\" class=\"p-2\">{{ action.parameters }}</pre>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n <div [ngbNavOutlet]=\"nav\"></div>\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", 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: ["autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], 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: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { type: i7.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], 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))])] });
|
|
225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLogsComponent, decorators: [{
|
|
226
|
+
type: Component,
|
|
227
|
+
args: [{ selector: 'abp-audit-logs', animations: [collapse, trigger('fadeIn', [transition('* <=> *', useAnimation(fadeIn))])], providers: [
|
|
228
|
+
ListService,
|
|
229
|
+
{
|
|
230
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
231
|
+
useValue: "AuditLogging.AuditLogsComponent" /* AuditLogs */,
|
|
232
|
+
},
|
|
233
|
+
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
234
|
+
], template: "<div id=\"wrapper\">\r\n <abp-page [title]=\"'AbpAuditLogging::AuditLogs' | abpLocalization\" [toolbar]=\"data.items\">\r\n <ul class=\"nav nav-tabs\">\r\n <li class=\"nav-item\">\r\n <a\r\n class=\"nav-link pointer\"\r\n [class.active]=\"selectedTab === 'audit-logs'\"\r\n (click)=\"selectedTab = 'audit-logs'\"\r\n >{{ 'AbpAuditLogging::AuditLogs' | abpLocalization }}</a\r\n >\r\n </li>\r\n <li class=\"nav-item\">\r\n <a\r\n class=\"nav-link pointer\"\r\n [class.active]=\"selectedTab === 'entity-changes'\"\r\n (click)=\"selectedTab = 'entity-changes'\"\r\n >{{ 'AbpAuditLogging::EntityChanges' | abpLocalization }}</a\r\n >\r\n </li>\r\n </ul>\r\n <div class=\"tab-content\" [class.p-0]=\"selectedTab !== 'audit-logs'\">\r\n <div class=\"tab-pane\" [class.active]=\"selectedTab === 'audit-logs'\" [@fadeIn]=\"selectedTab\">\r\n <div class=\"card\">\r\n <div class=\"card-body pb-lg-3\">\r\n <form (keyup.enter)=\"list.get()\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"startTime\" class=\"form-label\">{{\r\n 'AbpAuditLogging::StartTime' | abpLocalization\r\n }}</label\r\n ><input\r\n #startTime=\"ngbDatepicker\"\r\n class=\"form-control\"\r\n id=\"startTime\"\r\n name=\"startTime\"\r\n readonly\r\n [(ngModel)]=\"pageQuery.startTime\"\r\n ngbDatepicker\r\n (click)=\"startTime.toggle()\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"endTime\" class=\"form-label\">{{\r\n 'AbpAuditLogging::EndTime' | abpLocalization\r\n }}</label\r\n ><input\r\n #endTime=\"ngbDatepicker\"\r\n class=\"form-control\"\r\n id=\"endTime\"\r\n name=\"endTime\"\r\n readonly\r\n [(ngModel)]=\"pageQuery.endTime\"\r\n ngbDatepicker\r\n (click)=\"endTime.toggle()\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"userName\" class=\"form-label\">{{\r\n 'AbpAuditLogging::UserName' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"userName\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.userName\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"url\">{{\r\n 'AbpAuditLogging::UrlFilter' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"url\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.url\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"minDuration\" class=\"form-label\">{{\r\n 'AbpAuditLogging::MinDuration' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"minDuration\"\r\n type=\"number\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.minExecutionDuration\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"maxDuration\" class=\"form-label\">{{\r\n 'AbpAuditLogging::MaxDuration' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"maxDuration\"\r\n type=\"number\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.maxExecutionDuration\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row justify-content-end\">\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"httpMethod\" class=\"form-label\">{{\r\n 'AbpAuditLogging::HttpMethod' | abpLocalization\r\n }}</label\r\n ><select\r\n id=\"httpMethod\"\r\n class=\"form-select form-control\"\r\n [(ngModel)]=\"pageQuery.httpMethod\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (change)=\"list.get()\"\r\n >\r\n <option [ngValue]=\"\"></option>\r\n <option *ngFor=\"let method of httpMethods\" [ngValue]=\"method\">\r\n {{ method }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3\">\r\n <label for=\"httpStatusCode\" class=\"form-label\">{{\r\n 'AbpAuditLogging::HttpStatusCode' | abpLocalization\r\n }}</label\r\n ><select\r\n id=\"httpStatusCode\"\r\n class=\"form-select form-control\"\r\n [(ngModel)]=\"pageQuery.httpStatusCode\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (change)=\"list.get()\"\r\n >\r\n <option [ngValue]=\"\"></option>\r\n <option *ngFor=\"let h of httpStatusCodes\" [ngValue]=\"h.code\">\r\n {{ h.code }} - {{ h.message }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3 mb-lg-0\">\r\n <label for=\"applicationName\" class=\"form-label\">{{\r\n 'AbpAuditLogging::ApplicationName' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"applicationName\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.applicationName\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3 mb-lg-0\">\r\n <label for=\"correlationId\" class=\"form-label\">{{\r\n 'AbpAuditLogging::ClientIpAddress' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"clientIpAddress\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.clientIpAddress\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3 mb-lg-0\">\r\n <label for=\"correlationId\" class=\"form-label\">{{\r\n 'AbpAuditLogging::CorrelationId' | abpLocalization\r\n }}</label\r\n ><input\r\n id=\"correlationId\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"pageQuery.correlationId\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2\">\r\n <div class=\"mb-3 mb-lg-0\">\r\n <label for=\"hasException\" class=\"form-label\">{{\r\n 'AbpAuditLogging::HasException' | abpLocalization\r\n }}</label>\r\n <select\r\n name=\"hasException\"\r\n id=\"hasException\"\r\n class=\"form-select form-control\"\r\n [(ngModel)]=\"pageQuery.hasException\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (change)=\"list.get()\"\r\n >\r\n <option [ngValue]=\"\"></option>\r\n <option [ngValue]=\"true\">\r\n {{ 'AbpAuditLogging::Yes' | abpLocalization }}\r\n </option>\r\n <option [ngValue]=\"false\">\r\n {{ 'AbpAuditLogging::No' | abpLocalization }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 col-lg-2 d-grid\">\r\n <button type=\"button\" class=\"btn btn-primary mt-0\" (click)=\"list.get()\">\r\n <span>\r\n {{ 'AbpAuditLogging::Refresh' | abpLocalization }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n <div class=\"card\">\r\n <div class=\"card-body p-0\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"tab-content\" [class.p-0]=\"selectedTab !== 'entity-changes'\">\r\n <div\r\n class=\"tab-pane\"\r\n [class.active]=\"selectedTab === 'entity-changes'\"\r\n [@fadeIn]=\"selectedTab\"\r\n >\r\n <abp-entity-changes *ngIf=\"selectedTab === 'entity-changes'\"></abp-entity-changes>\r\n </div>\r\n </div>\r\n </abp-page>\r\n</div>\r\n\r\n<abp-modal *ngIf=\"selected\" [(visible)]=\"modalVisible\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ 'AbpAuditLogging::Detail' | abpLocalization }}\r\n </h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpAuditLogging::Overall' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::HttpStatusCode' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">\r\n <span class=\"badge\" [ngClass]=\"httpCodeClass(selected.httpStatusCode)\">{{\r\n selected.httpStatusCode\r\n }}</span>\r\n </div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::HttpMethod' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">\r\n <span class=\"badge\" [ngClass]=\"httpMethodClass(selected.httpMethod)\">{{\r\n selected.httpMethod\r\n }}</span>\r\n </div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Url' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.url }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::ClientIpAddress' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.clientIpAddress }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::ClientName' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.clientName }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Exceptions' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">\r\n <pre lang=\"c-sharp\">\r\n {{ selected.exceptions }}\r\n </pre>\r\n </div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::UserName' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.userName }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Time' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.executionTime }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Duration' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.executionDuration }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::BrowserInfo' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.browserInfo }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::ApplicationName' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.applicationName }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::CorrelationId' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.correlationId }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Comments' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">{{ selected.comments }}</div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::ExtraProperties' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">\r\n <pre lang=\"json\" class=\"p-2\">\r\n {{ selected.extraProperties | json }}\r\n </pre>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem>\r\n <a ngbNavLink\r\n >{{ 'AbpAuditLogging::Actions' | abpLocalization }} ({{ selected.actions.length }})</a\r\n >\r\n <ng-template ngbNavContent>\r\n <div\r\n class=\"mb-3 border border-dark rounded\"\r\n *ngFor=\"let action of selected.actions; let i = index\"\r\n >\r\n <div class=\"d-grid\">\r\n <button\r\n class=\"btn btn-primary\"\r\n type=\"button\"\r\n (click)=\"collapseActionStates[i] = !collapseActionStates[i]\"\r\n >\r\n {{ action.serviceName }}\r\n </button>\r\n </div>\r\n <div [@collapse]=\"collapseActionStates[i] ? 'expanded' : 'collapsed'\">\r\n <div class=\"m-3\">\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Duration' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">\r\n {{ action.executionDuration ? action.executionDuration + ' ms' : '' }}\r\n </div>\r\n </div>\r\n <hr />\r\n <div class=\"row\">\r\n <div class=\"col-form-label col col-lg-3\">\r\n <strong>{{ 'AbpAuditLogging::Parameters' | abpLocalization }}</strong>\r\n </div>\r\n <div class=\"col-form-label col col-lg-9\">\r\n <pre lang=\"json\" class=\"p-2\">{{ action.parameters }}</pre>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n <div [ngbNavOutlet]=\"nav\"></div>\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" }]
|
|
235
|
+
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: i2$1.AuditLogsService }]; } });
|
|
236
|
+
|
|
237
|
+
class AuditLoggingGuard {
|
|
238
|
+
constructor(auditLoggingFeatures) {
|
|
239
|
+
this.auditLoggingFeatures = auditLoggingFeatures;
|
|
240
|
+
}
|
|
241
|
+
canActivate() {
|
|
242
|
+
return this.auditLoggingFeatures.pipe(map(features => features.enable));
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
AuditLoggingGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingGuard, deps: [{ token: AUDIT_LOGGING_FEATURES }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
246
|
+
AuditLoggingGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingGuard });
|
|
247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingGuard, decorators: [{
|
|
248
|
+
type: Injectable
|
|
249
|
+
}], ctorParameters: function () {
|
|
250
|
+
return [{ type: i1$1.Observable, decorators: [{
|
|
251
|
+
type: Inject,
|
|
252
|
+
args: [AUDIT_LOGGING_FEATURES]
|
|
253
|
+
}] }];
|
|
254
|
+
} });
|
|
255
|
+
|
|
256
|
+
const DEFAULT_AUDIT_LOGS_ENTITY_ACTIONS = EntityAction.createMany([
|
|
257
|
+
{
|
|
258
|
+
text: 'AbpAuditLogging::Detail',
|
|
259
|
+
action: data => {
|
|
260
|
+
const component = data.getInjected(AuditLogsComponent);
|
|
261
|
+
component.openModal(data.record.id);
|
|
262
|
+
},
|
|
263
|
+
icon: 'fa fa-search',
|
|
264
|
+
},
|
|
265
|
+
]);
|
|
266
|
+
|
|
267
|
+
const DEFAULT_AUDIT_LOGS_ENTITY_PROPS = EntityProp.createMany([
|
|
268
|
+
{
|
|
269
|
+
type: "string" /* String */,
|
|
270
|
+
name: 'url',
|
|
271
|
+
displayName: 'AbpAuditLogging::HttpRequest',
|
|
272
|
+
sortable: true,
|
|
273
|
+
columnWidth: 600,
|
|
274
|
+
valueResolver: data => {
|
|
275
|
+
const component = data.getInjected(AuditLogsComponent);
|
|
276
|
+
const { httpMethod, httpStatusCode, url } = data.record;
|
|
277
|
+
const methodClass = component.httpMethodClass(httpMethod);
|
|
278
|
+
const statusClass = component.httpCodeClass(httpStatusCode);
|
|
279
|
+
return of(`<span class="badge ${statusClass} me-1">${httpStatusCode}</span>` +
|
|
280
|
+
`<span class="badge ${methodClass} me-1">${httpMethod}</span>` +
|
|
281
|
+
(url || ''));
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
type: "string" /* String */,
|
|
286
|
+
name: 'userName',
|
|
287
|
+
displayName: 'AbpAuditLogging::User',
|
|
288
|
+
sortable: true,
|
|
289
|
+
columnWidth: 150,
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
type: "string" /* String */,
|
|
293
|
+
name: 'clientIpAddress',
|
|
294
|
+
displayName: 'AbpAuditLogging::IpAddress',
|
|
295
|
+
sortable: true,
|
|
296
|
+
columnWidth: 150,
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
type: "dateTime" /* DateTime */,
|
|
300
|
+
name: 'executionTime',
|
|
301
|
+
displayName: 'AbpAuditLogging::Time',
|
|
302
|
+
sortable: true,
|
|
303
|
+
columnWidth: 150,
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
type: "number" /* Number */,
|
|
307
|
+
name: 'executionDuration',
|
|
308
|
+
displayName: 'AbpAuditLogging::Duration',
|
|
309
|
+
sortable: true,
|
|
310
|
+
columnWidth: 150,
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
type: "string" /* String */,
|
|
314
|
+
name: 'applicationName',
|
|
315
|
+
displayName: 'AbpAuditLogging::ApplicationName',
|
|
316
|
+
sortable: true,
|
|
317
|
+
columnWidth: 200,
|
|
318
|
+
},
|
|
319
|
+
]);
|
|
320
|
+
|
|
321
|
+
const DEFAULT_AUDIT_LOGS_TOOLBAR_ACTIONS = ToolbarAction.createMany([]);
|
|
322
|
+
|
|
323
|
+
const SHOW_ENTITY_DETAILS = new InjectionToken('SHOW_ENTITY_DETAILS');
|
|
324
|
+
|
|
325
|
+
const DEFAULT_ENTITY_CHANGES_ENTITY_ACTIONS = EntityAction.createMany([
|
|
326
|
+
{
|
|
327
|
+
text: 'AbpAuditLogging::ChangeDetails',
|
|
328
|
+
action: data => {
|
|
329
|
+
const showDetails = data.getInjected(SHOW_ENTITY_DETAILS);
|
|
330
|
+
showDetails(data.record.id);
|
|
331
|
+
},
|
|
332
|
+
icon: 'fa fa-search',
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
text: 'AbpAuditLogging::FullChangeHistory',
|
|
336
|
+
action: data => {
|
|
337
|
+
const showHistory = data.getInjected(SHOW_ENTITY_HISTORY);
|
|
338
|
+
showHistory(data.record.entityId, data.record.entityTypeFullName);
|
|
339
|
+
},
|
|
340
|
+
icon: 'fa fa-history',
|
|
341
|
+
},
|
|
342
|
+
]);
|
|
343
|
+
|
|
344
|
+
const DEFAULT_AUDIT_LOGGING_ENTITY_ACTIONS = {
|
|
345
|
+
["AuditLogging.AuditLogsComponent" /* AuditLogs */]: DEFAULT_AUDIT_LOGS_ENTITY_ACTIONS,
|
|
346
|
+
["AuditLogging.EntityChangesComponent" /* EntityChanges */]: DEFAULT_ENTITY_CHANGES_ENTITY_ACTIONS,
|
|
347
|
+
};
|
|
348
|
+
const DEFAULT_AUDIT_LOGGING_TOOLBAR_ACTIONS = {
|
|
349
|
+
["AuditLogging.AuditLogsComponent" /* AuditLogs */]: DEFAULT_AUDIT_LOGS_TOOLBAR_ACTIONS,
|
|
350
|
+
};
|
|
351
|
+
const DEFAULT_AUDIT_LOGGING_ENTITY_PROPS = {
|
|
352
|
+
["AuditLogging.AuditLogsComponent" /* AuditLogs */]: DEFAULT_AUDIT_LOGS_ENTITY_PROPS,
|
|
353
|
+
};
|
|
354
|
+
const AUDIT_LOGGING_ENTITY_ACTION_CONTRIBUTORS = new InjectionToken('AUDIT_LOGGING_ENTITY_ACTION_CONTRIBUTORS');
|
|
355
|
+
const AUDIT_LOGGING_TOOLBAR_ACTION_CONTRIBUTORS = new InjectionToken('AUDIT_LOGGING_TOOLBAR_ACTION_CONTRIBUTORS');
|
|
356
|
+
const AUDIT_LOGGING_ENTITY_PROP_CONTRIBUTORS = new InjectionToken('AUDIT_LOGGING_ENTITY_PROP_CONTRIBUTORS');
|
|
357
|
+
|
|
358
|
+
class AuditLoggingExtensionsGuard {
|
|
359
|
+
constructor(injector) {
|
|
360
|
+
this.injector = injector;
|
|
361
|
+
}
|
|
362
|
+
canActivate() {
|
|
363
|
+
const extensions = this.injector.get(ExtensionsService);
|
|
364
|
+
const actionContributors = this.injector.get(AUDIT_LOGGING_ENTITY_ACTION_CONTRIBUTORS, null) || {};
|
|
365
|
+
const toolbarContributors = this.injector.get(AUDIT_LOGGING_TOOLBAR_ACTION_CONTRIBUTORS, null) || {};
|
|
366
|
+
const propContributors = this.injector.get(AUDIT_LOGGING_ENTITY_PROP_CONTRIBUTORS, null) || {};
|
|
367
|
+
const configState = this.injector.get(ConfigStateService);
|
|
368
|
+
return getObjectExtensionEntitiesFromStore(configState, 'AuditLogging').pipe(map(entities => ({
|
|
369
|
+
["AuditLogging.AuditLogsComponent" /* AuditLogs */]: entities.AuditLog,
|
|
370
|
+
})), mapEntitiesToContributors(configState, 'AuditLogging'), tap(objectExtensionContributors => {
|
|
371
|
+
mergeWithDefaultActions(extensions.entityActions, DEFAULT_AUDIT_LOGGING_ENTITY_ACTIONS, actionContributors);
|
|
372
|
+
mergeWithDefaultActions(extensions.toolbarActions, DEFAULT_AUDIT_LOGGING_TOOLBAR_ACTIONS, toolbarContributors);
|
|
373
|
+
mergeWithDefaultProps(extensions.entityProps, DEFAULT_AUDIT_LOGGING_ENTITY_PROPS, objectExtensionContributors.prop, propContributors);
|
|
374
|
+
}), mapTo(true));
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
AuditLoggingExtensionsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingExtensionsGuard, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
378
|
+
AuditLoggingExtensionsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingExtensionsGuard });
|
|
379
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingExtensionsGuard, decorators: [{
|
|
380
|
+
type: Injectable
|
|
381
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
382
|
+
|
|
383
|
+
const routes = [
|
|
384
|
+
{
|
|
385
|
+
path: '',
|
|
386
|
+
component: RouterOutletComponent,
|
|
387
|
+
canActivate: [AuthGuard, PermissionGuard, AuditLoggingExtensionsGuard, AuditLoggingGuard],
|
|
388
|
+
children: [
|
|
389
|
+
{
|
|
390
|
+
path: '',
|
|
391
|
+
component: ReplaceableRouteContainerComponent,
|
|
392
|
+
data: {
|
|
393
|
+
requiredPolicy: 'AuditLogging.AuditLogs',
|
|
394
|
+
replaceableComponent: {
|
|
395
|
+
key: "AuditLogging.AuditLogsComponent" /* AuditLogs */,
|
|
396
|
+
defaultComponent: AuditLogsComponent,
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
],
|
|
401
|
+
},
|
|
402
|
+
];
|
|
403
|
+
class AuditLoggingRoutingModule {
|
|
404
|
+
}
|
|
405
|
+
AuditLoggingRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
406
|
+
AuditLoggingRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingRoutingModule, imports: [i1$2.RouterModule], exports: [RouterModule] });
|
|
407
|
+
AuditLoggingRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingRoutingModule, imports: [[RouterModule.forChild(routes)], RouterModule] });
|
|
408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingRoutingModule, decorators: [{
|
|
409
|
+
type: NgModule,
|
|
410
|
+
args: [{
|
|
411
|
+
imports: [RouterModule.forChild(routes)],
|
|
412
|
+
exports: [RouterModule],
|
|
413
|
+
}]
|
|
414
|
+
}] });
|
|
415
|
+
|
|
416
|
+
class AverageExecutionDurationWidgetComponent {
|
|
417
|
+
constructor(localizationService, permissionService, service) {
|
|
418
|
+
this.localizationService = localizationService;
|
|
419
|
+
this.permissionService = permissionService;
|
|
420
|
+
this.service = service;
|
|
421
|
+
this.data = {};
|
|
422
|
+
this.initialized = new BehaviorSubject(this);
|
|
423
|
+
this.width = 273;
|
|
424
|
+
this.height = 136;
|
|
425
|
+
this.chartData = {};
|
|
426
|
+
this.draw = (filter) => {
|
|
427
|
+
if (!this.permissionService.getGrantedPolicy('AuditLogging.AuditLogs')) {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
this.service
|
|
431
|
+
.getAverageExecutionDurationPerDay({ startDate: filter.startDate, endDate: filter.endDate })
|
|
432
|
+
.subscribe(res => {
|
|
433
|
+
this.data = res.data;
|
|
434
|
+
this.setChartData();
|
|
435
|
+
});
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
setChartData() {
|
|
439
|
+
if (!this.data || JSON.stringify(this.data) === '{}') {
|
|
440
|
+
this.chartData = {};
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
const dataKeys = Object.keys(this.data);
|
|
444
|
+
setTimeout(() => {
|
|
445
|
+
this.chartData = {
|
|
446
|
+
labels: dataKeys,
|
|
447
|
+
datasets: [
|
|
448
|
+
{
|
|
449
|
+
label: this.localizationService.instant('AbpAuditLogging::AverageExecutionDurationInMilliseconds'),
|
|
450
|
+
backgroundColor: '#fa6e6e',
|
|
451
|
+
data: dataKeys.map(key => this.data[key]),
|
|
452
|
+
},
|
|
453
|
+
],
|
|
454
|
+
};
|
|
455
|
+
this.chart.refresh();
|
|
456
|
+
}, 0);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
AverageExecutionDurationWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AverageExecutionDurationWidgetComponent, deps: [{ token: i1.LocalizationService }, { token: i1.PermissionService }, { token: i2$1.AuditLogsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
460
|
+
AverageExecutionDurationWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", 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: `
|
|
461
|
+
<div *abpPermission="'AuditLogging.AuditLogs'" class="abp-widget-wrapper">
|
|
462
|
+
<div class="card">
|
|
463
|
+
<div class="card-header">
|
|
464
|
+
<h5 class="card-title">
|
|
465
|
+
{{ 'AbpAuditLogging::AverageExecutionDurationInLogsPerDay' | abpLocalization }}
|
|
466
|
+
</h5>
|
|
467
|
+
</div>
|
|
468
|
+
<div class="card-body">
|
|
469
|
+
<div class="row">
|
|
470
|
+
<abp-chart
|
|
471
|
+
#chart
|
|
472
|
+
class="w-100"
|
|
473
|
+
type="bar"
|
|
474
|
+
[data]="chartData"
|
|
475
|
+
[width]="width"
|
|
476
|
+
[height]="height"
|
|
477
|
+
></abp-chart>
|
|
478
|
+
</div>
|
|
479
|
+
</div>
|
|
480
|
+
</div>
|
|
481
|
+
</div>
|
|
482
|
+
`, 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 } });
|
|
483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AverageExecutionDurationWidgetComponent, decorators: [{
|
|
484
|
+
type: Component,
|
|
485
|
+
args: [{
|
|
486
|
+
selector: 'abp-average-execution-duration-widget',
|
|
487
|
+
template: `
|
|
488
|
+
<div *abpPermission="'AuditLogging.AuditLogs'" class="abp-widget-wrapper">
|
|
489
|
+
<div class="card">
|
|
490
|
+
<div class="card-header">
|
|
491
|
+
<h5 class="card-title">
|
|
492
|
+
{{ 'AbpAuditLogging::AverageExecutionDurationInLogsPerDay' | abpLocalization }}
|
|
493
|
+
</h5>
|
|
494
|
+
</div>
|
|
495
|
+
<div class="card-body">
|
|
496
|
+
<div class="row">
|
|
497
|
+
<abp-chart
|
|
498
|
+
#chart
|
|
499
|
+
class="w-100"
|
|
500
|
+
type="bar"
|
|
501
|
+
[data]="chartData"
|
|
502
|
+
[width]="width"
|
|
503
|
+
[height]="height"
|
|
504
|
+
></abp-chart>
|
|
505
|
+
</div>
|
|
506
|
+
</div>
|
|
507
|
+
</div>
|
|
508
|
+
</div>
|
|
509
|
+
`,
|
|
510
|
+
}]
|
|
511
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i1.PermissionService }, { type: i2$1.AuditLogsService }]; }, propDecorators: { initialized: [{
|
|
512
|
+
type: Output
|
|
513
|
+
}], width: [{
|
|
514
|
+
type: Input
|
|
515
|
+
}], height: [{
|
|
516
|
+
type: Input
|
|
517
|
+
}], chart: [{
|
|
518
|
+
type: ViewChild,
|
|
519
|
+
args: [ChartComponent]
|
|
520
|
+
}] } });
|
|
521
|
+
|
|
522
|
+
class ErrorRateWidgetComponent {
|
|
523
|
+
constructor(permissionService, service) {
|
|
524
|
+
this.permissionService = permissionService;
|
|
525
|
+
this.service = service;
|
|
526
|
+
this.data = {};
|
|
527
|
+
this.initialized = new BehaviorSubject(this);
|
|
528
|
+
this.width = 273;
|
|
529
|
+
this.height = 136;
|
|
530
|
+
this.chartData = {};
|
|
531
|
+
this.draw = (filter) => {
|
|
532
|
+
if (!this.permissionService.getGrantedPolicy('AuditLogging.AuditLogs')) {
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
this.service
|
|
536
|
+
.getErrorRate({
|
|
537
|
+
startDate: filter.startDate,
|
|
538
|
+
endDate: filter.endDate,
|
|
539
|
+
})
|
|
540
|
+
.subscribe(res => {
|
|
541
|
+
this.data = res.data;
|
|
542
|
+
this.setChartData();
|
|
543
|
+
});
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
setChartData() {
|
|
547
|
+
if (!this.data || JSON.stringify(this.data) === '{}') {
|
|
548
|
+
this.chartData = {};
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
const dataKeys = Object.keys(this.data);
|
|
552
|
+
setTimeout(() => {
|
|
553
|
+
this.chartData = {
|
|
554
|
+
labels: dataKeys,
|
|
555
|
+
datasets: [
|
|
556
|
+
{
|
|
557
|
+
data: dataKeys.map(key => this.data[key]),
|
|
558
|
+
backgroundColor: ['#d76e6e', '#63ac44'],
|
|
559
|
+
},
|
|
560
|
+
],
|
|
561
|
+
};
|
|
562
|
+
this.chart.refresh();
|
|
563
|
+
}, 0);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
ErrorRateWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ErrorRateWidgetComponent, deps: [{ token: i1.PermissionService }, { token: i2$1.AuditLogsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
567
|
+
ErrorRateWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", 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: `
|
|
568
|
+
<div *abpPermission="'AuditLogging.AuditLogs'" class="abp-widget-wrapper">
|
|
569
|
+
<div class="card">
|
|
570
|
+
<div class="card-header">
|
|
571
|
+
<h5 class="card-title">
|
|
572
|
+
{{ 'AbpAuditLogging::ErrorRateInLogs' | abpLocalization }}
|
|
573
|
+
</h5>
|
|
574
|
+
</div>
|
|
575
|
+
<div class="card-body">
|
|
576
|
+
<div class="row">
|
|
577
|
+
<abp-chart
|
|
578
|
+
#chart
|
|
579
|
+
class="w-100"
|
|
580
|
+
type="pie"
|
|
581
|
+
[data]="chartData"
|
|
582
|
+
[width]="width"
|
|
583
|
+
[height]="height"
|
|
584
|
+
></abp-chart>
|
|
585
|
+
</div>
|
|
586
|
+
</div>
|
|
587
|
+
</div>
|
|
588
|
+
</div>
|
|
589
|
+
`, 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 } });
|
|
590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ErrorRateWidgetComponent, decorators: [{
|
|
591
|
+
type: Component,
|
|
592
|
+
args: [{
|
|
593
|
+
selector: 'abp-error-rate-widget',
|
|
594
|
+
template: `
|
|
595
|
+
<div *abpPermission="'AuditLogging.AuditLogs'" class="abp-widget-wrapper">
|
|
596
|
+
<div class="card">
|
|
597
|
+
<div class="card-header">
|
|
598
|
+
<h5 class="card-title">
|
|
599
|
+
{{ 'AbpAuditLogging::ErrorRateInLogs' | abpLocalization }}
|
|
600
|
+
</h5>
|
|
601
|
+
</div>
|
|
602
|
+
<div class="card-body">
|
|
603
|
+
<div class="row">
|
|
604
|
+
<abp-chart
|
|
605
|
+
#chart
|
|
606
|
+
class="w-100"
|
|
607
|
+
type="pie"
|
|
608
|
+
[data]="chartData"
|
|
609
|
+
[width]="width"
|
|
610
|
+
[height]="height"
|
|
611
|
+
></abp-chart>
|
|
612
|
+
</div>
|
|
613
|
+
</div>
|
|
614
|
+
</div>
|
|
615
|
+
</div>
|
|
616
|
+
`,
|
|
617
|
+
}]
|
|
618
|
+
}], ctorParameters: function () { return [{ type: i1.PermissionService }, { type: i2$1.AuditLogsService }]; }, propDecorators: { initialized: [{
|
|
619
|
+
type: Output
|
|
620
|
+
}], width: [{
|
|
621
|
+
type: Input
|
|
622
|
+
}], height: [{
|
|
623
|
+
type: Input
|
|
624
|
+
}], chart: [{
|
|
625
|
+
type: ViewChild,
|
|
626
|
+
args: [ChartComponent]
|
|
627
|
+
}] } });
|
|
628
|
+
|
|
629
|
+
class AuditLoggingModule {
|
|
630
|
+
static forChild(options = {}) {
|
|
631
|
+
return {
|
|
632
|
+
ngModule: AuditLoggingModule,
|
|
633
|
+
providers: [
|
|
634
|
+
{
|
|
635
|
+
provide: AUDIT_LOGGING_ENTITY_ACTION_CONTRIBUTORS,
|
|
636
|
+
useValue: options.entityActionContributors,
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
provide: AUDIT_LOGGING_TOOLBAR_ACTION_CONTRIBUTORS,
|
|
640
|
+
useValue: options.toolbarActionContributors,
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
provide: AUDIT_LOGGING_ENTITY_PROP_CONTRIBUTORS,
|
|
644
|
+
useValue: options.entityPropContributors,
|
|
645
|
+
},
|
|
646
|
+
AuditLoggingGuard,
|
|
647
|
+
AuditLoggingExtensionsGuard,
|
|
648
|
+
],
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
static forLazy(options = {}) {
|
|
652
|
+
return new LazyModuleFactory(AuditLoggingModule.forChild(options));
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
AuditLoggingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
656
|
+
AuditLoggingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingModule, declarations: [AuditLogsComponent,
|
|
657
|
+
EntityChangesComponent,
|
|
658
|
+
ErrorRateWidgetComponent,
|
|
659
|
+
AverageExecutionDurationWidgetComponent], imports: [AuditLoggingRoutingModule,
|
|
660
|
+
CoreModule,
|
|
661
|
+
CommercialUiModule,
|
|
662
|
+
ThemeSharedModule,
|
|
663
|
+
NgbNavModule,
|
|
664
|
+
NgbDatepickerModule,
|
|
665
|
+
PageModule,
|
|
666
|
+
ChartModule], exports: [AuditLogsComponent,
|
|
667
|
+
EntityChangesComponent,
|
|
668
|
+
ErrorRateWidgetComponent,
|
|
669
|
+
AverageExecutionDurationWidgetComponent] });
|
|
670
|
+
AuditLoggingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingModule, imports: [[
|
|
671
|
+
AuditLoggingRoutingModule,
|
|
672
|
+
CoreModule,
|
|
673
|
+
CommercialUiModule,
|
|
674
|
+
ThemeSharedModule,
|
|
675
|
+
NgbNavModule,
|
|
676
|
+
NgbDatepickerModule,
|
|
677
|
+
PageModule,
|
|
678
|
+
ChartModule,
|
|
679
|
+
]] });
|
|
680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuditLoggingModule, decorators: [{
|
|
681
|
+
type: NgModule,
|
|
682
|
+
args: [{
|
|
683
|
+
declarations: [
|
|
684
|
+
AuditLogsComponent,
|
|
685
|
+
EntityChangesComponent,
|
|
686
|
+
ErrorRateWidgetComponent,
|
|
687
|
+
AverageExecutionDurationWidgetComponent,
|
|
688
|
+
],
|
|
689
|
+
exports: [
|
|
690
|
+
AuditLogsComponent,
|
|
691
|
+
EntityChangesComponent,
|
|
692
|
+
ErrorRateWidgetComponent,
|
|
693
|
+
AverageExecutionDurationWidgetComponent,
|
|
694
|
+
],
|
|
695
|
+
imports: [
|
|
696
|
+
AuditLoggingRoutingModule,
|
|
697
|
+
CoreModule,
|
|
698
|
+
CommercialUiModule,
|
|
699
|
+
ThemeSharedModule,
|
|
700
|
+
NgbNavModule,
|
|
701
|
+
NgbDatepickerModule,
|
|
702
|
+
PageModule,
|
|
703
|
+
ChartModule,
|
|
704
|
+
],
|
|
705
|
+
}]
|
|
706
|
+
}] });
|
|
707
|
+
|
|
708
|
+
var eEntityChangeType;
|
|
709
|
+
(function (eEntityChangeType) {
|
|
710
|
+
eEntityChangeType[eEntityChangeType["Created"] = 0] = "Created";
|
|
711
|
+
eEntityChangeType[eEntityChangeType["Updated"] = 1] = "Updated";
|
|
712
|
+
eEntityChangeType[eEntityChangeType["Deleted"] = 2] = "Deleted";
|
|
713
|
+
})(eEntityChangeType || (eEntityChangeType = {}));
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Generated bundle index. Do not edit.
|
|
717
|
+
*/
|
|
718
|
+
|
|
719
|
+
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 };
|
|
720
|
+
//# sourceMappingURL=volo-abp.ng.audit-logging.mjs.map
|