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 }} - -

Ticket

- - - - - - - - - {{ if .Ticket.Confirmed }} - - {{ else }} - - {{ end }} - - - - - - - - - - - - - -
Hash - - {{ .Ticket.Hash }} - -
Status - Confirmed (purchase height: - {{ .Ticket.PurchaseHeight }}) - Not confirmed
Ticket Outcome{{ .Ticket.Outcome }}
Commitment Address - - {{ .Ticket.CommitmentAddress }} - -
Voting WIF{{ .Ticket.VotingWIF }}
- -

Fee

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 }}
- -

Vote Choices

- - - - - - - - - - -
Consensus Vote Choices - {{ range $key, $value := .Ticket.VoteChoices }} - {{ $key }}: {{ $value }}
- {{ end }} -
- Vote Choice Changes
- ({{ .MaxVoteChanges }} most recent) -
- {{ range $key, $value := .VoteChanges }} -
- - {{ if eq $key 0}} - Initial choices - {{ else }} - Change {{ $key }} - {{ end }} - - - - - - - - - - - - - - - - - - -
Request{{ indentJSON $value.Request }}
Request
Signature
{{ $value.RequestSignature }}
Response{{ indentJSON $value.Response }}
Response
Signature
{{ $value.ResponseSignature }}
-
- {{end}} -
- - {{ else }} -

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 }} + +

Ticket

+ + + + + + + + + {{ if .Ticket.Confirmed }} + + {{ else }} + + {{ end }} + + + + + + + + + + + + + +
Hash + + {{ .Ticket.Hash }} + +
Status + Confirmed (purchase height: + {{ .Ticket.PurchaseHeight }}) + Not confirmed
Ticket Outcome{{ .Ticket.Outcome }}
Commitment Address + + {{ .Ticket.CommitmentAddress }} + +
Voting WIF{{ .Ticket.VotingWIF }}
+ +

Fee

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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 }}
+ +

Vote Choices

+ + + + + + + + + + +
Consensus Vote Choices + {{ range $key, $value := .Ticket.VoteChoices }} + {{ $key }}: {{ $value }}
+ {{ end }} +
+ Vote Choice Changes
+ ({{ .MaxVoteChanges }} most recent) +
+ {{ range $key, $value := .VoteChanges }} +
+ + {{ if eq $key 0}} + Initial choices + {{ else }} + Change {{ $key }} + {{ end }} + + + + + + + + + + + + + + + + + + +
Request{{ indentJSON $value.Request }}
Request
Signature
{{ $value.RequestSignature }}
Response{{ indentJSON $value.Response }}
Response
Signature
{{ $value.ResponseSignature }}
+
+ {{end}} +
+ + {{ else }} +

No ticket found with hash {{ .Hash }}

+ {{ end }} +{{ end }}