-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stakeholder disapproved blocks page (#733)
This adds a Stakeholder Disapproved Blocks page at "/rejects". This also adds two SVG icons for the Side Chains and Disapproved Blocks pages. Both are in the official decred identity colors as per https://www.decred.org/brand/. Implementation details: Add DisapprovedBlocks to explorerDataSource interface. Add "rejects" template and mount on /rejects. Implement DisapprovedBlocks handler. Clean up many comments in explorerroutes.go. Remove extra span in sidechains.tmpl.
- Loading branch information
Showing
11 changed files
with
147 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{{define "rejects"}} | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
{{template "html-head" "Stakeholder Disapproved Blocks"}} | ||
<body class="{{ theme }}"> | ||
{{template "navbar" . }} | ||
<div class="container main" data-controller="main"> | ||
<h4><span title="blocks disapproved by stakeholder voting"><img class="img-size40" src="/images/pos-hammer.svg" alt="pos hammer"> Stakeholder Disapproved Blocks</span></h4> | ||
<h6>There are currently {{len .Data}} blocks that have been <a href="https://docs.decred.org/faq/proof-of-stake/general/#9-what-is-proof-of-stake-voting">disapproved via PoS voting.</a></h6> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<table class="table striped table-responsive" id="disapprovedblockstable"> | ||
<thead> | ||
<tr> | ||
<th>Height</th> | ||
<th>Main Chain</th> | ||
<th>Parent</th> | ||
<th>Child</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{range .Data}} | ||
<tr id="{{ .Height }}"> | ||
<td class="mono fs15"><a href="/block/{{.Hash}}" class="fs16 height">{{ .Height }}</a></td> | ||
<td class="mono fs15">{{.IsMainchain}}</td> | ||
<td class="break-word"><a href="/block/{{.PrevHash}}" class="hash lh1rem">{{ .PrevHash }}</a></td> | ||
{{if .NextHash }} | ||
<td class="break-word"><a href="/block/{{.NextHash}}" class="hash lh1rem">{{ .NextHash }}</a></td> | ||
{{else}} | ||
<td class="break-word" title="This block is the tip of its chain.">none</td> | ||
{{end}} | ||
</tr> | ||
{{end}} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{{ template "footer" . }} | ||
|
||
</body> | ||
</html> | ||
{{ end }} |
Oops, something went wrong.