Dan Janosik
7 years ago
9 changed files with 229 additions and 26 deletions
@ -0,0 +1,56 @@ |
|||
extends layout |
|||
|
|||
block headContent |
|||
title RPC Browser |
|||
|
|||
style. |
|||
pre { |
|||
white-space: pre-wrap; /* Since CSS 2.1 */ |
|||
word-wrap: break-word; /* Internet Explorer 5.5+ */ |
|||
} |
|||
|
|||
block content |
|||
h1 RPC Browser |
|||
hr |
|||
|
|||
|
|||
|
|||
div(class="row") |
|||
div(class="col-md-3") |
|||
each section, sectionIndex in gethelp |
|||
h4 #{section.name} |
|||
small (#{section.methods.length}) |
|||
hr |
|||
|
|||
div(class="mb-4") |
|||
ol(style="padding-left: 30px;") |
|||
each methodX, methodIndex in section.methods |
|||
li |
|||
a(href=("/rpc-browser?method=" + methodX.name), style=(methodX.name == method ? "font-weight: bold; font-style: italic;" : false)) #{methodX.name} |
|||
|
|||
div(class="col-md-9") |
|||
if (methodhelp) |
|||
div(class="row") |
|||
div(class="col-md-6") |
|||
h4(style="display: inline-block;") Command: #{method} |
|||
div(class="col-md-6") |
|||
a(href=("https://bitcoin.org/en/developer-reference#" + method), class="float-md-right") See developer docs » |
|||
|
|||
|
|||
|
|||
hr |
|||
|
|||
pre #{methodhelp} |
|||
|
|||
hr |
|||
|
|||
form(method="get") |
|||
input(type="hidden", name="method", value=method) |
|||
input(type="submit", name="execute", value="Execute", class="btn btn-primary btn-block") |
|||
|
|||
if (methodResult) |
|||
h5(class="mt-3") Result |
|||
|
|||
pre |
|||
code #{JSON.stringify(methodResult, null, 4)} |
|||
|
@ -1,22 +1,22 @@ |
|||
table(class="table table-striped") |
|||
table(class="table table-striped table-responsive-sm") |
|||
thead |
|||
tr |
|||
th |
|||
//th |
|||
th(class="data-header") Height |
|||
th(class="data-header") Timestamp (utc) |
|||
th(class="data-header") Age |
|||
th(class="data-header") Transactions |
|||
th(class="data-header") Size (bytes) |
|||
th(class="data-header text-right") Age |
|||
th(class="data-header text-right") Transactions |
|||
th(class="data-header text-right") Size (bytes) |
|||
tbody |
|||
each block, blockIndex in blocks |
|||
if (block) |
|||
tr |
|||
th #{(blockIndex + blockOffset + 1).toLocaleString()} |
|||
//th #{(blockIndex + blockOffset + 1).toLocaleString()} |
|||
td(class="data-cell monospace") |
|||
a(href=("/block-height/" + block.height)) #{block.height.toLocaleString()} |
|||
td(class="data-cell monospace") #{moment.utc(new Date(parseInt(block.time) * 1000)).format("Y-MM-DD HH:mm:ss")} |
|||
|
|||
- var timeAgo = moment.duration(moment.utc(new Date()).diff(moment.utc(new Date(parseInt(block.time) * 1000)))); |
|||
td(class="data-cell monospace") #{timeAgo.format()} |
|||
td(class="data-cell monospace") #{block.tx.length.toLocaleString()} |
|||
td(class="data-cell monospace") #{block.size.toLocaleString()} |
|||
td(class="data-cell monospace text-right") #{timeAgo.format()} |
|||
td(class="data-cell monospace text-right") #{block.tx.length.toLocaleString()} |
|||
td(class="data-cell monospace text-right") #{block.size.toLocaleString()} |
Loading…
Reference in new issue