diff --git a/webapi/templates/admin.html b/webapi/templates/admin.html index 0f3a020..27f293e 100644 --- a/webapi/templates/admin.html +++ b/webapi/templates/admin.html @@ -140,142 +140,7 @@ {{ with .SearchResult }} - {{ if .Found }} - -
| Hash | -- - {{ .Ticket.Hash }} - - | -|
|---|---|---|
| Status | - {{ if .Ticket.Confirmed }} -- Confirmed (purchase height: - {{ .Ticket.PurchaseHeight }}) - | - {{ else }} -Not confirmed | - {{ end }} -
| Ticket Outcome | -{{ .Ticket.Outcome }} | -|
| Commitment Address | -- - {{ .Ticket.CommitmentAddress }} - - | -|
| Voting WIF | -{{ .Ticket.VotingWIF }} | -
| Fee Address | -- - {{ .Ticket.FeeAddress }} - - | -
|---|---|
| Fee Address Index | -{{ .Ticket.FeeAddressIndex }} | -
| Fee Amount | -{{ atomsToDCR .Ticket.FeeAmount }} | -
| Fee Expiration | -{{ .Ticket.FeeExpiration }} ({{ dateTime .Ticket.FeeExpiration }}) | -
| Fee Tx Hash | -- - {{ .Ticket.FeeTxHash }} - - | -
| Fee Tx | -{{ .Ticket.FeeTxHex }} | -
| Fee Tx Status | -{{ .Ticket.FeeTxStatus }} | -
| Consensus Vote Choices | -
- {{ range $key, $value := .Ticket.VoteChoices }}
- {{ $key }}: {{ $value }} - {{ end }} - |
- ||||||||
|---|---|---|---|---|---|---|---|---|---|
|
- Vote Choice Changes - ({{ .MaxVoteChanges }} most recent) - |
-
- {{ range $key, $value := .VoteChanges }}
-
-
- {{end}}
- - {{ if eq $key 0}} - Initial choices - {{ else }} - Change {{ $key }} - {{ end }} --
|
-
No ticket found with hash {{ .Hash }}
- {{ end }} + {{ template "ticket-search-result" . }} {{ end }} diff --git a/webapi/templates/ticket-search-result.html b/webapi/templates/ticket-search-result.html new file mode 100644 index 0000000..f11903c --- /dev/null +++ b/webapi/templates/ticket-search-result.html @@ -0,0 +1,139 @@ +{{ define "ticket-search-result" }} + + {{ if .Found }} + +| Hash | ++ + {{ .Ticket.Hash }} + + | +|
|---|---|---|
| Status | + {{ if .Ticket.Confirmed }} ++ Confirmed (purchase height: + {{ .Ticket.PurchaseHeight }}) + | + {{ else }} +Not confirmed | + {{ end }} +
| Ticket Outcome | +{{ .Ticket.Outcome }} | +|
| Commitment Address | ++ + {{ .Ticket.CommitmentAddress }} + + | +|
| Voting WIF | +{{ .Ticket.VotingWIF }} | +
| Fee Address | ++ + {{ .Ticket.FeeAddress }} + + | +
|---|---|
| Fee Address Index | +{{ .Ticket.FeeAddressIndex }} | +
| Fee Amount | +{{ atomsToDCR .Ticket.FeeAmount }} | +
| Fee Expiration | +{{ .Ticket.FeeExpiration }} ({{ dateTime .Ticket.FeeExpiration }}) | +
| Fee Tx Hash | ++ + {{ .Ticket.FeeTxHash }} + + | +
| Fee Tx | +{{ .Ticket.FeeTxHex }} | +
| Fee Tx Status | +{{ .Ticket.FeeTxStatus }} | +
| Consensus Vote Choices | +
+ {{ range $key, $value := .Ticket.VoteChoices }}
+ {{ $key }}: {{ $value }} + {{ end }} + |
+ ||||||||
|---|---|---|---|---|---|---|---|---|---|
|
+ Vote Choice Changes + ({{ .MaxVoteChanges }} most recent) + |
+
+ {{ range $key, $value := .VoteChanges }}
+
+
+ {{end}}
+ + {{ if eq $key 0}} + Initial choices + {{ else }} + Change {{ $key }} + {{ end }} ++
|
+
No ticket found with hash {{ .Hash }}
+ {{ end }} +{{ end }}