@using ScadaLink.Commons.Entities.Audit @using ScadaLink.Commons.Types.Enums @* Reusable single-AuditEvent detail body (#23 M7 Bundle C / M7-T4..T8). Extracted from AuditDrilldownDrawer so the drawer and the execution-tree node-detail modal share one rendering of a row's detail. All form/field rendering follows the form-layout memory: read-only fields first (definition list), then subsections stacked, action buttons at the bottom. *@ @* Read-only field list — primary identification + provenance. *@
Channel / Kind
@Event.Channel / @Event.Kind
Status
@Event.Status
HttpStatus
@(Event.HttpStatus?.ToString() ?? "—")
Target
@(Event.Target ?? "—")
Actor
@(Event.Actor ?? "—")
SourceSiteId
@(Event.SourceSiteId ?? "—")
SourceInstanceId
@(Event.SourceInstanceId ?? "—")
SourceScript
@(Event.SourceScript ?? "—")
CorrelationId
@(Event.CorrelationId?.ToString() ?? "—")
ExecutionId
@(Event.ExecutionId?.ToString() ?? "—")
ParentExecutionId
@(Event.ParentExecutionId?.ToString() ?? "—")
OccurredAtUtc
@FormatTimestamp(Event.OccurredAtUtc)
IngestedAtUtc
@(Event.IngestedAtUtc.HasValue ? FormatTimestamp(Event.IngestedAtUtc.Value) : "—")
DurationMs
@(Event.DurationMs?.ToString() ?? "—")
@* Error subsection — only shown when there is something to report. *@ @if (!string.IsNullOrEmpty(Event.ErrorMessage) || !string.IsNullOrEmpty(Event.ErrorDetail)) {
Error
@if (!string.IsNullOrEmpty(Event.ErrorMessage)) {

@Event.ErrorMessage

} @if (!string.IsNullOrEmpty(Event.ErrorDetail)) {
@Event.ErrorDetail
}
} @* Request body (channel-aware renderer). *@ @if (!string.IsNullOrEmpty(Event.RequestSummary)) {
Request @if (IsRedacted(Event.RequestSummary)) { Redacted }
@RenderBody(Event.RequestSummary!, Event.Channel)
} @* Response body (channel-aware renderer). *@ @if (!string.IsNullOrEmpty(Event.ResponseSummary)) {
Response @if (IsRedacted(Event.ResponseSummary)) { Redacted }
@RenderBody(Event.ResponseSummary!, Event.Channel)
} @* Extra is always JSON when present. *@ @if (!string.IsNullOrEmpty(Event.Extra)) {
Extra
@PrettyPrintJson(Event.Extra!)
} @* Action buttons at the bottom per form-layout memory. *@
@if (IsApiChannel(Event.Channel)) { } @if (Event.CorrelationId is not null) { } @if (Event.ExecutionId is not null) { } @if (Event.ParentExecutionId is not null) { } @if (Event.ExecutionId is not null) { }