Browse Source

layout consistency fixes

master
Dan Janosik 5 years ago
parent
commit
b9734090e7
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 12
      public/css/styling.css
  2. 2
      views/browser.pug
  3. 40
      views/mempool-summary.pug
  4. 123
      views/node-status.pug

12
public/css/styling.css

@ -24,18 +24,6 @@ code, .text-monospace {
font-size: 80%; font-size: 80%;
} }
.details-table td {
border-top: none;
padding: 0.4em;
padding-right: 0.6em;
}
.properties-header {
width: 160px;
text-align: right;
font-weight: bold;
}
.popover { .popover {
max-width: 1200px; max-width: 1200px;
} }

2
views/browser.pug

@ -45,7 +45,7 @@ block content
div.mt-4 div.mt-4
h3.h6.mt-3.mb-0 Result h3.h6.mt-3.mb-0 Result
pre.border pre.border.mb-3
code.json.bg-light(data-lang="json") #{JSON.stringify(methodResult, null, 4)} code.json.bg-light(data-lang="json") #{JSON.stringify(methodResult, null, 4)}
hr hr

40
views/mempool-summary.pug

@ -22,26 +22,26 @@ block content
h3.h6.mb-0 Summary h3.h6.mb-0 Summary
hr hr
table.table.details-table.mb-0 div.clearfix
tr div.row
td.properties-header Transaction Count div.summary-table-label Tx Count
td.text-monospace(id="tx-count") div.summary-table-content.text-monospace(id="tx-count")
tr div.row
td.properties-header Memory Usage div.summary-table-label Memory Usage
td.text-monospace(id="mem-usage") div.summary-table-content.text-monospace(id="mem-usage")
tr div.row
td.properties-header Total Fees div.summary-table-label Total Fees
td.text-monospace(id="total-fees") div.summary-table-content.text-monospace(id="total-fees")
tr div.row
td.properties-header Avg Fee div.summary-table-label Avg Fee
td.text-monospace(id="avg-fee") div.summary-table-content.text-monospace(id="avg-fee")
tr div.row
td.properties-header Avg Fee Rate div.summary-table-label Avg Fee Rate
td.text-monospace(id="avg-fee-rate") div.summary-table-content.text-monospace(id="avg-fee-rate")
div.card.shadow-sm.mb-3 div.card.shadow-sm.mb-3
div.card-body.px-2.px-md-3 div.card-body.px-2.px-md-3

123
views/node-status.pug

@ -34,34 +34,36 @@ block content
h3.h6.mb-0 Summary h3.h6.mb-0 Summary
hr hr
table.table.details-table.mb-0 div.clearfix
tr div.row
td.properties-header Host : Port div.summary-table-label Host : Port
td.text-monospace #{global.rpcClient.host + " : " + global.rpcClient.port} div.summary-table-content.text-monospace #{global.rpcClient.host + " : " + global.rpcClient.port}
tr div.row
td.properties-header Chain div.summary-table-label Chain
td.text-monospace #{getblockchaininfo.chain} div.summary-table-content.text-monospace #{getblockchaininfo.chain}
tr
td.properties-header Version div.row
td.text-monospace #{getnetworkinfo.version} div.summary-table-label Version
span.text-monospace (#{getnetworkinfo.subversion}) div.summary-table-content.text-monospace #{getnetworkinfo.version} (#{getnetworkinfo.subversion})
tr
td.properties-header Protocol Version div.row
td.text-monospace #{getnetworkinfo.protocolversion} div.summary-table-label Protocol Version
div.summary-table-content.text-monospace #{getnetworkinfo.protocolversion}
if (getblockchaininfo.size_on_disk) if (getblockchaininfo.size_on_disk)
- var sizeData = utils.formatLargeNumber(getblockchaininfo.size_on_disk, 2); - var sizeData = utils.formatLargeNumber(getblockchaininfo.size_on_disk, 2);
tr
td.properties-header Blockchain Size div.row
td.text-monospace #{sizeData[0]} #{sizeData[1].abbreviation}B div.summary-table-label Blockchain Size
div.summary-table-content.text-monospace #{sizeData[0]} #{sizeData[1].abbreviation}B
br br
span.text-muted (pruned: #{getblockchaininfo.pruned}) span.text-muted (pruned: #{getblockchaininfo.pruned})
if (getblockchaininfo.softforks) if (getblockchaininfo.softforks)
tr div.row
td.properties-header Soft Forks div.summary-table-label Soft Forks
td.text-monospace div.summary-table-content.text-monospace
ul.list-unstyled ul.list-unstyled
each item, itemName in getblockchaininfo.softforks each item, itemName in getblockchaininfo.softforks
li li
@ -75,40 +77,41 @@ block content
span status= span status=
span.text-success active span.text-success active
small.text-muted.ml-2 (height: #{item.height.toLocaleString()}) small.text-muted.ml-2 (height: #{item.height.toLocaleString()})
tr div.row
td.properties-header Block Count div.summary-table-label Block Count
td.text-monospace #{getblockchaininfo.blocks.toLocaleString()} div.summary-table-content.text-monospace #{getblockchaininfo.blocks.toLocaleString()}
br br
span.text-muted (headers: #{getblockchaininfo.headers.toLocaleString()}) span.text-muted (headers: #{getblockchaininfo.headers.toLocaleString()})
tr
td.properties-header Difficulty div.row
td.text-monospace div.summary-table-label Difficulty
div.summary-table-content.text-monospace
- var difficultyData = utils.formatLargeNumber(getblockchaininfo.difficulty, 3); - var difficultyData = utils.formatLargeNumber(getblockchaininfo.difficulty, 3);
span(title=parseFloat(getblockchaininfo.difficulty).toLocaleString(), data-toggle="tooltip") span(title=parseFloat(getblockchaininfo.difficulty).toLocaleString(), data-toggle="tooltip")
span #{difficultyData[0]} span #{difficultyData[0]}
span x 10 span x 10
sup #{difficultyData[1].exponent} sup #{difficultyData[1].exponent}
tr div.row
td.properties-header Status div.summary-table-label Status
td.text-monospace div.summary-table-content.text-monospace
if (getblockchaininfo.initialblockdownload || getblockchaininfo.headers > getblockchaininfo.blocks) if (getblockchaininfo.initialblockdownload || getblockchaininfo.headers > getblockchaininfo.blocks)
span Initial block download progress #{(100 * getblockchaininfo.verificationprogress).toLocaleString()}% span Initial block download progress #{(100 * getblockchaininfo.verificationprogress).toLocaleString()}%
else else
span Synchronized with network span.text-success Synchronized with network
tr div.row
- var startTimeAgo = moment.duration(uptimeSeconds * 1000); div.summary-table-label Uptime
td.properties-header Uptime div.summary-table-content.text-monospace
td.text-monospace #{startTimeAgo.format()} - var startTimeAgo = moment.duration(uptimeSeconds * 1000);
span #{startTimeAgo.format()}
tr div.row
td.properties-header Warnings div.summary-table-label Warnings
td.text-monospace div.summary-table-content.text-monospace
if (getblockchaininfo.warnings && getblockchaininfo.warnings.trim().length > 0) if (getblockchaininfo.warnings && getblockchaininfo.warnings.trim().length > 0)
span #{getblockchaininfo.warnings} span.text-danger #{getblockchaininfo.warnings}
else else
span None span None
@ -116,15 +119,15 @@ block content
div.card-body.px-2.px-sm-3 div.card-body.px-2.px-sm-3
h3.h6.mb-0 Network Info h3.h6.mb-0 Network Info
hr hr
table.table.details-table.mb-0 div.clearfix
tr div.row
td.properties-header Peers div.summary-table-label Peers
td.text-monospace #{getnetworkinfo.connections.toLocaleString()} div.summary-table-content.text-monospace #{getnetworkinfo.connections.toLocaleString()}
tr div.row
td.properties-header Network Traffic div.summary-table-label Network Traffic
td.text-monospace div.summary-table-content.text-monospace
- var downData = utils.formatLargeNumber(getnettotals.totalbytesrecv, 2); - var downData = utils.formatLargeNumber(getnettotals.totalbytesrecv, 2);
- var downRateData = utils.formatLargeNumber(getnettotals.totalbytesrecv / uptimeSeconds, 2); - var downRateData = utils.formatLargeNumber(getnettotals.totalbytesrecv / uptimeSeconds, 2);
- var upData = utils.formatLargeNumber(getnettotals.totalbytessent, 2); - var upData = utils.formatLargeNumber(getnettotals.totalbytessent, 2);
@ -137,9 +140,9 @@ block content
span.text-muted (avg #{upRateData[0]} #{upRateData[1].abbreviation}B/s) span.text-muted (avg #{upRateData[0]} #{upRateData[1].abbreviation}B/s)
if (global.getnetworkinfo.networks) if (global.getnetworkinfo.networks)
tr div.row
td.properties-header Interfaces div.summary-table-label Interfaces
td.text-monospace div.summary-table-content.text-monospace
each item, index in global.getnetworkinfo.networks each item, index in global.getnetworkinfo.networks
div div
span.font-weight-bold #{item.name}: span.font-weight-bold #{item.name}:
@ -154,13 +157,13 @@ block content
if (item.proxy) if (item.proxy)
span.text-muted.ml-3 (proxy: #{item.proxy}) span.text-muted.ml-3 (proxy: #{item.proxy})
td.properties-header Local Addresses if (global.getnetworkinfo.localaddresses)
td.text-monospace div.row
if (global.getnetworkinfo.localaddresses) div.summary-table-label Local Addresses
each item, index in global.getnetworkinfo.localaddresses div.summary-table-content.text-monospace
div #{item.address}:#{item.port} each item, index in global.getnetworkinfo.localaddresses
span.text-muted.ml-3 (score: #{item.score.toLocaleString()}) div #{item.address}:#{item.port}
span.text-muted.ml-3 (score: #{item.score.toLocaleString()})
div.tab-pane(id="tab-json", role="tabpanel") div.tab-pane(id="tab-json", role="tabpanel")

Loading…
Cancel
Save