[backend/razor] Improve exception details view in queue dashboard
This commit is contained in:
parent
3599150603
commit
5f6603f044
2 changed files with 23 additions and 2 deletions
|
@ -101,9 +101,26 @@
|
|||
@if (Model.Job is { StackTrace: not null, Exception: null })
|
||||
{
|
||||
<tr>
|
||||
<td>Exception stack trace</td>
|
||||
<td>
|
||||
<pre><code>@Model.Job.StackTrace</code></pre>
|
||||
Exception stack trace
|
||||
<br/>
|
||||
<button onclick="copyElementToClipboard('exceptionStackTrace')">Copy to clipboard</button>
|
||||
</td>
|
||||
<td>
|
||||
<pre><code id="exceptionStackTrace">@Model.Job.StackTrace</code></pre>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (Model.Job.Exception != null)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
Exception details
|
||||
<br/>
|
||||
<button onclick="copyElementToClipboard('exceptionDetails')">Copy to clipboard</button>
|
||||
</td>
|
||||
<td>
|
||||
<pre><code id="exceptionDetails">@Model.Job.Exception</code></pre>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
|
|
@ -21,3 +21,7 @@ function navigate(target) {
|
|||
async function copyToClipboard(text) {
|
||||
await navigator.clipboard.writeText(text);
|
||||
}
|
||||
|
||||
async function copyElementToClipboard(id) {
|
||||
await copyToClipboard(document.getElementById(id).textContent);
|
||||
}
|
Loading…
Add table
Reference in a new issue