Browse Source
Minor frontend improvements
- Fix colors for data-tags in dark theme
- Drop the "integrity" tag on /dark-touchups.css to avoid driving myself crazy
- Remove bottom margins on "pre" tags
- Mem stats above Cache stats on /admin
master
Dan Janosik
5 years ago
No known key found for this signature in database
GPG Key ID: C6F8CE9FFDB2CED2
5 changed files with
46 additions and
32 deletions
CHANGELOG.md
public/css/dark-touchups.css
public/css/styling.css
views/admin.pug
views/layout.pug
@ -13,7 +13,7 @@
* Avg block time for current difficulty epoch with estimate of next difficulty adjustment
* Tweaks to data in blocks lists:
* Simpler timestamp formatting for easy reading
* Include "Time-to-Mine" (TTM) for each block (with green/red highlighting for "fast"/"slow" (< 5min / > 15min) blocks)
* Include "Time-to-Mine" (TTM) for each block (with green/red highlighting for "fast"/"slow" (< 5min / > 15min) blocks)
* Display average fee in sat/vB
* Add total fees
* Add output volume (if `getblockstats` rpc call is supported, i.e. 0.17.0+)
@ -8,10 +8,21 @@ hr {
. data-tag {
color : # 111 ! important ;
background-color : # aaa ! important ;
border-color : # cccccc ! important ;
}
. data-tag . bg-dark {
background-color : # cccccc ! important ;
}
. alert {
opacity : 0 . 8 ! important ;
}
hr {
border-top : 1px solid rgba ( 255 , 255 , 255 , 0 . 1 ) ! important ;
}
. hljs-attr {
color : # eeeeee ;
}
@ -71,6 +71,7 @@ pre {
white-space : -pre-wrap ;
white-space : -o-pre-wrap ;
word-wrap : break-word ;
margin-bottom : 0 ;
}
dd {
@ -27,32 +27,6 @@ block content
- var uptime = moment.duration(new Date().getTime() - appStartTime);
span #{uptime.format()}
div.card.shadow-sm.mb-3
div.card-body
h3.h6 Cache Stats
hr
table.table.table-hover
thead
tr
th Cache
th.text-right Hit
th.text-right Miss
th.text-right Hit Rate
tbody
each item, itemName in cacheStats
tr.text-monospace
td #{itemName}
td.text-right #{item.hit.toLocaleString()}
td.text-right #{item.miss.toLocaleString()}
td.text-right
if (item.hit > 0 || item.miss > 0)
span #{(100 * item.hit / (item.hit + item.miss)).toLocaleString()}
small %
else
span -
div.card.shadow-sm.mb-3
div.card-body
h3.h6 Memory Stats
@ -94,6 +68,33 @@ block content
span #{data[0]}
small #{data[1].abbreviation}B
if (JSON.stringify(cacheStats) != "{}")
div.card.shadow-sm.mb-3
div.card-body
h3.h6 Cache Stats
hr
table.table.table-hover
thead
tr
th Cache
th.text-right Hit
th.text-right Miss
th.text-right Hit Rate
tbody
each item, itemName in cacheStats
tr.text-monospace
td #{itemName}
td.text-right #{item.hit.toLocaleString()}
td.text-right #{item.miss.toLocaleString()}
td.text-right
if (item.hit > 0 || item.miss > 0)
span #{(100 * item.hit / (item.hit + item.miss)).toLocaleString()}
small %
else
span -
div.card.shadow-sm.mb-3
div.card-body
h3.h6 RPC Stats
@ -160,7 +161,7 @@ block content
hr
div.highlight
pre.mb-0
pre
code.json #{JSON.stringify(memstats, null, 4)}
div.card.shadow-sm.mb-3
@ -169,5 +170,6 @@ block content
hr
div.highlight
pre.mb-0
pre
code.json #{JSON.stringify(errorStats, null, 4)}
@ -11,7 +11,7 @@ html(lang="en")
if (session.uiTheme && session.uiTheme == "dark")
link(rel="stylesheet", href="/css/bootstrap-dark.min.css", integrity="sha384-yHrdw+uFPe64ykHEYlYL2lmT0s+veKi1+lmxNqB3jVMOl9iX0h9xDLxcgtFtiV6M")
link(rel="stylesheet", href="/css/dark-touchups.css", integrity="sha384-nUVK/u/fwyNP4THfHo2CtWSoyZaxa65KenBmn/46NaEgGD5uaUFz+N6cqgg8n5t0" )
link(rel="stylesheet", href="/css/dark-touchups.css")
else
link(rel="stylesheet", href="/css/bootstrap.min.css", integrity="sha384-QO/VzYasHIIVEtFdqGXHU2wxSK0pjVxX4mrM68IQhYpi0vTCM0ZIuV/KQbPZMfXg")