This commit is contained in:
@@ -33,7 +33,17 @@ type VmTraceMeta struct {
|
||||
DailyClass string
|
||||
}
|
||||
|
||||
templ VmTracePage(query string, display_query string, vm_id string, vm_uuid string, vm_name string, creationLabel string, deletionLabel string, creationApprox bool, entries []VmTraceEntry, chart VmTraceChart, meta VmTraceMeta) {
|
||||
type VmTraceDiagnosticLine struct {
|
||||
Label string
|
||||
Value string
|
||||
}
|
||||
|
||||
type VmTraceDiagnostics struct {
|
||||
Visible bool
|
||||
Lines []VmTraceDiagnosticLine
|
||||
}
|
||||
|
||||
templ VmTracePage(query string, display_query string, vm_id string, vm_uuid string, vm_name string, creationLabel string, deletionLabel string, creationApprox bool, entries []VmTraceEntry, chart VmTraceChart, meta VmTraceMeta, diagnostics VmTraceDiagnostics) {
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@core.Header()
|
||||
@@ -107,6 +117,23 @@ templ VmTracePage(query string, display_query string, vm_id string, vm_uuid stri
|
||||
<p class="mt-2 text-base font-semibold text-slate-800">{deletionLabel}</p>
|
||||
</div>
|
||||
</div>
|
||||
if diagnostics.Visible && len(diagnostics.Lines) > 0 {
|
||||
<details class="web2-card mb-4">
|
||||
<summary class="cursor-pointer text-sm font-semibold text-slate-700">Lifecycle diagnostics</summary>
|
||||
<div class="mt-3 overflow-hidden border border-slate-200 rounded">
|
||||
<table class="web2-table">
|
||||
<tbody>
|
||||
for _, line := range diagnostics.Lines {
|
||||
<tr>
|
||||
<td class="font-semibold text-slate-700 w-72">{ line.Label }</td>
|
||||
<td class="text-slate-600">{ line.Value }</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
}
|
||||
<div class="overflow-hidden border border-slate-200 rounded">
|
||||
<table class="web2-table">
|
||||
<thead>
|
||||
|
||||
Reference in New Issue
Block a user