Skip to content

Commit

Permalink
feat: add audit logging application services
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnkwlp committed Nov 29, 2024
1 parent 19957b3 commit 64b3247
Show file tree
Hide file tree
Showing 87 changed files with 1,747 additions and 6 deletions.
48 changes: 48 additions & 0 deletions Sample.sln
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,22 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.DictionaryM
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Passingwind.Abp.DictionaryManagement.MongoDB.Tests", "modules\dictionary-management\test\Passingwind.Abp.DictionaryManagement.MongoDB.Tests\Passingwind.Abp.DictionaryManagement.MongoDB.Tests.csproj", "{F60E2974-A7C7-41EF-96E8-23E38619E98F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "audit-logging", "audit-logging", "{88AD1592-7C36-44AC-8E47-5CBE9AB69560}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2567C22F-1B70-4D19-83EE-CF6AA99A4554}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Passingwind.Abp.AuditLogging.Domain.Shared", "modules\audit-logging\src\Passingwind.Abp.AuditLogging.Domain.Shared\Passingwind.Abp.AuditLogging.Domain.Shared.csproj", "{AF753833-EA02-4D79-A7A1-B54E3519139D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Passingwind.Abp.AuditLogging.Domain", "modules\audit-logging\src\Passingwind.Abp.AuditLogging.Domain\Passingwind.Abp.AuditLogging.Domain.csproj", "{B192F772-5006-48F3-9971-1F4CAE552859}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Passingwind.Abp.AuditLogging.Application.Contracts", "modules\audit-logging\src\Passingwind.Abp.AuditLogging.Application.Contracts\Passingwind.Abp.AuditLogging.Application.Contracts.csproj", "{D20826A3-F38A-4AEA-A649-13BFA2569A37}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Passingwind.Abp.AuditLogging.Application", "modules\audit-logging\src\Passingwind.Abp.AuditLogging.Application\Passingwind.Abp.AuditLogging.Application.csproj", "{D19B5383-BDA1-4FBC-A9EB-A329F823F077}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Passingwind.Abp.AuditLogging.HttpApi.Client", "modules\audit-logging\src\Passingwind.Abp.AuditLogging.HttpApi.Client\Passingwind.Abp.AuditLogging.HttpApi.Client.csproj", "{CD71C1AF-8934-417F-B587-62546096E3D0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Passingwind.Abp.AuditLogging.HttpApi", "modules\audit-logging\src\Passingwind.Abp.AuditLogging.HttpApi\Passingwind.Abp.AuditLogging.HttpApi.csproj", "{61E4167C-DE63-4749-AED8-D2B41011799F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -483,6 +499,30 @@ Global
{F60E2974-A7C7-41EF-96E8-23E38619E98F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F60E2974-A7C7-41EF-96E8-23E38619E98F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F60E2974-A7C7-41EF-96E8-23E38619E98F}.Release|Any CPU.Build.0 = Release|Any CPU
{AF753833-EA02-4D79-A7A1-B54E3519139D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AF753833-EA02-4D79-A7A1-B54E3519139D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AF753833-EA02-4D79-A7A1-B54E3519139D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AF753833-EA02-4D79-A7A1-B54E3519139D}.Release|Any CPU.Build.0 = Release|Any CPU
{B192F772-5006-48F3-9971-1F4CAE552859}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B192F772-5006-48F3-9971-1F4CAE552859}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B192F772-5006-48F3-9971-1F4CAE552859}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B192F772-5006-48F3-9971-1F4CAE552859}.Release|Any CPU.Build.0 = Release|Any CPU
{D20826A3-F38A-4AEA-A649-13BFA2569A37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D20826A3-F38A-4AEA-A649-13BFA2569A37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D20826A3-F38A-4AEA-A649-13BFA2569A37}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D20826A3-F38A-4AEA-A649-13BFA2569A37}.Release|Any CPU.Build.0 = Release|Any CPU
{D19B5383-BDA1-4FBC-A9EB-A329F823F077}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D19B5383-BDA1-4FBC-A9EB-A329F823F077}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D19B5383-BDA1-4FBC-A9EB-A329F823F077}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D19B5383-BDA1-4FBC-A9EB-A329F823F077}.Release|Any CPU.Build.0 = Release|Any CPU
{CD71C1AF-8934-417F-B587-62546096E3D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD71C1AF-8934-417F-B587-62546096E3D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD71C1AF-8934-417F-B587-62546096E3D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD71C1AF-8934-417F-B587-62546096E3D0}.Release|Any CPU.Build.0 = Release|Any CPU
{61E4167C-DE63-4749-AED8-D2B41011799F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{61E4167C-DE63-4749-AED8-D2B41011799F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{61E4167C-DE63-4749-AED8-D2B41011799F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{61E4167C-DE63-4749-AED8-D2B41011799F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -576,6 +616,14 @@ Global
{B401EA9D-2336-44AC-8D3E-FD7D2DAE7C97} = {A117DB50-D9B9-4590-BB62-15D87ABA19A8}
{DF459EDD-8E5D-4CE5-B879-8E7260E15E7F} = {A117DB50-D9B9-4590-BB62-15D87ABA19A8}
{F60E2974-A7C7-41EF-96E8-23E38619E98F} = {A117DB50-D9B9-4590-BB62-15D87ABA19A8}
{88AD1592-7C36-44AC-8E47-5CBE9AB69560} = {9EAC2FB6-A28A-4851-B809-BF8216AAAFE0}
{2567C22F-1B70-4D19-83EE-CF6AA99A4554} = {88AD1592-7C36-44AC-8E47-5CBE9AB69560}
{AF753833-EA02-4D79-A7A1-B54E3519139D} = {2567C22F-1B70-4D19-83EE-CF6AA99A4554}
{B192F772-5006-48F3-9971-1F4CAE552859} = {2567C22F-1B70-4D19-83EE-CF6AA99A4554}
{D20826A3-F38A-4AEA-A649-13BFA2569A37} = {2567C22F-1B70-4D19-83EE-CF6AA99A4554}
{D19B5383-BDA1-4FBC-A9EB-A329F823F077} = {2567C22F-1B70-4D19-83EE-CF6AA99A4554}
{CD71C1AF-8934-417F-B587-62546096E3D0} = {2567C22F-1B70-4D19-83EE-CF6AA99A4554}
{61E4167C-DE63-4749-AED8-D2B41011799F} = {2567C22F-1B70-4D19-83EE-CF6AA99A4554}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
Expand Down
1 change: 1 addition & 0 deletions clear.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Get-ChildItem -Path .\ -Recurse -Depth 5 -Directory -Exclude "node_modules/*" -Include "bin", "obj" | ForEach-Object ($_) { Write-Output $_.FullName; Remove-Item $_ -Force -Recurse }
1 change: 1 addition & 0 deletions host/src/Sample.Application/Sample.Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<ItemGroup>
<ProjectReference Include="..\..\..\modules\account\src\Passingwind.Abp.Account.Application\Passingwind.Abp.Account.Application.csproj" />
<ProjectReference Include="..\..\..\modules\api-keys\src\Passingwind.Abp.ApiKey.Application\Passingwind.Abp.ApiKey.Application.csproj" />
<ProjectReference Include="..\..\..\modules\audit-logging\src\Passingwind.Abp.AuditLogging.Application\Passingwind.Abp.AuditLogging.Application.csproj" />
<ProjectReference Include="..\..\..\modules\file-management\src\Passingwind.Abp.FileManagement.Application\Passingwind.Abp.FileManagement.Application.csproj" />
<ProjectReference Include="..\..\..\modules\identity-client\src\Passingwind.Abp.IdentityClient.Application\Passingwind.Abp.IdentityClient.Application.csproj" />
<ProjectReference Include="..\..\..\modules\identity\src\Passingwind.Abp.Identity.Application\Passingwind.Abp.Identity.Application.csproj" />
Expand Down
2 changes: 2 additions & 0 deletions host/src/Sample.Application/SampleApplicationModule.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Passingwind.Abp.Account;
using Passingwind.Abp.ApiKey;
using Passingwind.Abp.AuditLogging;
using Passingwind.Abp.FileManagement;
using Passingwind.Abp.Identity;
using Passingwind.Abp.IdentityClient;
Expand Down Expand Up @@ -31,6 +32,7 @@ namespace Sample;
[DependsOn(typeof(IdentityApplicationModule))]
[DependsOn(typeof(IdentityClientApplicationModule))]
[DependsOn(typeof(PermissionManagementApplicationModule))]
[DependsOn(typeof(AuditLoggingApplicationModule))]
public class SampleApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
Expand Down
1 change: 1 addition & 0 deletions host/src/Sample.Domain/Sample.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<ItemGroup>
<ProjectReference Include="..\..\..\modules\account\src\Passingwind.Abp.Account.Domain\Passingwind.Abp.Account.Domain.csproj" />
<ProjectReference Include="..\..\..\modules\api-keys\src\Passingwind.Abp.ApiKey.Domain\Passingwind.Abp.ApiKey.Domain.csproj" />
<ProjectReference Include="..\..\..\modules\audit-logging\src\Passingwind.Abp.AuditLogging.Domain\Passingwind.Abp.AuditLogging.Domain.csproj" />
<ProjectReference Include="..\..\..\modules\file-management\src\Passingwind.Abp.FileManagement.Domain\Passingwind.Abp.FileManagement.Domain.csproj" />
<ProjectReference Include="..\..\..\modules\identity-client\src\Passingwind.Abp.IdentityClient.Domain\Passingwind.Abp.IdentityClient.Domain.csproj" />
<ProjectReference Include="..\..\..\modules\identity\src\Passingwind.Abp.Identity.Domain\Passingwind.Abp.Identity.Domain.csproj" />
Expand Down
2 changes: 2 additions & 0 deletions host/src/Sample.Domain/SampleDomainModule.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Passingwind.Abp.ApiKey;
using Passingwind.Abp.AuditLogging;
using Passingwind.Abp.FileManagement;
using Passingwind.Abp.Identity;
using Passingwind.Abp.IdentityClient;
Expand Down Expand Up @@ -40,6 +41,7 @@ namespace Sample;
[DependsOn(typeof(IdentityClientDomainModule))]
[DependsOn(typeof(IdentityDomainModule))]
[DependsOn(typeof(PermissionManagementDomainModule))]
[DependsOn(typeof(AuditLoggingDomainModule))]
public class SampleDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<ItemGroup>
<ProjectReference Include="..\..\..\modules\account\src\Passingwind.Abp.Account.HttpApi.Client\Passingwind.Abp.Account.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\modules\audit-logging\src\Passingwind.Abp.AuditLogging.HttpApi.Client\Passingwind.Abp.AuditLogging.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\modules\identity\src\Passingwind.Abp.Identity.HttpApi.Client\Passingwind.Abp.Identity.HttpApi.Client.csproj" />
<ProjectReference Include="..\Sample.Application.Contracts\Sample.Application.Contracts.csproj" />
</ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions host/src/Sample.HttpApi.Host/Sample.HttpApi.Host.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<!--<PackageReference Include="Hangfire.Core" Version="1.8.2" />-->
<PackageReference Include="Hangfire.MemoryStorage" Version="1.8.0" />
<PackageReference Include="Hangfire.MemoryStorage" Version="1.8.1.1" />
<PackageReference Include="Volo.Abp.AspNetCore.MultiTenancy" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="$(AbpVersion)" />
Expand All @@ -24,7 +24,6 @@
<PackageReference Include="Volo.Abp.BackgroundWorkers.Hangfire" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="$(AbpVersion)" />
<PackageReference Include="Passingwind.SwaggerExtensions" Version="0.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
32 changes: 30 additions & 2 deletions host/src/Sample.HttpApi.Host/SampleHttpApiHostModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using Hangfire;
using Hangfire.MemoryStorage;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using Passingwind.Abp.Account;
Expand All @@ -20,6 +23,7 @@
using Sample.EntityFrameworkCore;
using Sample.MultiTenancy;
using Swashbuckle.AspNetCore.SwaggerGen;
using Swashbuckle.AspNetCore.SwaggerUI;
using Volo.Abp;
using Volo.Abp.Account;
using Volo.Abp.AspNetCore.MultiTenancy;
Expand All @@ -34,6 +38,7 @@
using Volo.Abp.BackgroundWorkers.Hangfire;
using Volo.Abp.BlobStoring;
using Volo.Abp.BlobStoring.FileSystem;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict;
using Volo.Abp.Swashbuckle;
Expand Down Expand Up @@ -117,6 +122,8 @@ public override void ConfigureServices(ServiceConfigurationContext context)
Configure<AbpAntiForgeryOptions>(options => options.TokenCookie.SameSite = Microsoft.AspNetCore.Http.SameSiteMode.Lax);

Configure<AbpMvcLibsOptions>(options => options.CheckLibs = false);

context.Services.Replace(ServiceDescriptor.Transient<ISwaggerHtmlResolver, SwaggerHtmlResolver>());
}

private void ConfigureAuthentication(ServiceConfigurationContext context)
Expand Down Expand Up @@ -259,7 +266,7 @@ public override void OnApplicationInitialization(ApplicationInitializationContex
}

app.UseCorrelationId();
app.UseStaticFiles();
app.MapAbpStaticAssets();
app.UseRouting();
app.UseCors();
app.UseAuthentication();
Expand All @@ -276,8 +283,14 @@ public override void OnApplicationInitialization(ApplicationInitializationContex
app.UseAuthorization();

app.UseSwagger();
app.UseAbpSwaggerUI(c =>
var resolver = app.ApplicationServices.GetService<ISwaggerHtmlResolver>();
app.UseSwaggerUI(c =>
{
c.InjectJavascript("ui/abp.js");
c.InjectJavascript("ui/abp.swagger.js");
// c.IndexStream = () => new MemoryStream(Encoding.UTF8.GetBytes(new StreamReader(resolver!!?.Resolver()).ReadToEnd().Replace("src=\"index.js\"", "src=\"ui/index.js\"")));
c.IndexStream = () => resolver?.Resolver();

c.SwaggerEndpoint("/swagger/v1/swagger.json", "Sample API");
c.DisplayOperationId();
c.DisplayRequestDuration();
Expand All @@ -290,3 +303,18 @@ public override void OnApplicationInitialization(ApplicationInitializationContex
app.UseConfiguredEndpoints();
}
}

public class SwaggerHtmlResolver : ISwaggerHtmlResolver, ITransientDependency
{
public virtual Stream Resolver()
{
var stream = typeof(SwaggerUIOptions).GetTypeInfo().Assembly
.GetManifestResourceStream("Swashbuckle.AspNetCore.SwaggerUI.index.html");

var html = new StreamReader(stream!)
.ReadToEnd()
.Replace("src=\"index.js\"", "src=\"ui/index.js\"");

return new MemoryStream(Encoding.UTF8.GetBytes(html));
}
}
66 changes: 66 additions & 0 deletions host/src/Sample.HttpApi.Host/wwwroot/swagger/ui/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/* Source: https://gist.github.com/lamberta/3768814
*/
function parseFunction(str) {
if (!str) return void (0);

var fn_body_idx = str.indexOf('{'),
fn_body = str.substring(fn_body_idx + 1, str.lastIndexOf('}')),
fn_declare = str.substring(0, fn_body_idx),
fn_params = fn_declare.substring(fn_declare.indexOf('(') + 1, fn_declare.lastIndexOf(')')),
args = fn_params.split(',');

args.push(fn_body);

function Fn() {
return Function.apply(this, args);
}

Fn.prototype = Function.prototype;

return new Fn();
}

window.onload = function () {
var configObject = JSON.parse('{"urls":[{"url":"/swagger/v1/swagger.json","name":"Sample API"}],"deepLinking":false,"persistAuthorization":false,"displayOperationId":true,"defaultModelsExpandDepth":1,"defaultModelExpandDepth":1,"defaultModelRendering":"example","displayRequestDuration":true,"docExpansion":"none","showExtensions":false,"showCommonExtensions":false,"supportedSubmitMethods":["get","put","post","delete","options","head","patch","trace"],"tryItOutEnabled":false,"tagsSorter":"alpha"}');
var oauthConfigObject = JSON.parse('{"scopeSeparator":" ","scopes":[],"useBasicAuthenticationWithAccessCodeGrant":false,"usePkceWithAuthorizationCodeGrant":false}');

// Workaround for https://github.com/swagger-api/swagger-ui/issues/5945
configObject.urls.forEach(function (item) {
if (item.url.startsWith("http") || item.url.startsWith("/")) return;
item.url = window.location.href.replace("index.html", item.url).split('#')[0];
});

// If validatorUrl is not explicitly provided, disable the feature by setting to null
if (!configObject.hasOwnProperty("validatorUrl"))
configObject.validatorUrl = null

// If oauth2RedirectUrl isn't specified, use the built-in default
if (!configObject.hasOwnProperty("oauth2RedirectUrl"))
configObject.oauth2RedirectUrl = (new URL("oauth2-redirect.html", window.location.href)).href;

// Apply mandatory parameters
configObject.dom_id = "#swagger-ui";
configObject.presets = [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset];
configObject.layout = "StandaloneLayout";

// Parse and add interceptor functions
var interceptors = JSON.parse('{}');
if (interceptors.RequestInterceptorFunction)
configObject.requestInterceptor = parseFunction(interceptors.RequestInterceptorFunction);
if (interceptors.ResponseInterceptorFunction)
configObject.responseInterceptor = parseFunction(interceptors.ResponseInterceptorFunction);

if (configObject.plugins) {
configObject.plugins = configObject.plugins.map(eval);
}

// Begin Swagger UI call region

const ui = abp.SwaggerUIBundle(configObject);

ui.initOAuth(oauthConfigObject);

// End Swagger UI call region

window.ui = ui
}
3 changes: 1 addition & 2 deletions host/src/Sample.HttpApi/Sample.HttpApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
<ItemGroup>
<ProjectReference Include="..\..\..\modules\account\src\Passingwind.Abp.Account.HttpApi\Passingwind.Abp.Account.HttpApi.csproj" />
<ProjectReference Include="..\..\..\modules\api-keys\src\Passingwind.Abp.ApiKey.HttpApi\Passingwind.Abp.ApiKey.HttpApi.csproj" />
<ProjectReference Include="..\..\..\modules\audit-logging\src\Passingwind.Abp.AuditLogging.HttpApi\Passingwind.Abp.AuditLogging.HttpApi.csproj" />
<ProjectReference Include="..\..\..\modules\file-management\src\Passingwind.Abp.FileManagement.HttpApi\Passingwind.Abp.FileManagement.HttpApi.csproj" />
<ProjectReference Include="..\..\..\modules\identity-client\src\Passingwind.Abp.IdentityClient.HttpApi\Passingwind.Abp.IdentityClient.HttpApi.csproj" />
<ProjectReference Include="..\..\..\modules\identity\src\Passingwind.Abp.Identity.HttpApi\Passingwind.Abp.Identity.HttpApi.csproj" />
<ProjectReference Include="..\Sample.Application.Contracts\Sample.Application.Contracts.csproj" />
</ItemGroup>

<ItemGroup>
<!--<PackageReference Include="Volo.Abp.Account.HttpApi" Version="$(AbpVersion)" />-->
<PackageReference Include="Volo.Abp.BlobStoring.FileSystem" Version="$(AbpVersion)" />
<!--<PackageReference Include="Volo.Abp.Identity.HttpApi" Version="$(AbpVersion)" />-->
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi" Version="$(AbpVersion)" />
Expand Down
2 changes: 2 additions & 0 deletions host/src/Sample.HttpApi/SampleHttpApiModule.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Localization.Resources.AbpUi;
using Passingwind.Abp.Account;
using Passingwind.Abp.ApiKey;
using Passingwind.Abp.AuditLogging;
using Passingwind.Abp.FileManagement;
using Passingwind.Abp.Identity;
using Passingwind.Abp.IdentityClient;
Expand Down Expand Up @@ -28,6 +29,7 @@ namespace Sample;
[DependsOn(typeof(FileManagementHttpApiModule))]
[DependsOn(typeof(AbpBlobStoringFileSystemModule))]
[DependsOn(typeof(IdentityClientHttpApiModule))]
[DependsOn(typeof(AuditLoggingHttpApiModule))]
public class SampleHttpApiModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
Expand Down
5 changes: 5 additions & 0 deletions modules/audit-logging/common.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>

<Import Project="..\common.props" />

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Data;
using Volo.Abp.MultiTenancy;

namespace Passingwind.Abp.AuditLogging;

public class AuditLogActionDto : EntityDto<Guid>, IMultiTenant, IHasExtraProperties
{
public virtual Guid? TenantId { get; set; }

public virtual Guid AuditLogId { get; set; }

public virtual string? ServiceName { get; set; }

public virtual string? MethodName { get; set; }

public virtual string? Parameters { get; set; }

public virtual DateTime ExecutionTime { get; set; }

public virtual int ExecutionDuration { get; set; }

public virtual ExtraPropertyDictionary ExtraProperties { get; set; } = null!;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System;

namespace Passingwind.Abp.AuditLogging;

public class AuditLogCleanupRequestDto
{
public AuditLogCleanupBehavior Behavior { get; set; }
public DateTime EndTime { get; set; }
}
Loading

0 comments on commit 64b3247

Please sign in to comment.