27 changed files with 2162 additions and 4 deletions
@ -0,0 +1,51 @@ |
|||||
|
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
||||
|
using LINGYUN.Abp.Auditing.AuditLogs; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
using Volo.Abp.Http.Client.ClientProxying; |
||||
|
using Volo.Abp.Http.Modeling; |
||||
|
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Auditing.AuditLogs; |
||||
|
|
||||
|
[Dependency(ReplaceServices = true)] |
||||
|
[ExposeServices(typeof(IAuditLogAppService), typeof(AuditLogClientProxy))] |
||||
|
public partial class AuditLogClientProxy : ClientProxyBase<IAuditLogAppService>, IAuditLogAppService |
||||
|
{ |
||||
|
public virtual async Task DeleteAsync(Guid id) |
||||
|
{ |
||||
|
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(Guid), id } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task DeleteManyAsync(AuditLogDeleteManyInput input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(DeleteManyAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(AuditLogDeleteManyInput), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<AuditLogDto> GetAsync(Guid id) |
||||
|
{ |
||||
|
return await RequestAsync<AuditLogDto>(nameof(GetAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(Guid), id } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<PagedResultDto<AuditLogDto>> GetListAsync(AuditLogGetByPagedDto input) |
||||
|
{ |
||||
|
return await RequestAsync<PagedResultDto<AuditLogDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(AuditLogGetByPagedDto), input } |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
// This file is part of AuditLogClientProxy, you can customize it here
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Auditing.AuditLogs; |
||||
|
|
||||
|
public partial class AuditLogClientProxy |
||||
|
{ |
||||
|
} |
||||
@ -0,0 +1,51 @@ |
|||||
|
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
||||
|
using LINGYUN.Abp.Auditing.AuditLogs; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
using Volo.Abp.Http.Client.ClientProxying; |
||||
|
using Volo.Abp.Http.Modeling; |
||||
|
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Auditing.AuditLogs; |
||||
|
|
||||
|
[Dependency(ReplaceServices = true)] |
||||
|
[ExposeServices(typeof(IEntityChangesAppService), typeof(EntityChangesClientProxy))] |
||||
|
public partial class EntityChangesClientProxy : ClientProxyBase<IEntityChangesAppService>, IEntityChangesAppService |
||||
|
{ |
||||
|
public virtual async Task<EntityChangeDto> GetAsync(Guid id) |
||||
|
{ |
||||
|
return await RequestAsync<EntityChangeDto>(nameof(GetAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(Guid), id } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<PagedResultDto<EntityChangeDto>> GetListAsync(EntityChangeGetByPagedDto input) |
||||
|
{ |
||||
|
return await RequestAsync<PagedResultDto<EntityChangeDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(EntityChangeGetByPagedDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<EntityChangeWithUsernameDto> GetWithUsernameAsync(Guid id) |
||||
|
{ |
||||
|
return await RequestAsync<EntityChangeWithUsernameDto>(nameof(GetWithUsernameAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(Guid), id } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<ListResultDto<EntityChangeWithUsernameDto>> GetWithUsernameAsync(EntityChangeGetWithUsernameDto input) |
||||
|
{ |
||||
|
return await RequestAsync<ListResultDto<EntityChangeWithUsernameDto>>(nameof(GetWithUsernameAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(EntityChangeGetWithUsernameDto), input } |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
// This file is part of EntityChangesClientProxy, you can customize it here
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Auditing.AuditLogs; |
||||
|
|
||||
|
public partial class EntityChangesClientProxy |
||||
|
{ |
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
||||
|
using LINGYUN.Abp.Auditing.Logging; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
using Volo.Abp.Http.Client.ClientProxying; |
||||
|
using Volo.Abp.Http.Modeling; |
||||
|
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Auditing.Logging; |
||||
|
|
||||
|
[Dependency(ReplaceServices = true)] |
||||
|
[ExposeServices(typeof(ILogAppService), typeof(LogClientProxy))] |
||||
|
public partial class LogClientProxy : ClientProxyBase<ILogAppService>, ILogAppService |
||||
|
{ |
||||
|
public virtual async Task<LogDto> GetAsync(string id) |
||||
|
{ |
||||
|
return await RequestAsync<LogDto>(nameof(GetAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(string), id } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<PagedResultDto<LogDto>> GetListAsync(LogGetByPagedDto input) |
||||
|
{ |
||||
|
return await RequestAsync<PagedResultDto<LogDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(LogGetByPagedDto), input } |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
// This file is part of LogClientProxy, you can customize it here
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Auditing.Logging; |
||||
|
|
||||
|
public partial class LogClientProxy |
||||
|
{ |
||||
|
} |
||||
@ -0,0 +1,51 @@ |
|||||
|
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
||||
|
using LINGYUN.Abp.Auditing.SecurityLogs; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
using Volo.Abp.Http.Client.ClientProxying; |
||||
|
using Volo.Abp.Http.Modeling; |
||||
|
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Auditing.SecurityLogs; |
||||
|
|
||||
|
[Dependency(ReplaceServices = true)] |
||||
|
[ExposeServices(typeof(ISecurityLogAppService), typeof(SecurityLogClientProxy))] |
||||
|
public partial class SecurityLogClientProxy : ClientProxyBase<ISecurityLogAppService>, ISecurityLogAppService |
||||
|
{ |
||||
|
public virtual async Task DeleteAsync(Guid id) |
||||
|
{ |
||||
|
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(Guid), id } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task DeleteManyAsync(SecurityLogDeleteManyInput input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(DeleteManyAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(SecurityLogDeleteManyInput), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<SecurityLogDto> GetAsync(Guid id) |
||||
|
{ |
||||
|
return await RequestAsync<SecurityLogDto>(nameof(GetAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(Guid), id } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<PagedResultDto<SecurityLogDto>> GetListAsync(SecurityLogGetByPagedDto input) |
||||
|
{ |
||||
|
return await RequestAsync<PagedResultDto<SecurityLogDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(SecurityLogGetByPagedDto), input } |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
// This file is part of SecurityLogClientProxy, you can customize it here
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Auditing.SecurityLogs; |
||||
|
|
||||
|
public partial class SecurityLogClientProxy |
||||
|
{ |
||||
|
} |
||||
File diff suppressed because it is too large
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
||||
|
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> |
||||
|
<xs:element name="Weavers"> |
||||
|
<xs:complexType> |
||||
|
<xs:all> |
||||
|
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> |
||||
|
<xs:complexType> |
||||
|
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:all> |
||||
|
<xs:attribute name="VerifyAssembly" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="GenerateXsd" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:schema> |
||||
@ -0,0 +1,32 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
|
||||
|
<Import Project="..\..\..\..\configureawait.props" /> |
||||
|
<Import Project="..\..\..\..\common.props" /> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net9.0</TargetFrameworks> |
||||
|
<AssemblyName>LINGYUN.Abp.Auditing.HttpApi.Client</AssemblyName> |
||||
|
<PackageId>LINGYUN.Abp.Auditing.HttpApi.Client</PackageId> |
||||
|
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> |
||||
|
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> |
||||
|
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> |
||||
|
<RootNamespace /> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<None Remove="ClientProxies\auditing-generate-proxy.json" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<EmbeddedResource Include="ClientProxies\auditing-generate-proxy.json" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="Volo.Abp.Http.Client" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<ProjectReference Include="..\LINGYUN.Abp.Auditing.Application.Contracts\LINGYUN.Abp.Auditing.Application.Contracts.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
||||
@ -0,0 +1,24 @@ |
|||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
using Volo.Abp.Modularity; |
||||
|
using Volo.Abp.VirtualFileSystem; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Auditing; |
||||
|
|
||||
|
[DependsOn( |
||||
|
typeof(AbpAuditingApplicationContractsModule), |
||||
|
typeof(AbpHttpClientModule))] |
||||
|
public class AbpAuditingHttpApiClientModule : AbpModule |
||||
|
{ |
||||
|
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
context.Services.AddStaticHttpClientProxies( |
||||
|
typeof(AbpAuditingApplicationContractsModule).Assembly, |
||||
|
AuditingRemoteServiceConsts.RemoteServiceName); |
||||
|
|
||||
|
Configure<AbpVirtualFileSystemOptions>(options => |
||||
|
{ |
||||
|
options.FileSets.AddEmbedded<AbpAuditingHttpApiClientModule>(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,74 @@ |
|||||
|
using LINGYUN.Abp.Auditing.Web.ProfileManagement; |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Volo.Abp.Account.Web; |
||||
|
using Volo.Abp.Account.Web.Pages.Account; |
||||
|
using Volo.Abp.Account.Web.ProfileManagement; |
||||
|
using Volo.Abp.AspNetCore.Mvc.Localization; |
||||
|
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
||||
|
using Volo.Abp.AuditLogging.Localization; |
||||
|
using Volo.Abp.AutoMapper; |
||||
|
using Volo.Abp.Http.ProxyScripting.Generators.JQuery; |
||||
|
using Volo.Abp.Modularity; |
||||
|
using Volo.Abp.UI.Navigation; |
||||
|
using Volo.Abp.VirtualFileSystem; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Auditing.Web; |
||||
|
|
||||
|
[DependsOn( |
||||
|
typeof(AbpAccountWebModule), |
||||
|
typeof(AbpAuditingApplicationContractsModule))] |
||||
|
public class AbpAuditingWebModule : AbpModule |
||||
|
{ |
||||
|
public override void PreConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options => |
||||
|
{ |
||||
|
options.AddAssemblyResource(typeof(AuditLoggingResource), typeof(AbpAuditingWebModule).Assembly); |
||||
|
}); |
||||
|
|
||||
|
PreConfigure<IMvcBuilder>(mvcBuilder => |
||||
|
{ |
||||
|
mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpAuditingWebModule).Assembly); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
Configure<AbpVirtualFileSystemOptions>(options => |
||||
|
{ |
||||
|
options.FileSets.AddEmbedded<AbpAuditingWebModule>(); |
||||
|
}); |
||||
|
|
||||
|
ConfigureProfileManagementPage(); |
||||
|
|
||||
|
context.Services.AddAutoMapperObjectMapper<AbpAuditingWebModule>(); |
||||
|
Configure<AbpAutoMapperOptions>(options => |
||||
|
{ |
||||
|
options.AddMaps<AbpAuditingWebModule>(validate: true); |
||||
|
}); |
||||
|
|
||||
|
Configure<DynamicJavaScriptProxyOptions>(options => |
||||
|
{ |
||||
|
options.DisableModule(AuditingRemoteServiceConsts.ModuleName); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
private void ConfigureProfileManagementPage() |
||||
|
{ |
||||
|
Configure<ProfileManagementPageOptions>(options => |
||||
|
{ |
||||
|
options.Contributors.Add(new SecurityLogManagementPageContributor()); |
||||
|
}); |
||||
|
|
||||
|
Configure<AbpBundlingOptions>(options => |
||||
|
{ |
||||
|
options.ScriptBundles |
||||
|
.Configure(typeof(ManageModel).FullName, |
||||
|
configuration => |
||||
|
{ |
||||
|
configuration.AddFiles("/client-proxies/auditing-proxy.js"); |
||||
|
configuration.AddFiles("/Pages/Account/Components/ProfileManagementGroup/SecurityLog/Index.js"); |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,39 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk.Web"> |
||||
|
|
||||
|
<Import Project="..\..\..\..\configureawait.props" /> |
||||
|
<Import Project="..\..\..\..\common.props" /> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFramework>net9.0</TargetFramework> |
||||
|
<AssemblyName>LINGYUN.Abp.Auditing.Web</AssemblyName> |
||||
|
<PackageId>LINGYUN.Abp.Auditing.Web</PackageId> |
||||
|
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> |
||||
|
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> |
||||
|
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> |
||||
|
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> |
||||
|
<RootNamespace>LINGYUN.Abp.Auditing.Web</RootNamespace> |
||||
|
<IsPackable>true</IsPackable> |
||||
|
<OutputType>Library</OutputType> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<EmbeddedResource Include="Modules\**\*.js" /> |
||||
|
<EmbeddedResource Include="Modules\**\*.css" /> |
||||
|
<EmbeddedResource Include="Pages\**\*.js" /> |
||||
|
<EmbeddedResource Include="Pages\**\*.css" /> |
||||
|
<EmbeddedResource Include="wwwroot\**\*.js" /> |
||||
|
<EmbeddedResource Include="wwwroot\**\*.css" /> |
||||
|
<Content Remove="Modules\**\*.js" /> |
||||
|
<Content Remove="Modules\**\*.css" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="Volo.Abp.Account.Web" /> |
||||
|
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<ProjectReference Include="..\LINGYUN.Abp.Auditing.Application.Contracts\LINGYUN.Abp.Auditing.Application.Contracts.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
||||
@ -0,0 +1,19 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.AspNetCore.Mvc; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Auditing.Web.Pages.Account.Components.ProfileManagementGroup.SecurityLog; |
||||
|
|
||||
|
public class AccountProfileSecurityLogManagementGroupViewComponent : AbpViewComponent |
||||
|
{ |
||||
|
public AccountProfileSecurityLogManagementGroupViewComponent() |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public async virtual Task<IViewComponentResult> InvokeAsync() |
||||
|
{ |
||||
|
await Task.CompletedTask; |
||||
|
|
||||
|
return View("~/Pages/Account/Components/ProfileManagementGroup/SecurityLog/Index.cshtml"); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,22 @@ |
|||||
|
@using Microsoft.AspNetCore.Mvc.Localization |
||||
|
@using Volo.Abp.Account.Localization |
||||
|
@using Volo.Abp.Localization |
||||
|
|
||||
|
@inject IHtmlLocalizer<AccountResource> L |
||||
|
|
||||
|
@section scripts { |
||||
|
<abp-script src="/Pages/Account/Components/ProfileManagementGroup/SecurityLog/Index.js" /> |
||||
|
} |
||||
|
|
||||
|
<abp-card> |
||||
|
<abp-card-header> |
||||
|
<abp-row> |
||||
|
<abp-column size-md="_6"> |
||||
|
<abp-card-title>@L["SecurityLog"]</abp-card-title> |
||||
|
</abp-column> |
||||
|
</abp-row> |
||||
|
</abp-card-header> |
||||
|
<abp-card-body> |
||||
|
<abp-table striped-rows="true" id="SecurityLogTable"></abp-table> |
||||
|
</abp-card-body> |
||||
|
</abp-card> |
||||
@ -0,0 +1,60 @@ |
|||||
|
$(function () { |
||||
|
var ul = abp.localization.getResource('AbpUi'); |
||||
|
var il = abp.localization.getResource('AbpIdentity'); |
||||
|
var dataTable = $('#SecurityLogTable').DataTable( |
||||
|
abp.libs.datatables.normalizeConfiguration({ |
||||
|
serverSide: true, |
||||
|
paging: true, |
||||
|
searching: false, |
||||
|
scrollX: true, |
||||
|
ajax: abp.libs.datatables.createAjax(labp.auditing.securityLogs.securityLog.getList), |
||||
|
columnDefs: [ |
||||
|
{ |
||||
|
title: ul('Actions'), |
||||
|
rowAction: { |
||||
|
items: |
||||
|
[ |
||||
|
{ |
||||
|
text: il('RevokeSession'), |
||||
|
confirmMessage: function () { |
||||
|
return il('SessionWillBeRevokedMessage'); |
||||
|
}, |
||||
|
visible: function (data) { |
||||
|
return data.sessionId !== abp.currentUser?.sessionId; |
||||
|
}, |
||||
|
action: function (data) { |
||||
|
labp.account.myProfile |
||||
|
.revokeSession(data.record.sessionId) |
||||
|
.then(function () { |
||||
|
abp.notify.info( |
||||
|
il('SuccessfullyRevoked') |
||||
|
); |
||||
|
dataTable.ajax.reload(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
title: il('DisplayName:Device'), |
||||
|
data: "device" |
||||
|
}, |
||||
|
{ |
||||
|
title: il('DisplayName:IpAddresses'), |
||||
|
data: "ipAddresses" |
||||
|
}, |
||||
|
{ |
||||
|
title: il('DisplayName:SignedIn'), |
||||
|
data: "signedIn", |
||||
|
render: function (data) { |
||||
|
return luxon |
||||
|
.DateTime |
||||
|
.fromISO(data, { |
||||
|
locale: abp.localization.currentCulture.name |
||||
|
}).toLocaleString(luxon.DateTime.DATETIME_FULL_WITH_SECONDS); |
||||
|
} |
||||
|
}] |
||||
|
}) |
||||
|
); |
||||
|
}); |
||||
@ -0,0 +1,26 @@ |
|||||
|
using LINGYUN.Abp.Auditing.Web.Pages.Account.Components.ProfileManagementGroup.SecurityLog; |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Microsoft.Extensions.Localization; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Account.Web.ProfileManagement; |
||||
|
using Volo.Abp.AuditLogging.Localization; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Auditing.Web.ProfileManagement; |
||||
|
|
||||
|
public class SecurityLogManagementPageContributor : IProfileManagementPageContributor |
||||
|
{ |
||||
|
public virtual Task ConfigureAsync(ProfileManagementPageCreationContext context) |
||||
|
{ |
||||
|
var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<AuditLoggingResource>>(); |
||||
|
|
||||
|
context.Groups.Add( |
||||
|
new ProfileManagementPageGroup( |
||||
|
"LINGYUN.Abp.Account.SecurityLog", |
||||
|
l["SecurityLog"], |
||||
|
typeof(AccountProfileSecurityLogManagementGroupViewComponent) |
||||
|
) |
||||
|
); |
||||
|
|
||||
|
return Task.CompletedTask; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
{ |
||||
|
"profiles": { |
||||
|
"LINGYUN.Abp.Auditing.Web": { |
||||
|
"commandName": "Project", |
||||
|
"launchBrowser": true, |
||||
|
"environmentVariables": { |
||||
|
"ASPNETCORE_ENVIRONMENT": "Development" |
||||
|
}, |
||||
|
"applicationUrl": "https://localhost:62925;http://localhost:62926" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,146 @@ |
|||||
|
/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ |
||||
|
|
||||
|
|
||||
|
// module auditing
|
||||
|
|
||||
|
(function(){ |
||||
|
|
||||
|
// controller labp.auditing.auditLogs.auditLog
|
||||
|
|
||||
|
(function(){ |
||||
|
|
||||
|
abp.utils.createNamespace(window, 'labp.auditing.auditLogs.auditLog'); |
||||
|
|
||||
|
labp.auditing.auditLogs.auditLog['delete'] = function(id, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/audit-log/' + id + '', |
||||
|
type: 'DELETE', |
||||
|
dataType: null |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
labp.auditing.auditLogs.auditLog.deleteMany = function(input, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/audit-log/bulk', |
||||
|
type: 'DELETE', |
||||
|
dataType: null, |
||||
|
data: JSON.stringify(input) |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
labp.auditing.auditLogs.auditLog.get = function(id, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/audit-log/' + id + '', |
||||
|
type: 'GET' |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
labp.auditing.auditLogs.auditLog.getList = function(input, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/audit-log' + abp.utils.buildQueryString([{ name: 'startTime', value: input.startTime }, { name: 'endTime', value: input.endTime }, { name: 'httpMethod', value: input.httpMethod }, { name: 'url', value: input.url }, { name: 'userId', value: input.userId }, { name: 'userName', value: input.userName }, { name: 'applicationName', value: input.applicationName }, { name: 'correlationId', value: input.correlationId }, { name: 'clientId', value: input.clientId }, { name: 'clientIpAddress', value: input.clientIpAddress }, { name: 'maxExecutionDuration', value: input.maxExecutionDuration }, { name: 'minExecutionDuration', value: input.minExecutionDuration }, { name: 'hasException', value: input.hasException }, { name: 'httpStatusCode', value: input.httpStatusCode }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', |
||||
|
type: 'GET' |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
})(); |
||||
|
|
||||
|
// controller labp.auditing.auditLogs.entityChanges
|
||||
|
|
||||
|
(function(){ |
||||
|
|
||||
|
abp.utils.createNamespace(window, 'labp.auditing.auditLogs.entityChanges'); |
||||
|
|
||||
|
labp.auditing.auditLogs.entityChanges.get = function(id, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/entity-changes/' + id + '', |
||||
|
type: 'GET' |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
labp.auditing.auditLogs.entityChanges.getList = function(input, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/entity-changes' + abp.utils.buildQueryString([{ name: 'auditLogId', value: input.auditLogId }, { name: 'startTime', value: input.startTime }, { name: 'endTime', value: input.endTime }, { name: 'changeType', value: input.changeType }, { name: 'entityId', value: input.entityId }, { name: 'entityTypeFullName', value: input.entityTypeFullName }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', |
||||
|
type: 'GET' |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
labp.auditing.auditLogs.entityChanges.getWithUsernameAsyncById = function(id, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/entity-changes/with-username/' + id + '', |
||||
|
type: 'GET' |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
labp.auditing.auditLogs.entityChanges.getWithUsernameAsyncByInput = function(input, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/entity-changes/with-username' + abp.utils.buildQueryString([{ name: 'entityId', value: input.entityId }, { name: 'entityTypeFullName', value: input.entityTypeFullName }]) + '', |
||||
|
type: 'GET' |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
})(); |
||||
|
|
||||
|
// controller labp.auditing.logging.log
|
||||
|
|
||||
|
(function(){ |
||||
|
|
||||
|
abp.utils.createNamespace(window, 'labp.auditing.logging.log'); |
||||
|
|
||||
|
labp.auditing.logging.log.get = function(id, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/logging/' + id + '', |
||||
|
type: 'GET' |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
labp.auditing.logging.log.getList = function(input, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/logging' + abp.utils.buildQueryString([{ name: 'startTime', value: input.startTime }, { name: 'endTime', value: input.endTime }, { name: 'level', value: input.level }, { name: 'machineName', value: input.machineName }, { name: 'environment', value: input.environment }, { name: 'application', value: input.application }, { name: 'context', value: input.context }, { name: 'requestId', value: input.requestId }, { name: 'requestPath', value: input.requestPath }, { name: 'correlationId', value: input.correlationId }, { name: 'processId', value: input.processId }, { name: 'threadId', value: input.threadId }, { name: 'hasException', value: input.hasException }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', |
||||
|
type: 'GET' |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
})(); |
||||
|
|
||||
|
// controller labp.auditing.securityLogs.securityLog
|
||||
|
|
||||
|
(function(){ |
||||
|
|
||||
|
abp.utils.createNamespace(window, 'labp.auditing.securityLogs.securityLog'); |
||||
|
|
||||
|
labp.auditing.securityLogs.securityLog['delete'] = function(id, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/security-log/' + id + '', |
||||
|
type: 'DELETE', |
||||
|
dataType: null |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
labp.auditing.securityLogs.securityLog.deleteMany = function(input, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/security-log/bulk', |
||||
|
type: 'DELETE', |
||||
|
dataType: null, |
||||
|
data: JSON.stringify(input) |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
labp.auditing.securityLogs.securityLog.get = function(id, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/security-log/' + id + '', |
||||
|
type: 'GET' |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
labp.auditing.securityLogs.securityLog.getList = function(input, ajaxParams) { |
||||
|
return abp.ajax($.extend(true, { |
||||
|
url: abp.appPath + 'api/auditing/security-log' + abp.utils.buildQueryString([{ name: 'startTime', value: input.startTime }, { name: 'endTime', value: input.endTime }, { name: 'applicationName', value: input.applicationName }, { name: 'identity', value: input.identity }, { name: 'actionName', value: input.actionName }, { name: 'userId', value: input.userId }, { name: 'userName', value: input.userName }, { name: 'clientId', value: input.clientId }, { name: 'correlationId', value: input.correlationId }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', |
||||
|
type: 'GET' |
||||
|
}, ajaxParams)); |
||||
|
}; |
||||
|
|
||||
|
})(); |
||||
|
|
||||
|
})(); |
||||
|
|
||||
|
|
||||
Loading…
Reference in new issue