-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58e04c9
commit 5dda1dd
Showing
29 changed files
with
15,790 additions
and
15,137 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...icManagement.Application.Contracts/IdentitySecurityLogs/IIdentitySecurityLogAppService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace Lion.AbpPro.BasicManagement.IdentitySecurityLogs; | ||
|
||
public interface IIdentitySecurityLogAppService : IApplicationService | ||
{ | ||
/// <summary> | ||
/// 分页获取登录日志 | ||
/// </summary> | ||
Task<PagedResultDto<PagingIdentitySecurityLogOutput>> GetListAsync(PagingIdentitySecurityLogInput input); | ||
} |
51 changes: 51 additions & 0 deletions
51
...icManagement.Application.Contracts/IdentitySecurityLogs/PagingIdentitySecurityLogInput.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
namespace Lion.AbpPro.BasicManagement.IdentitySecurityLogs; | ||
|
||
public class PagingIdentitySecurityLogInput: PagingBase | ||
{ | ||
/// <summary> | ||
/// 排序 | ||
/// </summary> | ||
public string Sorting { get; set; } | ||
|
||
/// <summary> | ||
/// 开始时间 | ||
/// </summary> | ||
public DateTime? StartTime { get; set; } | ||
|
||
/// <summary> | ||
/// 结束时间 | ||
/// </summary> | ||
public DateTime? EndTime { get; set; } | ||
|
||
public string Identity { get; set; } | ||
|
||
/// <summary> | ||
/// 请求地址 | ||
/// </summary> | ||
public string Action { get; set; } | ||
|
||
/// <summary> | ||
/// 用户Id | ||
/// </summary> | ||
public Guid? UserId { get; set; } | ||
|
||
/// <summary> | ||
/// 用户名 | ||
/// </summary> | ||
public string UserName { get; set; } | ||
|
||
/// <summary> | ||
/// 应用程序名称 | ||
/// </summary> | ||
public string ApplicationName { get; set; } | ||
|
||
/// <summary> | ||
/// RequestId | ||
/// </summary> | ||
public string CorrelationId { get; set; } | ||
|
||
/// <summary> | ||
/// ClientId | ||
/// </summary> | ||
public string ClientId { get; set; } | ||
} |
30 changes: 30 additions & 0 deletions
30
...cManagement.Application.Contracts/IdentitySecurityLogs/PagingIdentitySecurityLogOutput.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
namespace Lion.AbpPro.BasicManagement.IdentitySecurityLogs; | ||
|
||
public class PagingIdentitySecurityLogOutput | ||
{ | ||
public Guid Id { get; set; } | ||
|
||
public Guid? TenantId { get; set; } | ||
|
||
public string ApplicationName { get; set; } | ||
|
||
public string Identity { get; set; } | ||
|
||
public string Action { get; set; } | ||
|
||
public Guid? UserId { get; set; } | ||
|
||
public string UserName { get; set; } | ||
|
||
public string TenantName { get; set; } | ||
|
||
public string ClientId { get; set; } | ||
|
||
public string CorrelationId { get; set; } | ||
|
||
public string ClientIpAddress { get; set; } | ||
|
||
public string BrowserInfo { get; set; } | ||
|
||
public DateTime CreationTime { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
....AbpPro.BasicManagement.Application/IdentitySecurityLogs/IdentitySecurityLogAppService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
namespace Lion.AbpPro.BasicManagement.IdentitySecurityLogs; | ||
|
||
public class IdentitySecurityLogAppService : BasicManagementAppService, IIdentitySecurityLogAppService | ||
{ | ||
private readonly IIdentitySecurityLogRepository _identitySecurityLogRepository; | ||
|
||
public IdentitySecurityLogAppService(IIdentitySecurityLogRepository identitySecurityLogRepository) | ||
{ | ||
_identitySecurityLogRepository = identitySecurityLogRepository; | ||
} | ||
|
||
[Authorize(Policy = BasicManagementPermissions.SystemManagement.IdentitySecurityLog)] | ||
public virtual async Task<PagedResultDto<PagingIdentitySecurityLogOutput>> GetListAsync(PagingIdentitySecurityLogInput input) | ||
{ | ||
var totalCount = await _identitySecurityLogRepository.GetCountAsync( | ||
input.StartTime, | ||
input.EndTime, | ||
input.ApplicationName, | ||
input.Identity, | ||
input.Action, | ||
input.UserId, | ||
input.UserName, | ||
input.ClientId, | ||
input.CorrelationId); | ||
if (totalCount == 0) | ||
{ | ||
return new PagedResultDto<PagingIdentitySecurityLogOutput>(); | ||
} | ||
|
||
var list = await _identitySecurityLogRepository.GetListAsync( | ||
input.Sorting, | ||
input.PageSize, | ||
input.SkipCount, | ||
input.StartTime, | ||
input.EndTime, | ||
input.ApplicationName, | ||
input.Identity, | ||
input.Action, | ||
input.UserId, | ||
input.UserName, | ||
input.ClientId, | ||
input.CorrelationId); | ||
|
||
return new PagedResultDto<PagingIdentitySecurityLogOutput>(totalCount, ObjectMapper.Map<List<IdentitySecurityLog>, List<PagingIdentitySecurityLogOutput>>(list)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/GlobalUsings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...nagement/src/Lion.AbpPro.BasicManagement.HttpApi/Systems/IdentitySecurityLogController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Lion.AbpPro.BasicManagement.Systems; | ||
|
||
[Route("IdentitySecurityLogs")] | ||
public class IdentitySecurityLogController : BasicManagementController, IIdentitySecurityLogAppService | ||
{ | ||
private readonly IIdentitySecurityLogAppService _identitySecurityLogAppService; | ||
|
||
public IdentitySecurityLogController(IIdentitySecurityLogAppService identitySecurityLogAppService) | ||
{ | ||
_identitySecurityLogAppService = identitySecurityLogAppService; | ||
} | ||
|
||
[HttpPost("page")] | ||
[SwaggerOperation(summary: "分页获取登录日志信息", Tags = new[] { "IdentitySecurityLogs" })] | ||
public Task<PagedResultDto<PagingIdentitySecurityLogOutput>> GetListAsync(PagingIdentitySecurityLogInput input) | ||
{ | ||
return _identitySecurityLogAppService.GetListAsync(input); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
templates/abp-vnext-pro-nuget-all/vben28/src/views/admin/identitySecurityLog/Index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import {FormSchema} from '/src/components/Table'; | ||
import {BasicColumn} from '/src/components/Table'; | ||
import {useI18n} from '/src/hooks/web/useI18n'; | ||
import { formatToDateTime, dateUtil } from '/src/utils/dateUtil'; | ||
const {t} = useI18n(); | ||
import { | ||
IdentitySecurityLogsServiceProxy, | ||
PageIdentitySecurityLogInput, | ||
} from '/src/services/ServiceProxies'; | ||
|
||
// 分页表格登录日志 BasicColumn | ||
export const tableColumns: BasicColumn[] = [ | ||
{ | ||
title: t('routes.admin.identitySecurityLog_ApplicationName'), | ||
dataIndex: 'applicationName', | ||
}, | ||
{ | ||
title: t('routes.admin.identitySecurityLog_Identity'), | ||
dataIndex: 'identity', | ||
}, | ||
{ | ||
title: t('routes.admin.identitySecurityLog_Action'), | ||
dataIndex: 'action', | ||
}, | ||
{ | ||
title: t('routes.admin.identitySecurityLog_UserName'), | ||
dataIndex: 'userName', | ||
}, | ||
{ | ||
title: t('routes.admin.identitySecurityLog_CorrelationId'), | ||
dataIndex: 'correlationId', | ||
}, | ||
{ | ||
title: t('routes.admin.identitySecurityLog_ClientIpAddress'), | ||
dataIndex: 'clientIpAddress', | ||
}, | ||
{ | ||
title: t('routes.admin.identitySecurityLog_CreationTime'), | ||
dataIndex: 'creationTime', | ||
customRender: ({ text }) => { | ||
return formatToDateTime(text); | ||
}, | ||
}, | ||
]; | ||
|
||
// 分页查询登录日志 FormSchema | ||
export const searchFormSchema: FormSchema[] = [ | ||
{ | ||
field: 'time', | ||
component: 'RangePicker', | ||
label: t('routes.admin.audit_executeTime'), | ||
colProps: { | ||
span: 4, | ||
}, | ||
defaultValue: [dateUtil().subtract(7, 'days'), dateUtil().add(1, 'days')], | ||
}, | ||
{ | ||
field: 'userName', | ||
label: t('routes.admin.identitySecurityLog_UserName'), | ||
component: 'Input', | ||
colProps: { span: 3 }, | ||
}, | ||
{ | ||
field: 'correlationId', | ||
label: 'CorrelationId', | ||
labelWidth: 95, | ||
component: 'Input', | ||
colProps: { span: 4 }, | ||
} | ||
]; | ||
|
||
|
||
/** | ||
* 分页查询登录日志 | ||
*/ | ||
export async function pageAsync(params: PageIdentitySecurityLogInput, | ||
) { | ||
const identitySecurityLogServiceProxy = new IdentitySecurityLogsServiceProxy(); | ||
return identitySecurityLogServiceProxy.page(params); | ||
} |
Oops, something went wrong.