Skip to content

Commit

Permalink
refresh fork badges
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Sep 8, 2023
1 parent ec0bbb6 commit 461aa26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion templates/index/networkOverview.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ <h5 class="font-weight-normal mb-0">
</div>
<div class="row border-bottom p-2 mx-0">
<div class="col-md-2"><span data-bs-toggle="tooltip" data-bs-placement="top" title="Name of the Network">Network Forks:</span></div>
<div class="col-md-10">
<div class="col-md-10 template-tbody">
{{ html "<!-- ko foreach: forks -->" }}
<span class="template-row badge rounded-pill" data-bs-toggle="tooltip" data-bs-placement="top" data-bind="css: {'text-bg-success': active, 'text-bg-secondary': !active }, attr: {title: 'Epoch: ' + epoch + ', Fork Version: ' + $root.hexstr(version)}, text: name"></span>
{{ html "<!-- /ko -->" }}
{{ range $i, $fork := .NetworkForks }}
{{ if $fork.Active }}
<span class="badge rounded-pill text-bg-success" data-bs-toggle="tooltip" data-bs-placement="top" title="Epoch: {{ $fork.Epoch }}, Fork Version: 0x{{ printf "%x" $fork.Version }}">{{ $fork.Name }}</span>
Expand Down
2 changes: 1 addition & 1 deletion types/models/indexPage.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type IndexPageData struct {
GenesisForkVersion []byte `json:"genesis_version"`
GenesisValidatorsRoot []byte `json:"genesis_valroot"`

NetworkForks []*IndexPageDataForks `json:"network_forks"`
NetworkForks []*IndexPageDataForks `json:"forks"`
RecentBlocks []*IndexPageDataBlocks `json:"blocks"`
RecentBlockCount uint64 `json:"block_count"`
RecentEpochs []*IndexPageDataEpochs `json:"epochs"`
Expand Down

0 comments on commit 461aa26

Please sign in to comment.