vspd/webapi/templates/admin.html
2020-06-12 13:35:43 +00:00

87 lines
2.9 KiB
HTML

{{ template "header" . }}
{{ template "vsp-stats" .VspStats }}
<section>
<h3>Admin</h3>
<a class="btn btn-primary" href="/admin/backup" download>Backup Database</a>
<form class="my-2" action="/admin/logout" method="post">
<button class="btn btn-primary" type="submit">Logout</button>
</form>
<form class="my-2" action="/admin/ticket" method="post">
<input type="text" name="hash" size="64" minlength="64" maxlength="64" required placeholder="Ticket hash">
<button class="btn btn-primary" type="submit">Search</button>
</form>
{{ with .SearchResult }}
{{ if .Found }}
{{ with .Ticket }}
<table class="table table-dark my-2 ticket-table">
<tr>
<th>Hash</th>
<td>{{ .Hash }}</td>
</tr>
<tr>
<th>Commitment Address</th>
<td>{{ .CommitmentAddress }}</td>
</tr>
<tr>
<th>Fee Address Index</th>
<td>{{ .FeeAddressIndex }}</td>
</tr>
<tr>
<th>Fee Address</th>
<td>{{ .FeeAddress }}</td>
</tr>
<tr>
<th>Fee Amount</th>
<td>{{ .FeeAmount }} atoms</td>
</tr>
<tr>
<th>Fee Expiration</th>
<td>{{ .FeeExpiration }}</td>
</tr>
<tr>
<th>Confirmed</th>
<td>{{ .Confirmed }}</td>
</tr>
<tr>
<th>Vote Choices</th>
<td>
{{ range $key, $value := .VoteChoices }}
{{ $key }}: {{ $value }} <br />
{{ end }}
</td>
</tr>
<tr>
<th>Voting WIF</th>
<td>{{ .VotingWIF }}</td>
</tr>
<tr>
<th>Fee Tx</th>
<td>{{ .FeeTxHex }}</td>
</tr>
<tr>
<th>Fee Tx Hash</th>
<td>{{ .FeeTxHash }}</td>
</tr>
<tr>
<th>Fee Tx Status</th>
<td>{{ .FeeTxStatus }}</td>
</tr>
<tr>
</tr>
</table>
{{ end }}
{{ else }}
<p>No ticket with hash <span class="code">"{{ .Hash }}"</span></p>
{{ end }}
{{ end }}
</section>
{{ template "footer" . }}