Walter.BOM Namespace
Walter.Web.FireWall Namespace
ASP-WAF | .Net API for WAF Systems

HealthReportingData Class

Class ReportingData contains the format of the data that will get populated

Namespace:  Walter.Web.FireWall.Reporting
Assembly:  Walter.Web.FireWall (in Walter.Web.FireWall.dll)

Syntax


public sealed class HealthReportingData : FireWallReportingModel

Examples


These samples demonstrates how to report data for use by external applications by serializing json data.
Call the HTML template when rendering the report
using Walter.Web.FireWall;
   using Walter.Web.FireWall.Reporting;
   [ApiController]
   [Route("api/[controller]")]
   [Authorize]
   public class HealthController : Controller
   {
   private readonly ILogger<HealthController> _logger;
   private readonly IFireWall _fireWall;
   public HealthController(ILogger<HealthController> logger, IFireWall fireWall)
   {
   _logger = logger;
   _fireWall = fireWall;
   }
   [HttpGet]
   public string Get()
   {
   _logger?.Lazy().LogDebug("Call firewall heath report. Heath status:\n {status}",   _fireWall.Report(ReportTypes.DEFAULT));
   Response.ContentType = "application/xml";
   return _fireWall.Report(ReportTypes.DEFAULT, ReportFormat.HTML);
   }
  }
Minimal configure the firewall to use the health report
services.AddFireWall("your token", "your domain-key"
   , domainName: new Uri("https://www.YourDomain.dll", UriKind.Absolute), options =>
   {
   options.Cypher.ApplicationPassword = "123456Seven";
   options.ApplicationName = "Cosonto sales";
   options.ApplicationTag = "WS3";
   //personalized view located in ~/Views/Shared
   options.Reporting.HealthReportView = "_healthReport";
   options.WebServices.IsUserApiUrl = new Uri(Links.IsUserEndpoint, UriKind.Relative);
   options.WebServices.RegisterLinksApiUrl = new Uri(Links.SiteMapEndPoint, UriKind.Relative);
   options.WebServices.BeaconApiUrl = new Uri(Links.BeaconPoint, UriKind.Relative);
  }).UseGeography(new System.IO.DirectoryInfo("D:\\MaxMind"));
Use NewtonSoft when serializing the report object in service configuration
services.AddControllersWithViews()
                     .AddNewtonsoftJson(options=>  options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore );

Inheritance Hierarchy


Walter.Web.FireWall.Reporting..::..FireWallReportingModel
  Walter.Web.FireWall.Reporting..::..HealthReportingData