@using Zap.BI.Portal.Pages.Diagnostics
@model Zap.BI.Portal.Models.Diagnostics.ADDiagnostic

@{
    Layout = null;
}

@if (Model.Messages.Any())
{
    <h2>@DiagnosticText.ADDiagnostics_Logs</h2>

    foreach (string message in Model.Messages)
    {
        <p>@message</p>
    }
    <hr />
}

@if (Model.Exceptions.Any())
{
    <h2>@DiagnosticText.ADDiagnostics_Errors</h2>
            
    foreach (Exception error in Model.Exceptions)
    {
        Html.RenderPartial("Exception", error);
    }
    <hr />
}

@if (@Model.UserGroup != null)
{
    <div class='@(Model.UserGroup.IsInGroup ? "goodMessage user-in-group" : "badMessage")' >
                
        <h3>@(Model.UserGroup.IsInGroup
                    ? DiagnosticText.ADDiagnostics_IsInGroup
                    : DiagnosticText.ADDiagnostics_IsNotInGroup)</h3>
    </div>
    <hr/>
}

@if (@Model.User != null)
{
    Html.RenderPartial("User", @Model.User);
    <hr/>
}

@if (@Model.Group != null)
{
    Html.RenderPartial("Group", @Model.Group);
    <hr/>
}