168 lines
6.6 KiB
HTML
168 lines
6.6 KiB
HTML
{{ template "header" . }}
|
|
|
|
<div class="vsp-overview pt-4 pb-3 mb-3">
|
|
<div class="container">
|
|
|
|
<div class="d-flex flex-wrap">
|
|
<h1 class="mr-auto text-nowrap">Admin Panel</h1>
|
|
|
|
<div class="row">
|
|
<a class="m-2 btn btn-primary btn-small" href="/admin/backup" download>Backup</a>
|
|
|
|
<form class="p-2" action="/admin/logout" method="post">
|
|
<button type="submit" class="btn btn-primary btn-small">Logout</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{{ template "vsp-stats" .VspStats }}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<div class="row">
|
|
|
|
<div class="col-12 p-3">
|
|
<div class="block__content">
|
|
<h1>Voting Wallet Status</h1>
|
|
|
|
<table class="table status-table mb-0" width="100%">
|
|
<tr>
|
|
<th>URL</th>
|
|
<th>Best Block Height</th>
|
|
<th>Daemon Connected</th>
|
|
<th>Unlocked</th>
|
|
<th>Voting</th>
|
|
<th>Vote Version</th>
|
|
</tr>
|
|
{{ range $host, $status := .WalletStatus }}
|
|
<tr>
|
|
<td>{{ $host }}</td>
|
|
|
|
{{ if $status.Connected }}
|
|
|
|
{{ if $status.BestBlockError }}
|
|
<td class="status-bad">Error</td>
|
|
{{ else }}
|
|
<td>{{ $status.BestBlockHeight }}</td>
|
|
{{ end }}
|
|
|
|
{{ if $status.InfoError }}
|
|
<td class="status-bad" colspan="4">Error getting wallet info</td>
|
|
{{ else }}
|
|
<td class="{{ if $status.DaemonConnected }}status-good{{else}}status-bad{{end}}"
|
|
>{{ $status.DaemonConnected }}</td>
|
|
|
|
|
|
<td class="{{ if $status.Unlocked }}status-good{{else}}status-bad{{end}}"
|
|
>{{ $status.Unlocked }}</td>
|
|
|
|
|
|
<td class="{{ if $status.Voting }}status-good{{else}}status-bad{{end}}"
|
|
>{{ $status.Voting }}</td>
|
|
|
|
<td>{{ $status.VoteVersion }}</td>
|
|
{{ end }}
|
|
|
|
{{else}}
|
|
<td class="status-bad" colspan="5">Cannot connect to wallet</td>
|
|
{{end}}
|
|
</tr>
|
|
{{end}}
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<div class="row">
|
|
|
|
<div class="col-12 p-3">
|
|
<div class="block__content">
|
|
<h1>Ticket Search</h1>
|
|
|
|
<form class="my-2" action="/admin/ticket" method="post">
|
|
<input type="text" name="hash" size="64" minlength="64" maxlength="64" required placeholder="Ticket hash" autocomplete="off">
|
|
<button class="ml-3 btn btn-primary" type="submit">Search</button>
|
|
</form>
|
|
|
|
{{ with .SearchResult }}
|
|
{{ if .Found }}
|
|
{{ with .Ticket }}
|
|
<table class="table ticket-table mt-4 mb-0">
|
|
<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>
|
|
<th>Ticket Outcome</th>
|
|
<td>{{ .Outcome }}</td>
|
|
</tr>
|
|
</table>
|
|
{{ end }}
|
|
{{ else }}
|
|
<p>No ticket found with hash <span class="code">{{ .Hash }}</span></p>
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
{{ template "footer" . }}
|