Fix build and code structure improvements. New but essential UI functionality. CI improvements. Documentation improvements. AI module improvements.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#pragma warning disable CS0436 // Type conflicts with imported type - local Program class is intentionally used
|
||||
using Microsoft.AspNetCore.Diagnostics;
|
||||
using Microsoft.AspNetCore.Http.HttpResults;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -1942,7 +1943,7 @@ static async Task<Results<FileStreamHttpResult, JsonHttpResult<ExportPage<T>>, P
|
||||
}
|
||||
httpContext.Response.Headers["X-Stella-Result-Count"] = page.Items.Count.ToString();
|
||||
|
||||
var acceptsNdjson = httpContext.Request.Headers.Accept.Any(h => h.Contains("application/x-ndjson", StringComparison.OrdinalIgnoreCase));
|
||||
var acceptsNdjson = httpContext.Request.Headers.Accept.Any(h => h?.Contains("application/x-ndjson", StringComparison.OrdinalIgnoreCase) == true);
|
||||
if (acceptsNdjson)
|
||||
{
|
||||
httpContext.Response.ContentType = "application/x-ndjson";
|
||||
@@ -1975,32 +1976,32 @@ static bool TryGetTenant(HttpContext httpContext, out ProblemHttpResult? problem
|
||||
return true;
|
||||
}
|
||||
|
||||
static int? ParseInt(string value)
|
||||
static int? ParseInt(string? value)
|
||||
{
|
||||
return int.TryParse(value, out var result) ? result : null;
|
||||
}
|
||||
|
||||
static long? ParseLong(string value)
|
||||
static long? ParseLong(string? value)
|
||||
{
|
||||
return long.TryParse(value, out var result) ? result : null;
|
||||
}
|
||||
|
||||
static DateTimeOffset? ParseDate(string value)
|
||||
static DateTimeOffset? ParseDate(string? value)
|
||||
{
|
||||
return DateTimeOffset.TryParse(value, out var result) ? result : null;
|
||||
}
|
||||
|
||||
static decimal? ParseDecimal(string value)
|
||||
static decimal? ParseDecimal(string? value)
|
||||
{
|
||||
return decimal.TryParse(value, out var result) ? result : null;
|
||||
}
|
||||
|
||||
static bool? ParseBool(string value)
|
||||
static bool? ParseBool(string? value)
|
||||
{
|
||||
return bool.TryParse(value, out var result) ? result : null;
|
||||
}
|
||||
|
||||
static Guid? ParseGuid(string value)
|
||||
static Guid? ParseGuid(string? value)
|
||||
{
|
||||
return Guid.TryParse(value, out var result) ? result : null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"profiles": {
|
||||
"StellaOps.Findings.Ledger.WebService": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "https://localhost:62523;http://localhost:62524"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -297,7 +297,7 @@ public sealed class FindingScoringService : IFindingScoringService
|
||||
CancellationToken ct)
|
||||
{
|
||||
var cacheKey = GetCacheKey(findingId);
|
||||
if (_cache.TryGetValue<EvidenceWeightedScoreResponse>(cacheKey, out var cached))
|
||||
if (_cache.TryGetValue<EvidenceWeightedScoreResponse>(cacheKey, out var cached) && cached is not null)
|
||||
{
|
||||
return Task.FromResult<EvidenceWeightedScoreResponse?>(cached with { FromCache = true });
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
|
||||
<PackageReference Include="Serilog.AspNetCore" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -21,7 +21,7 @@
|
||||
<ProjectReference Include="..\..\Telemetry\StellaOps.Telemetry.Core\StellaOps.Telemetry.Core\StellaOps.Telemetry.Core.csproj" />
|
||||
<ProjectReference Include="..\..\Scanner\__Libraries\StellaOps.Scanner.Reachability\StellaOps.Scanner.Reachability.csproj" />
|
||||
<ProjectReference Include="..\..\Scanner\__Libraries\StellaOps.Scanner.Analyzers.Native\StellaOps.Scanner.Analyzers.Native.csproj" />
|
||||
<ProjectReference Include="..\..\__Libraries\StellaOps.Router.AspNet\StellaOps.Router.AspNet.csproj" />
|
||||
<ProjectReference Include="..\..\Router/__Libraries/StellaOps.Router.AspNet\StellaOps.Router.AspNet.csproj" />
|
||||
<ProjectReference Include="..\..\Signals\StellaOps.Signals\StellaOps.Signals.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user