Skip to content

Commit 7144cc8

Browse files
committed
misc(frontend): fix BeaconScore spelling (FE-162)
1 parent a4f9bd8 commit 7144cc8

File tree

8 files changed

+22
-23
lines changed

8 files changed

+22
-23
lines changed

static/js/treemap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
var name = this.name || ""
107107
var sharePct = typeof this.value === "number" ? (this.value * 100).toFixed(2) + "%" : "N/A"
108108
var effPct = typeof this.colorValue === "number" ? (this.colorValue * 100).toFixed(2) + "%" : "N/A"
109-
return '<span style="font-size:11px">' + name + "</span><br/>" + "<span>Net share: <b>" + sharePct + "</b></span><br/>" + "<span>Beaconscore: <b>" + effPct + "</b></span>"
109+
return '<span style="font-size:11px">' + name + "</span><br/>" + "<span>Net share: <b>" + sharePct + "</b></span><br/>" + "<span>BeaconScore: <b>" + effPct + "</b></span>"
110110
},
111111
},
112112
})

templates/entities.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ <h1 class="h4 mb-1 mb-md-0"><i class="fas fa-building mr-1" aria-hidden="true"><
109109
<div class="col-md-12">
110110
<div class="card mb-3">
111111
<div class="card-body">
112-
<div class="text-center">Staking Entities Overview ({{ .Data.Period }})<i class="ml-1 fas fa-info-circle" data-tippy-content="To improve performance, only the 25 largest entities are shown in this chart. Values of hidden entities are still included in aggregate calculations.<br /><br />Read more about how we calculate the Beaconscore in our <a href='https://kb.beaconcha.in/v2beta/metric-validator-efficiency' target='_blank'>docs</a>."></i></div>
112+
<div class="text-center">Staking Entities Overview ({{ .Data.Period }})<i class="ml-1 fas fa-info-circle" data-tippy-content="To improve performance, only the 25 largest entities are shown in this chart. Values of hidden entities are still included in aggregate calculations.<br /><br />Read more about how we calculate the BeaconScore in our <a href='https://kb.beaconcha.in/v2beta/metric-validator-efficiency' target='_blank'>docs</a>."></i></div>
113113
<div id="entities-treemap" style="min-height: 600px;"></div>
114114
<script id="treemap-data" type="application/json">[
115115
{{- $len := len .Data.Treemap -}}
@@ -132,7 +132,7 @@ <h1 class="h4 mb-1 mb-md-0"><i class="fas fa-building mr-1" aria-hidden="true"><
132132
<tr>
133133
<th>Entity</th>
134134
<th>Sub Entities</th>
135-
<th>Beaconscore<span class="ml-1 fas fa-info-circle" data-tippy-content="Read more about how we calculate the Beaconscore in our <a href='https://kb.beaconcha.in/v2beta/metric-validator-efficiency' target='_blank'>docs</a>."></span></th>
135+
<th>BeaconScore<span class="ml-1 fas fa-info-circle" data-tippy-content="Read more about how we calculate the BeaconScore in our <a href='https://kb.beaconcha.in/v2beta/metric-validator-efficiency' target='_blank'>docs</a>."></span></th>
136136
<th>Net Share</th>
137137
</tr>
138138
</thead>

templates/entity_detail.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141

4242
Highcharts.chart(containerId, {
4343
chart: { type: "line", zoomType: "x" },
44-
title: { text: "Beaconscore ({{ .Period }})", style: { color: "var(--font-color)" } },
44+
title: { text: "BeaconScore ({{ .Period }})", style: { color: "var(--font-color)" } },
4545
xAxis: { type: "datetime", labels: { style: { color: "var(--font-color)" } } },
4646
yAxis: {
47-
title: { text: "Beaconscore", style: { color: "var(--font-color)" } },
47+
title: { text: "BeaconScore", style: { color: "var(--font-color)" } },
4848
labels: {
4949
formatter: function () {
5050
return (this.value * 100).toFixed(2) + "%"
@@ -294,7 +294,6 @@
294294
.kpi-card .label {
295295
font-size: 12px;
296296
color: var(--secondary-font-color);
297-
text-transform: uppercase;
298297
letter-spacing: 0.04em;
299298
}
300299

@@ -488,7 +487,7 @@ <h1 class="h4 mb-0 mr-2">Entity Dashboard</h1>
488487
<div class="col-lg-2 col-md-4 col-sm-6 mb-3">
489488
<div class="card kpi-card h-100">
490489
<div class="card-body">
491-
<div class="label"><i class="fas fa-tachometer-alt mr-1" aria-hidden="true"></i> Beaconscore</div>
490+
<div class="label"><i class="fas fa-tachometer-alt mr-1" aria-hidden="true"></i> BeaconScore</div>
492491
<div class="value">{{ formatBeaconscore .Data.Efficiency true }}</div>
493492
</div>
494493
</div>
@@ -512,23 +511,23 @@ <h1 class="h4 mb-0 mr-2">Entity Dashboard</h1>
512511
<div class="col-lg-2 col-md-4 col-sm-6 mb-3">
513512
<div class="card kpi-card h-100">
514513
<div class="card-body">
515-
<div class="label"><i class="fas fa-check-circle mr-1" aria-hidden="true"></i> Attestation Eff.</div>
514+
<div class="label"><i class="fas fa-check-circle mr-1" aria-hidden="true"></i> Attestation Efficiency</div>
516515
<div class="value">{{ formatEfficiency .Data.AttestationEfficiency }}</div>
517516
</div>
518517
</div>
519518
</div>
520519
<div class="col-lg-2 col-md-4 col-sm-6 mb-3">
521520
<div class="card kpi-card h-100">
522521
<div class="card-body">
523-
<div class="label"><i class="fas fa-bolt mr-1" aria-hidden="true"></i> Proposal Eff.</div>
522+
<div class="label"><i class="fas fa-bolt mr-1" aria-hidden="true"></i> Proposal Efficiency</div>
524523
<div class="value">{{ formatEfficiency .Data.ProposalEfficiency }}</div>
525524
</div>
526525
</div>
527526
</div>
528527
<div class="col-lg-2 col-md-4 col-sm-6 mb-3">
529528
<div class="card kpi-card h-100">
530529
<div class="card-body">
531-
<div class="label"><i class="fas fa-users mr-1" aria-hidden="true"></i> Sync Comm. Eff.</div>
530+
<div class="label"><i class="fas fa-users mr-1" aria-hidden="true"></i> Sync Comm. Efficiency</div>
532531
<div class="value">{{ formatEfficiency .Data.SyncCommitteeEfficiency }}</div>
533532
</div>
534533
</div>
@@ -725,7 +724,7 @@ <h1 class="h4 mb-0 mr-2">Entity Dashboard</h1>
725724
<thead>
726725
<tr>
727726
<th>Sub-Entity</th>
728-
<th>Beaconscore</th>
727+
<th>BeaconScore</th>
729728
<th>Net Share</th>
730729
</tr>
731730
</thead>
@@ -750,7 +749,7 @@ <h1 class="h4 mb-0 mr-2">Entity Dashboard</h1>
750749
<tr>
751750
<th>Index</th>
752751
<th>Status</th>
753-
<th>Beaconscore</th>
752+
<th>BeaconScore</th>
754753
</tr>
755754
</thead>
756755
<tbody></tbody>

templates/index/postGenesis.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div class="card-body">
99
<div class="row">
1010
<div class="col-lg-12">
11-
<div class="text-center"><i class="fa fa-building mr-1"></i>Staking Entities Overview (30d)<i class="ml-1 fas fa-info-circle" data-tippy-content="To improve performance, only the 25 largest entities are shown in this chart. Values of hidden entities are still included in aggregate calculations.<br /><br />Read more about how we calculate the Beaconscore in our <a href='https://kb.beaconcha.in/v2beta/metric-validator-efficiency' target='_blank'>docs</a>."></i></div>
11+
<div class="text-center"><i class="fa fa-building mr-1"></i>Staking Entities Overview (30d)<i class="ml-1 fas fa-info-circle" data-tippy-content="To improve performance, only the 25 largest entities are shown in this chart. Values of hidden entities are still included in aggregate calculations.<br /><br />Read more about how we calculate the BeaconScore in our <a href='https://kb.beaconcha.in/v2beta/metric-validator-efficiency' target='_blank'>docs</a>."></i></div>
1212
<div id="index-treemap" style="min-height:400px;"></div>
1313
<script id="index-treemap-data" type="application/json">[
1414
{{- $len := len .EntitiesTreemap -}}

templates/validator/charts.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@
251251
if (!points || points.length === 0) return;
252252
Highcharts.chart('beaconscore-chart', {
253253
chart: { type: 'line', zoomType: 'x', height: '535px' },
254-
title: { text: 'Beaconscore' },
254+
title: { text: 'BeaconScore' },
255255
xAxis: { type: 'datetime', labels: { style: { color: 'var(--font-color)' } } },
256256
yAxis: {
257-
title: { text: 'Beaconscore', style: { color: 'var(--font-color)' } },
257+
title: { text: 'BeaconScore', style: { color: 'var(--font-color)' } },
258258
max: 1,
259259
labels: {
260260
formatter: function () { return (this.value * 100).toFixed(2) + '%'; },
@@ -264,7 +264,7 @@
264264
},
265265
legend: { enabled: false },
266266
tooltip: { xDateFormat: '%e %b, %H:%M', valueDecimals: 4, pointFormatter: function () { return '<span style="color:' + this.color + '">●</span> ' + (this.y * 100).toFixed(2) + '%<br/>'; } },
267-
series: [{ name: 'Beaconscore', data: points, color: '#2ecc71', lineWidth: 2 }],
267+
series: [{ name: 'BeaconScore', data: points, color: '#2ecc71', lineWidth: 2 }],
268268
credits: { enabled: false }
269269
});
270270
});

templates/validator/overview.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
</div>
204204

205205
<div class="m-3 position-relative" style="flex-basis: 4rem; white-space: nowrap;">
206-
<span style="top:-1.2rem; white-space: nowrap;" class="text-muted font-weight-lighter position-absolute"><small>Beaconscore (30d)</small></span>
206+
<span style="top:-1.2rem; white-space: nowrap;" class="text-muted font-weight-lighter position-absolute"><small>BeaconScore (30d)</small></span>
207207
{{ formatBeaconscore .Beaconscore true }}
208208
</div>
209209
</div>

templates/validator/validator.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
<div class="btn-group border rounded mt-2 ml-2 charts-btn-group" role="group" aria-label="Charts buttons group">
178178
<button type="button" class="btn btn-link btn-sm border-right income-chart-btn nav-link">Income</button>
179179
<button type="button" class="btn btn-link btn-sm border-right proposed-chart-btn nav-link">Proposals</button>
180-
<button type="button" class="btn btn-link btn-sm efficiency-chart-btn nav-link">Beaconscore</button>
180+
<button type="button" class="btn btn-link btn-sm efficiency-chart-btn nav-link">BeaconScore</button>
181181
</div>
182182
<div id="incomeChart" class="w-100 mb-2" aria-labelledby="incomeChart-tab">
183183
{{ template "validatorIncomeChart" $ }}

utils/format.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,33 +1235,33 @@ func FormatAttestationInclusionEffectiveness(eff float64) template.HTML {
12351235
func FormatBeaconscore(score float64, includeIcon bool) template.HTML {
12361236
score = score * 100
12371237
tooltipText := ""
1238-
tooltipAdditionalText := "<br /><br />Read more about how we calculate the Beaconscore in our <a href='https://kb.beaconcha.in/v2beta/metric-validator-efficiency' target='_blank'>docs</a>."
1238+
tooltipAdditionalText := "<br /><br />Read more about how we calculate the BeaconScore in our <a href='https://kb.beaconcha.in/v2beta/metric-validator-efficiency' target='_blank'>docs</a>."
12391239
if score < 0 {
12401240
tooltipText = "No active validators found"
12411241
return `<span class="text-info" data-toggle="tooltip" title="No active validators found">N/A</span>`
12421242
} else if score >= 99.5 {
1243-
tooltipText = "A Beaconscore of 99.5% or higher is exceptional."
1243+
tooltipText = "A BeaconScore of 99.5% or higher is exceptional."
12441244
iconHtml := ` - <i class="fas fa-grin-stars"></i>`
12451245
if !includeIcon {
12461246
iconHtml = ""
12471247
}
12481248
return template.HTML(fmt.Sprintf(`<span class="text-success" data-tippy-content="%s"> %.2f%%%s</span>`, tooltipText+tooltipAdditionalText, score, iconHtml))
12491249
} else if score > 99.0 {
1250-
tooltipText = "A Beaconscore between 99.0% and 99.5% is excellent."
1250+
tooltipText = "A BeaconScore between 99.0% and 99.5% is excellent."
12511251
iconHtml := ` - <i class="fas fa-smile"></i>`
12521252
if !includeIcon {
12531253
iconHtml = ""
12541254
}
12551255
return template.HTML(fmt.Sprintf(`<span class="text-success" data-tippy-content="%s"> %.2f%%%s</span>`, tooltipText+tooltipAdditionalText, score, iconHtml))
12561256
} else if score > 98.0 {
1257-
tooltipText = "A Beaconscore between 98.0% and 99.0% is fair."
1257+
tooltipText = "A BeaconScore between 98.0% and 99.0% is fair."
12581258
iconHtml := ` - <i class="fas fa-meh"></i>`
12591259
if !includeIcon {
12601260
iconHtml = ""
12611261
}
12621262
return template.HTML(fmt.Sprintf(`<span class="text-warning" data-tippy-content="%s"> %.2f%%%s</span>`, tooltipText+tooltipAdditionalText, score, iconHtml))
12631263
} else {
1264-
tooltipText = "A Beaconscore below 98.0% is bad."
1264+
tooltipText = "A BeaconScore below 98.0% is bad."
12651265
iconHtml := ` - <i class="fas fa-frown"></i>`
12661266
if !includeIcon {
12671267
iconHtml = ""

0 commit comments

Comments
 (0)