mirror of
https://github.com/bitwarden/server.git
synced 2025-01-26 22:31:30 +01:00
add current time and props to logs
This commit is contained in:
parent
d4b4a2b014
commit
922da5596d
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Microsoft.Azure.Documents;
|
||||
using Newtonsoft.Json;
|
||||
@ -14,6 +15,7 @@ namespace Bit.Admin.Models
|
||||
public string MessageTruncated => Message.Length > 200 ? $"{Message.Substring(0, 200)}..." : Message;
|
||||
public string MessageTemplate { get; set; }
|
||||
public Error Exception { get; set; }
|
||||
public IDictionary<string, object> Properties { get; set; }
|
||||
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class Error : Exception, ISerializable
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
<h1>Logs</h1>
|
||||
|
||||
<p>Current UTC time: @DateTime.UtcNow.ToString()</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
|
@ -28,3 +28,15 @@
|
||||
<h2>Exception</h2>
|
||||
<pre style="max-height: 500px;">@Model.Exception.ToString()</pre>
|
||||
}
|
||||
|
||||
@if(Model.Properties != null && Model.Properties.Count > 0)
|
||||
{
|
||||
<h2>Properties</h2>
|
||||
<dl class="row">
|
||||
@foreach(var prop in Model.Properties)
|
||||
{
|
||||
<dt class="col-sm-4 col-lg-3">@prop.Key</dt>
|
||||
<dd class="col-sm-8 col-lg-9">@(prop.Value?.ToString() ?? "-")</dd>
|
||||
}
|
||||
</dl>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user