@volo/abp.ng.audit-logging 4.4.0 → 5.0.0-beta.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 +3 -1
- package/bundles/volo-abp.ng.audit-logging-common.umd.js +1 -1
- package/bundles/volo-abp.ng.audit-logging-config.umd.js +1 -1
- package/bundles/volo-abp.ng.audit-logging-proxy.umd.js +1 -0
- package/bundles/volo-abp.ng.audit-logging.umd.js +1 -1
- package/common/package.json +0 -1
- package/common/tokens/features.token.d.ts +1 -1
- package/common/volo-abp.ng.audit-logging-common.d.ts +1 -0
- package/config/audit-logging-config.module.d.ts +8 -0
- package/config/components/entity-change-details.component.d.ts +4 -1
- package/config/components/entity-change-modal.component.d.ts +4 -1
- package/config/package.json +0 -1
- package/config/providers/route.provider.d.ts +1 -1
- package/config/services/entity-change-modal.service.d.ts +4 -1
- package/config/volo-abp.ng.audit-logging-config.d.ts +1 -4
- package/esm2015/common/tokens/features.token.js +1 -1
- package/esm2015/config/audit-logging-config.module.js +1 -1
- package/esm2015/config/components/entity-change-details.component.js +1 -1
- package/esm2015/config/components/entity-change-modal.component.js +1 -1
- package/esm2015/config/services/entity-change-modal.service.js +1 -1
- package/esm2015/config/volo-abp.ng.audit-logging-config.js +1 -1
- package/esm2015/lib/audit-logging-routing.module.js +1 -1
- package/esm2015/lib/audit-logging.module.js +1 -1
- package/esm2015/lib/components/audit-logs/audit-logs.component.js +1 -1
- package/esm2015/lib/components/entity-change/entity-changes.component.js +1 -1
- package/esm2015/lib/components/widgets/average-execution-duration-widget.component.js +1 -1
- package/esm2015/lib/components/widgets/error-rate-widget.component.js +1 -1
- package/esm2015/lib/defaults/default-audit-logs-entity-actions.js +1 -1
- package/esm2015/lib/defaults/default-audit-logs-entity-props.js +1 -1
- package/esm2015/lib/defaults/default-entity-changes-entity-actions.js +1 -1
- package/esm2015/lib/guards/audit-logging.guard.js +1 -1
- package/esm2015/lib/guards/extensions.guard.js +1 -1
- package/esm2015/proxy/lib/index.js +1 -0
- package/esm2015/{lib → proxy/lib}/proxy/audit-logging/audit-logs.service.js +1 -1
- package/esm2015/{lib → proxy/lib}/proxy/audit-logging/index.js +0 -0
- package/esm2015/{lib → proxy/lib}/proxy/audit-logging/models.js +0 -0
- package/esm2015/{lib → proxy/lib}/proxy/auditing/entity-change-type.enum.js +0 -0
- package/esm2015/{lib → proxy/lib}/proxy/auditing/index.js +0 -0
- package/esm2015/proxy/public-api.js +1 -0
- package/esm2015/proxy/volo-abp.ng.audit-logging-proxy.js +1 -0
- package/esm2015/public-api.js +1 -1
- package/esm2015/volo-abp.ng.audit-logging.js +1 -1
- package/fesm2015/volo-abp.ng.audit-logging-common.js +2 -3
- package/fesm2015/volo-abp.ng.audit-logging-config.js +53 -49
- package/fesm2015/volo-abp.ng.audit-logging-proxy.js +71 -0
- package/fesm2015/volo-abp.ng.audit-logging.js +347 -491
- package/lib/audit-logging-routing.module.d.ts +5 -0
- package/lib/audit-logging.module.d.ts +15 -0
- package/lib/components/audit-logs/audit-logs.component.d.ts +8 -10
- package/lib/components/entity-change/entity-changes.component.d.ts +5 -4
- package/lib/components/widgets/average-execution-duration-widget.component.d.ts +14 -12
- package/lib/components/widgets/error-rate-widget.component.d.ts +13 -11
- package/lib/defaults/default-audit-logs-entity-actions.d.ts +1 -1
- package/lib/defaults/default-audit-logs-entity-props.d.ts +1 -1
- package/lib/defaults/default-audit-logs-toolbar-actions.d.ts +1 -1
- package/lib/defaults/default-entity-changes-entity-actions.d.ts +1 -1
- package/lib/guards/audit-logging.guard.d.ts +3 -0
- package/lib/guards/extensions.guard.d.ts +3 -0
- package/lib/models/audit-logging.d.ts +1 -1
- package/lib/models/config-options.d.ts +1 -1
- package/lib/tokens/extensions.token.d.ts +1 -2
- package/package.json +4 -5
- package/proxy/lib/index.d.ts +2 -0
- package/{lib → proxy/lib}/proxy/audit-logging/audit-logs.service.d.ts +3 -0
- package/{lib → proxy/lib}/proxy/audit-logging/index.d.ts +0 -0
- package/{lib → proxy/lib}/proxy/audit-logging/models.d.ts +1 -0
- package/{lib → proxy/lib}/proxy/auditing/entity-change-type.enum.d.ts +1 -1
- package/{lib → proxy/lib}/proxy/auditing/index.d.ts +0 -0
- package/proxy/package.json +10 -0
- package/proxy/public-api.d.ts +1 -0
- package/proxy/volo-abp.ng.audit-logging-proxy.d.ts +5 -0
- package/public-api.d.ts +0 -5
- package/volo-abp.ng.audit-logging.d.ts +1 -13
- package/bundles/volo-abp.ng.audit-logging-common.umd.min.js +0 -1
- package/bundles/volo-abp.ng.audit-logging-config.umd.min.js +0 -1
- package/bundles/volo-abp.ng.audit-logging.umd.min.js +0 -1
- package/common/volo-abp.ng.audit-logging-common.metadata.json +0 -1
- package/config/volo-abp.ng.audit-logging-config.metadata.json +0 -1
- package/esm2015/lib/actions/audit-logging.actions.js +0 -1
- package/esm2015/lib/actions/index.js +0 -1
- package/esm2015/lib/services/audit-logging-state.service.js +0 -1
- package/esm2015/lib/services/index.js +0 -1
- package/esm2015/lib/states/audit-logging.state.js +0 -1
- package/esm2015/lib/states/index.js +0 -1
- package/lib/actions/audit-logging.actions.d.ts +0 -16
- package/lib/actions/index.d.ts +0 -1
- package/lib/services/audit-logging-state.service.d.ts +0 -13
- package/lib/services/index.d.ts +0 -1
- package/lib/states/audit-logging.state.d.ts +0 -16
- package/lib/states/index.d.ts +0 -1
- package/volo-abp.ng.audit-logging.metadata.json +0 -1
|
@@ -1,40 +1,30 @@
|
|
|
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';
|
|
1
5
|
import * as i1 from '@abp/ng.core';
|
|
2
|
-
import {
|
|
6
|
+
import { mapEnumToOptions, ListService, ConfigStateService, DynamicLayoutComponent, AuthGuard, PermissionGuard, ReplaceableRouteContainerComponent, LazyModuleFactory, CoreModule } from '@abp/ng.core';
|
|
7
|
+
import * as i8 from '@abp/ng.theme.shared';
|
|
3
8
|
import { collapse, fadeIn, ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
4
9
|
import * as i0 from '@angular/core';
|
|
5
|
-
import {
|
|
10
|
+
import { Component, ChangeDetectionStrategy, Injectable, Inject, InjectionToken, NgModule, Output, Input, ViewChild } from '@angular/core';
|
|
11
|
+
import * as i7 from '@ng-bootstrap/ng-bootstrap';
|
|
6
12
|
import { NgbDateAdapter, NgbNavModule, NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap';
|
|
7
|
-
import * as i1$1 from '@ngxs/store';
|
|
8
|
-
import { Action, Selector, State, Store, Select, NgxsModule } from '@ngxs/store';
|
|
9
13
|
import { SHOW_ENTITY_HISTORY, CommercialUiModule } from '@volo/abp.commercial.ng.ui';
|
|
10
|
-
import
|
|
14
|
+
import * as i1$2 from '@angular/router';
|
|
11
15
|
import { RouterModule } from '@angular/router';
|
|
12
|
-
import
|
|
16
|
+
import * as i5 from '@abp/ng.theme.shared/extensions';
|
|
13
17
|
import { EXTENSIONS_IDENTIFIER, DateAdapter, EntityAction, EntityProp, ToolbarAction, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps } from '@abp/ng.theme.shared/extensions';
|
|
14
18
|
import { trigger, transition, useAnimation } from '@angular/animations';
|
|
15
|
-
import
|
|
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';
|
|
16
25
|
import { AUDIT_LOGGING_FEATURES } from '@volo/abp.ng.audit-logging/common';
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
class GetAuditLogs {
|
|
21
|
-
constructor(payload) {
|
|
22
|
-
this.payload = payload;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
GetAuditLogs.type = '[AuditLogging] Get';
|
|
26
|
-
class GetAverageExecutionDurationPerDay {
|
|
27
|
-
constructor(payload) {
|
|
28
|
-
this.payload = payload;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
GetAverageExecutionDurationPerDay.type = '[AuditLogging] Get Average Execution Duration Per Day';
|
|
32
|
-
class GetErrorRate {
|
|
33
|
-
constructor(payload) {
|
|
34
|
-
this.payload = payload;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
GetErrorRate.type = '[AuditLogging] Get Error Rate';
|
|
26
|
+
import * as i1$1 from 'rxjs';
|
|
27
|
+
import { of, BehaviorSubject } from 'rxjs';
|
|
38
28
|
|
|
39
29
|
const HTTP_METHODS = ['GET', 'POST', 'DELETE', 'PUT', 'HEAD', 'CONNECT', 'OPTIONS', 'TRACE'];
|
|
40
30
|
const HTTP_STATUS_CODES = [
|
|
@@ -100,164 +90,71 @@ const HTTP_STATUS_CODES = [
|
|
|
100
90
|
{ code: 511, message: 'Network Authentication Required' },
|
|
101
91
|
];
|
|
102
92
|
|
|
103
|
-
class
|
|
104
|
-
constructor(
|
|
105
|
-
this.
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
this.
|
|
117
|
-
|
|
118
|
-
url: `/api/audit-logging/audit-logs/entity-changes/${entityChangeId}`,
|
|
119
|
-
}, { apiName: this.apiName });
|
|
120
|
-
this.getEntityChangeWithUsername = (entityChangeId) => this.restService.request({
|
|
121
|
-
method: 'GET',
|
|
122
|
-
url: `/api/audit-logging/audit-logs/entity-change-with-username/${entityChangeId}`,
|
|
123
|
-
}, { apiName: this.apiName });
|
|
124
|
-
this.getEntityChanges = (input) => this.restService.request({
|
|
125
|
-
method: 'GET',
|
|
126
|
-
url: `/api/audit-logging/audit-logs/entity-changes`,
|
|
127
|
-
params: {
|
|
128
|
-
auditLogId: input.auditLogId,
|
|
129
|
-
entityChangeType: input.entityChangeType,
|
|
130
|
-
entityId: input.entityId,
|
|
131
|
-
entityTypeFullName: input.entityTypeFullName,
|
|
132
|
-
startDate: input.startDate,
|
|
133
|
-
endDate: input.endDate,
|
|
134
|
-
sorting: input.sorting,
|
|
135
|
-
skipCount: input.skipCount,
|
|
136
|
-
maxResultCount: input.maxResultCount,
|
|
137
|
-
},
|
|
138
|
-
}, { apiName: this.apiName });
|
|
139
|
-
this.getEntityChangesWithUsername = (input) => this.restService.request({
|
|
140
|
-
method: 'GET',
|
|
141
|
-
url: `/api/audit-logging/audit-logs/entity-changes-with-username`,
|
|
142
|
-
params: { entityId: input.entityId, entityTypeFullName: input.entityTypeFullName },
|
|
143
|
-
}, { apiName: this.apiName });
|
|
144
|
-
this.getErrorRate = (filter) => this.restService.request({
|
|
145
|
-
method: 'GET',
|
|
146
|
-
url: `/api/audit-logging/audit-logs/statistics/error-rate`,
|
|
147
|
-
params: { startDate: filter.startDate, endDate: filter.endDate },
|
|
148
|
-
}, { apiName: this.apiName });
|
|
149
|
-
this.getList = (input) => this.restService.request({
|
|
150
|
-
method: 'GET',
|
|
151
|
-
url: `/api/audit-logging/audit-logs`,
|
|
152
|
-
params: {
|
|
153
|
-
startTime: input.startTime,
|
|
154
|
-
endTime: input.endTime,
|
|
155
|
-
url: input.url,
|
|
156
|
-
userName: input.userName,
|
|
157
|
-
applicationName: input.applicationName,
|
|
158
|
-
correlationId: input.correlationId,
|
|
159
|
-
httpMethod: input.httpMethod,
|
|
160
|
-
httpStatusCode: input.httpStatusCode,
|
|
161
|
-
maxExecutionDuration: input.maxExecutionDuration,
|
|
162
|
-
minExecutionDuration: input.minExecutionDuration,
|
|
163
|
-
hasException: input.hasException,
|
|
164
|
-
sorting: input.sorting,
|
|
165
|
-
skipCount: input.skipCount,
|
|
166
|
-
maxResultCount: input.maxResultCount,
|
|
167
|
-
},
|
|
168
|
-
}, { apiName: this.apiName });
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
AuditLogsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuditLogsService_Factory() { return new AuditLogsService(i0.ɵɵinject(i1.RestService)); }, token: AuditLogsService, providedIn: "root" });
|
|
172
|
-
AuditLogsService.decorators = [
|
|
173
|
-
{ type: Injectable, args: [{
|
|
174
|
-
providedIn: 'root',
|
|
175
|
-
},] }
|
|
176
|
-
];
|
|
177
|
-
AuditLogsService.ctorParameters = () => [
|
|
178
|
-
{ type: RestService }
|
|
179
|
-
];
|
|
180
|
-
|
|
181
|
-
let AuditLoggingState = class AuditLoggingState {
|
|
182
|
-
constructor(service) {
|
|
183
|
-
this.service = service;
|
|
184
|
-
}
|
|
185
|
-
static get({ result }) {
|
|
186
|
-
return result.items || [];
|
|
187
|
-
}
|
|
188
|
-
static getTotalCount({ result }) {
|
|
189
|
-
return result.totalCount || 0;
|
|
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);
|
|
190
108
|
}
|
|
191
|
-
|
|
192
|
-
return
|
|
109
|
+
get data() {
|
|
110
|
+
return this.response.items;
|
|
193
111
|
}
|
|
194
|
-
|
|
195
|
-
return
|
|
112
|
+
get count() {
|
|
113
|
+
return this.response.totalCount;
|
|
196
114
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
result,
|
|
200
|
-
})));
|
|
115
|
+
ngAfterViewInit() {
|
|
116
|
+
this.hookToQuery();
|
|
201
117
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
});
|
|
207
|
-
}));
|
|
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));
|
|
208
122
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
patchState({
|
|
212
|
-
errorRateStatistics: errorRate.data,
|
|
213
|
-
});
|
|
214
|
-
}));
|
|
123
|
+
handleSubmit() {
|
|
124
|
+
this.list.get();
|
|
215
125
|
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
__decorate([
|
|
224
|
-
Action(GetAuditLogs)
|
|
225
|
-
], AuditLoggingState.prototype, "get", null);
|
|
226
|
-
__decorate([
|
|
227
|
-
Action(GetAverageExecutionDurationPerDay)
|
|
228
|
-
], AuditLoggingState.prototype, "getAverageExecutionData", null);
|
|
229
|
-
__decorate([
|
|
230
|
-
Action(GetErrorRate)
|
|
231
|
-
], AuditLoggingState.prototype, "getErrorRate", null);
|
|
232
|
-
__decorate([
|
|
233
|
-
Selector()
|
|
234
|
-
], AuditLoggingState, "get", null);
|
|
235
|
-
__decorate([
|
|
236
|
-
Selector()
|
|
237
|
-
], AuditLoggingState, "getTotalCount", null);
|
|
238
|
-
__decorate([
|
|
239
|
-
Selector()
|
|
240
|
-
], AuditLoggingState, "getAverageExecutionStatistics", null);
|
|
241
|
-
__decorate([
|
|
242
|
-
Selector()
|
|
243
|
-
], AuditLoggingState, "getErrorRateStatistics", null);
|
|
244
|
-
AuditLoggingState = __decorate([
|
|
245
|
-
State({
|
|
246
|
-
name: 'AuditLoggingState',
|
|
247
|
-
defaults: {
|
|
248
|
-
result: {},
|
|
249
|
-
averageExecutionStatistics: {},
|
|
250
|
-
errorRateStatistics: {},
|
|
126
|
+
}
|
|
127
|
+
EntityChangesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.8", 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.8", type: EntityChangesComponent, selector: "abp-entity-changes", providers: [
|
|
129
|
+
ListService,
|
|
130
|
+
{
|
|
131
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
132
|
+
useValue: "AuditLogging.EntityChangesComponent" /* EntityChanges */,
|
|
251
133
|
},
|
|
252
|
-
|
|
253
|
-
],
|
|
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=\"form-group\">\n <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=\"form-group\">\n <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=\"form-group\">\n <label for=\"change-type\">{{ 'AbpAuditLogging::ChangeType' | abpLocalization }}</label\n ><select\n id=\"change-type\"\n class=\"custom-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 >{{ 'AbpAuditLogging::' + type.key | abpLocalization }}</option\n >\n </select>\n </div>\n </div>\n <div class=\"col-md-6 col-xl-3\">\n <div class=\"form-group\">\n <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\">\n <button type=\"submit\" class=\"btn btn-primary btn-block mt-0 mt-md-4\">\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.8", 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 }]; } });
|
|
254
152
|
|
|
255
|
-
const ɵ0$5 = "AuditLogging.AuditLogsComponent" /* AuditLogs */;
|
|
256
153
|
class AuditLogsComponent {
|
|
257
|
-
constructor(list, service
|
|
154
|
+
constructor(list, service) {
|
|
258
155
|
this.list = list;
|
|
259
156
|
this.service = service;
|
|
260
|
-
this.
|
|
157
|
+
this.data = { items: [], totalCount: 0 };
|
|
261
158
|
this.selected = {};
|
|
262
159
|
this.pageQuery = {
|
|
263
160
|
maxResultCount: 10,
|
|
@@ -277,12 +174,12 @@ class AuditLogsComponent {
|
|
|
277
174
|
}
|
|
278
175
|
hookToQuery() {
|
|
279
176
|
this.list
|
|
280
|
-
.hookToQuery(query => this.
|
|
177
|
+
.hookToQuery(query => this.service.getList(Object.assign(Object.assign(Object.assign(Object.assign({}, this.pageQuery), (this.pageQuery.minExecutionDuration === null && {
|
|
281
178
|
minExecutionDuration: undefined,
|
|
282
179
|
})), (this.pageQuery.maxExecutionDuration === null && {
|
|
283
180
|
maxExecutionDuration: undefined,
|
|
284
|
-
})), query)))
|
|
285
|
-
.subscribe();
|
|
181
|
+
})), query)))
|
|
182
|
+
.subscribe(res => (this.data = res));
|
|
286
183
|
}
|
|
287
184
|
openModal(id) {
|
|
288
185
|
this.service
|
|
@@ -294,7 +191,7 @@ class AuditLogsComponent {
|
|
|
294
191
|
});
|
|
295
192
|
}
|
|
296
193
|
httpCodeClass(httpStatusCode) {
|
|
297
|
-
switch (httpStatusCode.toString()[0]) {
|
|
194
|
+
switch (httpStatusCode === null || httpStatusCode === void 0 ? void 0 : httpStatusCode.toString()[0]) {
|
|
298
195
|
case '2':
|
|
299
196
|
return 'badge-success';
|
|
300
197
|
case '3':
|
|
@@ -321,32 +218,31 @@ class AuditLogsComponent {
|
|
|
321
218
|
}
|
|
322
219
|
}
|
|
323
220
|
}
|
|
324
|
-
AuditLogsComponent
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
template: "<ng-container *ngIf=\"datas$ | async as data\">\n <div id=\"wrapper\">\n <abp-page [title]=\"'AbpAuditLogging::AuditLogs' | abpLocalization\" [toolbar]=\"data\">\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=\"form-group\">\n <label for=\"startTime\">{{\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=\"form-group\">\n <label for=\"endTime\">{{ 'AbpAuditLogging::EndTime' | abpLocalization }}</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=\"form-group\">\n <label for=\"userName\">{{\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=\"form-group\">\n <label for=\"url\">{{ 'AbpAuditLogging::UrlFilter' | abpLocalization }}</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=\"form-group\">\n <label for=\"minDuration\">{{\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=\"form-group\">\n <label for=\"maxDuration\">{{\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\">\n <div class=\"col-md-6 col-lg-2\">\n <div class=\"form-group\">\n <label for=\"httpMethod\">{{\n 'AbpAuditLogging::HttpMethod' | abpLocalization\n }}</label\n ><select\n id=\"httpMethod\"\n class=\"custom-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=\"form-group\">\n <label for=\"httpStatusCode\">{{\n 'AbpAuditLogging::HttpStatusCode' | abpLocalization\n }}</label\n ><select\n id=\"httpStatusCode\"\n class=\"custom-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=\"form-group mb-lg-0\">\n <label for=\"applicationName\">{{\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=\"form-group mb-lg-0\">\n <label for=\"correlationId\">{{\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=\"form-group mb-lg-0\">\n <label for=\"hasException\">{{\n 'AbpAuditLogging::HasException' | abpLocalization\n }}</label>\n <select\n name=\"hasException\"\n id=\"hasException\"\n class=\"custom-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\">\n <button\n type=\"button\"\n class=\"btn btn-primary btn-block mt-0 mt-md-4\"\n (click)=\"list.get()\"\n >\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\"\n [recordsTotal]=\"totalCount$ | async\"\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</ng-container>\n\n<abp-modal *ngIf=\"selected\" [(visible)]=\"modalVisible\">\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 <button\n class=\"btn btn-primary btn-block\"\n type=\"button\"\n (click)=\"collapseActionStates[i] = !collapseActionStates[i]\"\n >\n {{ action.serviceName }}\n </button>\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",
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
]
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
],
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
], AuditLogsComponent.prototype, "totalCount$", void 0);
|
|
221
|
+
AuditLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.8", 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.8", 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=\"form-group\">\n <label for=\"startTime\">{{\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=\"form-group\">\n <label for=\"endTime\">{{ 'AbpAuditLogging::EndTime' | abpLocalization }}</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=\"form-group\">\n <label for=\"userName\">{{\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=\"form-group\">\n <label for=\"url\">{{ 'AbpAuditLogging::UrlFilter' | abpLocalization }}</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=\"form-group\">\n <label for=\"minDuration\">{{\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=\"form-group\">\n <label for=\"maxDuration\">{{\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=\"form-group\">\n <label for=\"httpMethod\">{{\n 'AbpAuditLogging::HttpMethod' | abpLocalization\n }}</label\n ><select\n id=\"httpMethod\"\n class=\"custom-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=\"form-group\">\n <label for=\"httpStatusCode\">{{\n 'AbpAuditLogging::HttpStatusCode' | abpLocalization\n }}</label\n ><select\n id=\"httpStatusCode\"\n class=\"custom-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=\"form-group mb-lg-0\">\n <label for=\"applicationName\">{{\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=\"form-group mb-lg-0\">\n <label for=\"correlationId\">{{\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=\"form-group mb-lg-0\">\n <label for=\"correlationId\">{{\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=\"form-group mb-lg-0\">\n <label for=\"hasException\">{{\n 'AbpAuditLogging::HasException' | abpLocalization\n }}</label>\n <select\n name=\"hasException\"\n id=\"hasException\"\n class=\"custom-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\">\n <button\n type=\"button\"\n class=\"btn btn-primary btn-block mt-0 mt-md-4\"\n (click)=\"list.get()\"\n >\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\">\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 <button\n class=\"btn btn-primary btn-block\"\n type=\"button\"\n (click)=\"collapseActionStates[i] = !collapseActionStates[i]\"\n >\n {{ action.serviceName }}\n </button>\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.8", 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 }]; } });
|
|
350
246
|
|
|
351
247
|
class AuditLoggingGuard {
|
|
352
248
|
constructor(auditLoggingFeatures) {
|
|
@@ -356,34 +252,26 @@ class AuditLoggingGuard {
|
|
|
356
252
|
return this.auditLoggingFeatures.pipe(map(features => features.enable));
|
|
357
253
|
}
|
|
358
254
|
}
|
|
359
|
-
AuditLoggingGuard
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
255
|
+
AuditLoggingGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.8", 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.8", ngImport: i0, type: AuditLoggingGuard });
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", 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
|
+
}] }]; } });
|
|
365
263
|
|
|
366
|
-
const ɵ0$4 = data => {
|
|
367
|
-
const component = data.getInjected(AuditLogsComponent);
|
|
368
|
-
component.openModal(data.record.id);
|
|
369
|
-
};
|
|
370
264
|
const DEFAULT_AUDIT_LOGS_ENTITY_ACTIONS = EntityAction.createMany([
|
|
371
265
|
{
|
|
372
266
|
text: 'AbpAuditLogging::Detail',
|
|
373
|
-
action:
|
|
267
|
+
action: data => {
|
|
268
|
+
const component = data.getInjected(AuditLogsComponent);
|
|
269
|
+
component.openModal(data.record.id);
|
|
270
|
+
},
|
|
374
271
|
icon: 'fa fa-search',
|
|
375
272
|
},
|
|
376
273
|
]);
|
|
377
274
|
|
|
378
|
-
const ɵ0$3 = data => {
|
|
379
|
-
const component = data.getInjected(AuditLogsComponent);
|
|
380
|
-
const { httpMethod, httpStatusCode, url } = data.record;
|
|
381
|
-
const methodClass = component.httpMethodClass(httpMethod);
|
|
382
|
-
const statusClass = component.httpCodeClass(httpStatusCode);
|
|
383
|
-
return of(`<span class="badge ${statusClass} mr-1">${httpStatusCode}</span>` +
|
|
384
|
-
`<span class="badge ${methodClass} mr-1">${httpMethod}</span>` +
|
|
385
|
-
(url || ''));
|
|
386
|
-
};
|
|
387
275
|
const DEFAULT_AUDIT_LOGS_ENTITY_PROPS = EntityProp.createMany([
|
|
388
276
|
{
|
|
389
277
|
type: "string" /* String */,
|
|
@@ -391,7 +279,15 @@ const DEFAULT_AUDIT_LOGS_ENTITY_PROPS = EntityProp.createMany([
|
|
|
391
279
|
displayName: 'AbpAuditLogging::HttpRequest',
|
|
392
280
|
sortable: true,
|
|
393
281
|
columnWidth: 600,
|
|
394
|
-
valueResolver:
|
|
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} mr-1">${httpStatusCode}</span>` +
|
|
288
|
+
`<span class="badge ${methodClass} mr-1">${httpMethod}</span>` +
|
|
289
|
+
(url || ''));
|
|
290
|
+
},
|
|
395
291
|
},
|
|
396
292
|
{
|
|
397
293
|
type: "string" /* String */,
|
|
@@ -434,22 +330,21 @@ const DEFAULT_AUDIT_LOGS_TOOLBAR_ACTIONS = ToolbarAction.createMany([]);
|
|
|
434
330
|
|
|
435
331
|
const SHOW_ENTITY_DETAILS = new InjectionToken('SHOW_ENTITY_DETAILS');
|
|
436
332
|
|
|
437
|
-
const ɵ0$2 = data => {
|
|
438
|
-
const showDetails = data.getInjected(SHOW_ENTITY_DETAILS);
|
|
439
|
-
showDetails(data.record.id);
|
|
440
|
-
}, ɵ1 = data => {
|
|
441
|
-
const showHistory = data.getInjected(SHOW_ENTITY_HISTORY);
|
|
442
|
-
showHistory(data.record.entityId, data.record.entityTypeFullName);
|
|
443
|
-
};
|
|
444
333
|
const DEFAULT_ENTITY_CHANGES_ENTITY_ACTIONS = EntityAction.createMany([
|
|
445
334
|
{
|
|
446
335
|
text: 'AbpAuditLogging::ChangeDetails',
|
|
447
|
-
action:
|
|
336
|
+
action: data => {
|
|
337
|
+
const showDetails = data.getInjected(SHOW_ENTITY_DETAILS);
|
|
338
|
+
showDetails(data.record.id);
|
|
339
|
+
},
|
|
448
340
|
icon: 'fa fa-search',
|
|
449
341
|
},
|
|
450
342
|
{
|
|
451
343
|
text: 'AbpAuditLogging::FullChangeHistory',
|
|
452
|
-
action:
|
|
344
|
+
action: data => {
|
|
345
|
+
const showHistory = data.getInjected(SHOW_ENTITY_HISTORY);
|
|
346
|
+
showHistory(data.record.entityId, data.record.entityTypeFullName);
|
|
347
|
+
},
|
|
453
348
|
icon: 'fa fa-history',
|
|
454
349
|
},
|
|
455
350
|
]);
|
|
@@ -487,20 +382,12 @@ class AuditLoggingExtensionsGuard {
|
|
|
487
382
|
}), mapTo(true));
|
|
488
383
|
}
|
|
489
384
|
}
|
|
490
|
-
AuditLoggingExtensionsGuard
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
];
|
|
385
|
+
AuditLoggingExtensionsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: AuditLoggingExtensionsGuard, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
386
|
+
AuditLoggingExtensionsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: AuditLoggingExtensionsGuard });
|
|
387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: AuditLoggingExtensionsGuard, decorators: [{
|
|
388
|
+
type: Injectable
|
|
389
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
496
390
|
|
|
497
|
-
const ɵ0$1 = {
|
|
498
|
-
requiredPolicy: 'AuditLogging.AuditLogs',
|
|
499
|
-
replaceableComponent: {
|
|
500
|
-
key: "AuditLogging.AuditLogsComponent" /* AuditLogs */,
|
|
501
|
-
defaultComponent: AuditLogsComponent,
|
|
502
|
-
},
|
|
503
|
-
};
|
|
504
391
|
const routes = [
|
|
505
392
|
{
|
|
506
393
|
path: '',
|
|
@@ -510,91 +397,36 @@ const routes = [
|
|
|
510
397
|
{
|
|
511
398
|
path: '',
|
|
512
399
|
component: ReplaceableRouteContainerComponent,
|
|
513
|
-
data:
|
|
400
|
+
data: {
|
|
401
|
+
requiredPolicy: 'AuditLogging.AuditLogs',
|
|
402
|
+
replaceableComponent: {
|
|
403
|
+
key: "AuditLogging.AuditLogsComponent" /* AuditLogs */,
|
|
404
|
+
defaultComponent: AuditLogsComponent,
|
|
405
|
+
},
|
|
406
|
+
},
|
|
514
407
|
},
|
|
515
408
|
],
|
|
516
409
|
},
|
|
517
410
|
];
|
|
518
411
|
class AuditLoggingRoutingModule {
|
|
519
412
|
}
|
|
520
|
-
AuditLoggingRoutingModule
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
EntityChangeType[EntityChangeType["Updated"] = 1] = "Updated";
|
|
531
|
-
EntityChangeType[EntityChangeType["Deleted"] = 2] = "Deleted";
|
|
532
|
-
})(EntityChangeType || (EntityChangeType = {}));
|
|
533
|
-
const entityChangeTypeOptions = mapEnumToOptions(EntityChangeType);
|
|
534
|
-
|
|
535
|
-
const ɵ0 = "AuditLogging.EntityChangesComponent" /* EntityChanges */;
|
|
536
|
-
class EntityChangesComponent {
|
|
537
|
-
constructor(list, fb, auditLogsService, track) {
|
|
538
|
-
this.list = list;
|
|
539
|
-
this.fb = fb;
|
|
540
|
-
this.auditLogsService = auditLogsService;
|
|
541
|
-
this.track = track;
|
|
542
|
-
this.form = this.fb.group({
|
|
543
|
-
entityChangeType: [''],
|
|
544
|
-
entityTypeFullName: [''],
|
|
545
|
-
startDate: [''],
|
|
546
|
-
endDate: [''],
|
|
547
|
-
});
|
|
548
|
-
this.response = { items: [], totalCount: 0 };
|
|
549
|
-
this.changeType = EntityChangeType;
|
|
550
|
-
this.changeTypes = mapEnumToOptions(EntityChangeType);
|
|
551
|
-
}
|
|
552
|
-
get data() {
|
|
553
|
-
return this.response.items;
|
|
554
|
-
}
|
|
555
|
-
get count() {
|
|
556
|
-
return this.response.totalCount;
|
|
557
|
-
}
|
|
558
|
-
ngAfterViewInit() {
|
|
559
|
-
this.hookToQuery();
|
|
560
|
-
}
|
|
561
|
-
hookToQuery() {
|
|
562
|
-
this.list
|
|
563
|
-
.hookToQuery(query => this.auditLogsService.getEntityChanges(Object.assign(Object.assign({}, this.form.value), query)))
|
|
564
|
-
.subscribe(res => (this.response = res));
|
|
565
|
-
}
|
|
566
|
-
handleSubmit() {
|
|
567
|
-
this.list.get();
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
EntityChangesComponent.decorators = [
|
|
571
|
-
{ type: Component, args: [{
|
|
572
|
-
selector: 'abp-entity-changes',
|
|
573
|
-
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=\"form-group\">\n <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=\"form-group\">\n <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=\"form-group\">\n <label for=\"change-type\">{{ 'AbpAuditLogging::ChangeType' | abpLocalization }}</label\n ><select\n id=\"change-type\"\n class=\"custom-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 >{{ 'AbpAuditLogging::' + type.key | abpLocalization }}</option\n >\n </select>\n </div>\n </div>\n <div class=\"col-md-6 col-xl-3\">\n <div class=\"form-group\">\n <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\">\n <button type=\"submit\" class=\"btn btn-primary btn-block mt-0 mt-md-4\">\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",
|
|
574
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
575
|
-
providers: [
|
|
576
|
-
ListService,
|
|
577
|
-
{
|
|
578
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
579
|
-
useValue: ɵ0,
|
|
580
|
-
},
|
|
581
|
-
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
582
|
-
]
|
|
583
|
-
},] }
|
|
584
|
-
];
|
|
585
|
-
EntityChangesComponent.ctorParameters = () => [
|
|
586
|
-
{ type: ListService },
|
|
587
|
-
{ type: FormBuilder },
|
|
588
|
-
{ type: AuditLogsService },
|
|
589
|
-
{ type: TrackByService }
|
|
590
|
-
];
|
|
413
|
+
AuditLoggingRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: AuditLoggingRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
414
|
+
AuditLoggingRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: AuditLoggingRoutingModule, imports: [i1$2.RouterModule], exports: [RouterModule] });
|
|
415
|
+
AuditLoggingRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: AuditLoggingRoutingModule, imports: [[RouterModule.forChild(routes)], RouterModule] });
|
|
416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: AuditLoggingRoutingModule, decorators: [{
|
|
417
|
+
type: NgModule,
|
|
418
|
+
args: [{
|
|
419
|
+
imports: [RouterModule.forChild(routes)],
|
|
420
|
+
exports: [RouterModule],
|
|
421
|
+
}]
|
|
422
|
+
}] });
|
|
591
423
|
|
|
592
424
|
class AverageExecutionDurationWidgetComponent {
|
|
593
|
-
constructor(
|
|
594
|
-
this.store = store;
|
|
425
|
+
constructor(localizationService, permissionService, service) {
|
|
595
426
|
this.localizationService = localizationService;
|
|
596
|
-
this.subscription = subscription;
|
|
597
427
|
this.permissionService = permissionService;
|
|
428
|
+
this.service = service;
|
|
429
|
+
this.data = {};
|
|
598
430
|
this.initialized = new BehaviorSubject(this);
|
|
599
431
|
this.width = 273;
|
|
600
432
|
this.height = 136;
|
|
@@ -603,44 +435,65 @@ class AverageExecutionDurationWidgetComponent {
|
|
|
603
435
|
if (!this.permissionService.getGrantedPolicy('AuditLogging.AuditLogs')) {
|
|
604
436
|
return;
|
|
605
437
|
}
|
|
606
|
-
this.
|
|
607
|
-
startDate: filter.startDate,
|
|
608
|
-
|
|
609
|
-
|
|
438
|
+
this.service
|
|
439
|
+
.getAverageExecutionDurationPerDay({ startDate: filter.startDate, endDate: filter.endDate })
|
|
440
|
+
.subscribe(res => {
|
|
441
|
+
this.data = res.data;
|
|
442
|
+
this.setChartData();
|
|
443
|
+
});
|
|
610
444
|
};
|
|
611
|
-
this.listenToData();
|
|
612
445
|
}
|
|
613
|
-
|
|
614
|
-
this.
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
],
|
|
633
|
-
};
|
|
634
|
-
this.chart.refresh();
|
|
635
|
-
}, 0);
|
|
636
|
-
});
|
|
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);
|
|
637
465
|
}
|
|
638
466
|
}
|
|
639
|
-
AverageExecutionDurationWidgetComponent
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
467
|
+
AverageExecutionDurationWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.8", 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.8", 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.8", 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">
|
|
644
497
|
<div class="card">
|
|
645
498
|
<div class="card-header">
|
|
646
499
|
<h5 class="card-title">
|
|
@@ -651,7 +504,6 @@ AverageExecutionDurationWidgetComponent.decorators = [
|
|
|
651
504
|
<div class="row">
|
|
652
505
|
<abp-chart
|
|
653
506
|
#chart
|
|
654
|
-
(initialized)="initialize($event)"
|
|
655
507
|
class="w-100"
|
|
656
508
|
type="bar"
|
|
657
509
|
[data]="chartData"
|
|
@@ -663,29 +515,23 @@ AverageExecutionDurationWidgetComponent.decorators = [
|
|
|
663
515
|
</div>
|
|
664
516
|
</div>
|
|
665
517
|
`,
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
width: [{ type: Input }],
|
|
678
|
-
height: [{ type: Input }]
|
|
679
|
-
};
|
|
680
|
-
__decorate([
|
|
681
|
-
Select(AuditLoggingState.getAverageExecutionStatistics)
|
|
682
|
-
], AverageExecutionDurationWidgetComponent.prototype, "data$", void 0);
|
|
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
|
+
}] } });
|
|
683
529
|
|
|
684
530
|
class ErrorRateWidgetComponent {
|
|
685
|
-
constructor(
|
|
686
|
-
this.store = store;
|
|
687
|
-
this.subscription = subscription;
|
|
531
|
+
constructor(permissionService, service) {
|
|
688
532
|
this.permissionService = permissionService;
|
|
533
|
+
this.service = service;
|
|
534
|
+
this.data = {};
|
|
689
535
|
this.initialized = new BehaviorSubject(this);
|
|
690
536
|
this.width = 273;
|
|
691
537
|
this.height = 136;
|
|
@@ -694,52 +540,77 @@ class ErrorRateWidgetComponent {
|
|
|
694
540
|
if (!this.permissionService.getGrantedPolicy('AuditLogging.AuditLogs')) {
|
|
695
541
|
return;
|
|
696
542
|
}
|
|
697
|
-
this.
|
|
543
|
+
this.service
|
|
544
|
+
.getErrorRate({
|
|
698
545
|
startDate: filter.startDate,
|
|
699
546
|
endDate: filter.endDate,
|
|
700
|
-
})
|
|
547
|
+
})
|
|
548
|
+
.subscribe(res => {
|
|
549
|
+
this.data = res.data;
|
|
550
|
+
this.setChartData();
|
|
551
|
+
});
|
|
701
552
|
};
|
|
702
|
-
this.listenToData();
|
|
703
|
-
}
|
|
704
|
-
initialize(chartComponent) {
|
|
705
|
-
this.chart = chartComponent;
|
|
706
553
|
}
|
|
707
|
-
|
|
708
|
-
this.
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
}, 0);
|
|
726
|
-
});
|
|
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);
|
|
727
572
|
}
|
|
728
573
|
}
|
|
729
|
-
ErrorRateWidgetComponent
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
template: `
|
|
733
|
-
<div [abpPermission]="'AuditLogging.AuditLogs'" class="abp-widget-wrapper">
|
|
574
|
+
ErrorRateWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.8", 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.8", 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">
|
|
734
577
|
<div class="card">
|
|
735
578
|
<div class="card-header">
|
|
736
|
-
<h5 class="card-title">
|
|
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.8", 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>
|
|
737
609
|
</div>
|
|
738
610
|
<div class="card-body">
|
|
739
611
|
<div class="row">
|
|
740
612
|
<abp-chart
|
|
741
613
|
#chart
|
|
742
|
-
(initialized)="initialize($event)"
|
|
743
614
|
class="w-100"
|
|
744
615
|
type="pie"
|
|
745
616
|
[data]="chartData"
|
|
@@ -751,22 +622,17 @@ ErrorRateWidgetComponent.decorators = [
|
|
|
751
622
|
</div>
|
|
752
623
|
</div>
|
|
753
624
|
`,
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
]
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
height: [{ type: Input }]
|
|
766
|
-
};
|
|
767
|
-
__decorate([
|
|
768
|
-
Select(AuditLoggingState.getErrorRateStatistics)
|
|
769
|
-
], ErrorRateWidgetComponent.prototype, "data$", void 0);
|
|
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
|
+
}] } });
|
|
770
636
|
|
|
771
637
|
class AuditLoggingModule {
|
|
772
638
|
static forChild(options = {}) {
|
|
@@ -794,33 +660,59 @@ class AuditLoggingModule {
|
|
|
794
660
|
return new LazyModuleFactory(AuditLoggingModule.forChild(options));
|
|
795
661
|
}
|
|
796
662
|
}
|
|
797
|
-
AuditLoggingModule
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
663
|
+
AuditLoggingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: AuditLoggingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
664
|
+
AuditLoggingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.8", 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.8", 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.8", 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
|
+
}] });
|
|
824
716
|
|
|
825
717
|
var eEntityChangeType;
|
|
826
718
|
(function (eEntityChangeType) {
|
|
@@ -829,45 +721,9 @@ var eEntityChangeType;
|
|
|
829
721
|
eEntityChangeType[eEntityChangeType["Deleted"] = 2] = "Deleted";
|
|
830
722
|
})(eEntityChangeType || (eEntityChangeType = {}));
|
|
831
723
|
|
|
832
|
-
class AuditLoggingStateService {
|
|
833
|
-
constructor(store) {
|
|
834
|
-
this.store = store;
|
|
835
|
-
}
|
|
836
|
-
get() {
|
|
837
|
-
return this.store.selectSnapshot(AuditLoggingState.get);
|
|
838
|
-
}
|
|
839
|
-
getTotalCount() {
|
|
840
|
-
return this.store.selectSnapshot(AuditLoggingState.getTotalCount);
|
|
841
|
-
}
|
|
842
|
-
getAverageExecutionStatistics() {
|
|
843
|
-
return this.store.selectSnapshot(AuditLoggingState.getAverageExecutionStatistics);
|
|
844
|
-
}
|
|
845
|
-
getErrorRateStatistics() {
|
|
846
|
-
return this.store.selectSnapshot(AuditLoggingState.getErrorRateStatistics);
|
|
847
|
-
}
|
|
848
|
-
dispatchGetAuditLogs(...args) {
|
|
849
|
-
return this.store.dispatch(new GetAuditLogs(...args));
|
|
850
|
-
}
|
|
851
|
-
dispatchGetAverageExecutionDurationPerDay(...args) {
|
|
852
|
-
return this.store.dispatch(new GetAverageExecutionDurationPerDay(...args));
|
|
853
|
-
}
|
|
854
|
-
dispatchGetErrorRate(...args) {
|
|
855
|
-
return this.store.dispatch(new GetErrorRate(...args));
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
AuditLoggingStateService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuditLoggingStateService_Factory() { return new AuditLoggingStateService(i0.ɵɵinject(i1$1.Store)); }, token: AuditLoggingStateService, providedIn: "root" });
|
|
859
|
-
AuditLoggingStateService.decorators = [
|
|
860
|
-
{ type: Injectable, args: [{
|
|
861
|
-
providedIn: 'root',
|
|
862
|
-
},] }
|
|
863
|
-
];
|
|
864
|
-
AuditLoggingStateService.ctorParameters = () => [
|
|
865
|
-
{ type: Store }
|
|
866
|
-
];
|
|
867
|
-
|
|
868
724
|
/**
|
|
869
725
|
* Generated bundle index. Do not edit.
|
|
870
726
|
*/
|
|
871
727
|
|
|
872
|
-
export { AUDIT_LOGGING_ENTITY_ACTION_CONTRIBUTORS, AUDIT_LOGGING_ENTITY_PROP_CONTRIBUTORS, AUDIT_LOGGING_TOOLBAR_ACTION_CONTRIBUTORS, AuditLoggingExtensionsGuard, AuditLoggingGuard, AuditLoggingModule,
|
|
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 };
|
|
873
729
|
//# sourceMappingURL=volo-abp.ng.audit-logging.js.map
|