feat: добавил quartz.net dashboard для разработки
This commit is contained in:
@@ -108,6 +108,13 @@ if (!isOpenApiGeneration)
|
|||||||
options.WaitForJobsToComplete = true;
|
options.WaitForJobsToComplete = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (builder.Environment.IsDevelopment() && !isOpenApiGeneration)
|
||||||
|
{
|
||||||
|
builder.Services.AddQuartzDashboard(options =>
|
||||||
|
{
|
||||||
|
options.ReadOnly = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// --- HTTP Clients ---
|
// --- HTTP Clients ---
|
||||||
builder.Services.AddHttpClient<ILlmClient, LlmClient>(client =>
|
builder.Services.AddHttpClient<ILlmClient, LlmClient>(client =>
|
||||||
@@ -188,6 +195,8 @@ app.UseMiddleware<ExceptionHandlingMiddleware>();
|
|||||||
|
|
||||||
if (app.Environment.IsDevelopment())
|
if (app.Environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
|
app.UseStaticFiles();
|
||||||
|
|
||||||
app.UseSwagger(c =>
|
app.UseSwagger(c =>
|
||||||
{
|
{
|
||||||
c.RouteTemplate = "api/docs/{documentName}/swagger.json";
|
c.RouteTemplate = "api/docs/{documentName}/swagger.json";
|
||||||
@@ -203,6 +212,11 @@ if (app.Environment.IsDevelopment())
|
|||||||
app.UseCors();
|
app.UseCors();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
if (app.Environment.IsDevelopment())
|
||||||
|
{
|
||||||
|
app.UseAntiforgery();
|
||||||
|
app.MapQuartzDashboard();
|
||||||
|
}
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>
|
<OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>
|
||||||
<OpenApiDocumentsDirectory>$(BaseIntermediateOutputPath)openapi</OpenApiDocumentsDirectory>
|
<OpenApiDocumentsDirectory>$(BaseIntermediateOutputPath)openapi</OpenApiDocumentsDirectory>
|
||||||
<OpenApiGenerateDocumentsOptions>--file-name openapi</OpenApiGenerateDocumentsOptions>
|
<OpenApiGenerateDocumentsOptions>--file-name openapi</OpenApiGenerateDocumentsOptions>
|
||||||
|
<RequiresAspNetWebAssets>true</RequiresAspNetWebAssets>
|
||||||
<!-- Suppress warnings for public members without XML docs -->
|
<!-- Suppress warnings for public members without XML docs -->
|
||||||
<NoWarn>$(NoWarn);1591</NoWarn>
|
<NoWarn>$(NoWarn);1591</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Identity.Web" Version="4.9.0" />
|
<PackageReference Include="Microsoft.Identity.Web" Version="4.9.0" />
|
||||||
<PackageReference Include="Microsoft.Identity.Web.MicrosoftGraph" Version="4.9.0" />
|
<PackageReference Include="Microsoft.Identity.Web.MicrosoftGraph" Version="4.9.0" />
|
||||||
|
<PackageReference Include="Quartz.Dashboard" Version="3.18.1" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.1.7" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.1.7" />
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
|
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
|
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
|
||||||
|
|||||||
Reference in New Issue
Block a user