Browse Source

consistency fix

fix-133-memory-crash
Dan Janosik 7 years ago
parent
commit
fc51128d02
  1. BIN
      public/img/screenshots/node-details.png
  2. 12
      routes/baseActionsRouter.js
  3. 2
      views/layout.pug
  4. 4
      views/node-details.pug

BIN
public/img/screenshots/node-details.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 KiB

After

Width:  |  Height:  |  Size: 451 KiB

12
routes/baseActionsRouter.js

@ -51,7 +51,7 @@ router.get("/", function(req, res) {
}); });
}); });
router.get("/node-info", function(req, res) { router.get("/node-details", function(req, res) {
var client = global.client; var client = global.client;
rpcApi.getBlockchainInfo().then(function(getblockchaininfo) { rpcApi.getBlockchainInfo().then(function(getblockchaininfo) {
@ -66,27 +66,27 @@ router.get("/node-info", function(req, res) {
rpcApi.getNetTotals().then(function(getnettotals) { rpcApi.getNetTotals().then(function(getnettotals) {
res.locals.getnettotals = getnettotals; res.locals.getnettotals = getnettotals;
res.render("node-info"); res.render("node-details");
}).catch(function(err) { }).catch(function(err) {
res.locals.userMessage = "Unable to connect to Bitcoin Node at " + env.bitcoind.host + ":" + env.bitcoind.port; res.locals.userMessage = "Unable to connect to Bitcoin Node at " + env.bitcoind.host + ":" + env.bitcoind.port;
res.render("node-info"); res.render("node-details");
}); });
}).catch(function(err) { }).catch(function(err) {
res.locals.userMessage = "Unable to connect to Bitcoin Node at " + env.bitcoind.host + ":" + env.bitcoind.port; res.locals.userMessage = "Unable to connect to Bitcoin Node at " + env.bitcoind.host + ":" + env.bitcoind.port;
res.render("node-info"); res.render("node-details");
}); });
}).catch(function(err) { }).catch(function(err) {
res.locals.userMessage = "Unable to connect to Bitcoin Node at " + env.bitcoind.host + ":" + env.bitcoind.port; res.locals.userMessage = "Unable to connect to Bitcoin Node at " + env.bitcoind.host + ":" + env.bitcoind.port;
res.render("node-info"); res.render("node-details");
}); });
}).catch(function(err) { }).catch(function(err) {
res.locals.userMessage = "Unable to connect to Bitcoin Node at " + env.bitcoind.host + ":" + env.bitcoind.port; res.locals.userMessage = "Unable to connect to Bitcoin Node at " + env.bitcoind.host + ":" + env.bitcoind.port;
res.render("node-info"); res.render("node-details");
}); });
}); });

2
views/layout.pug

@ -35,7 +35,7 @@ html
li(class="nav-item") li(class="nav-item")
a(href="/rpc-terminal", class="nav-link") RPC Terminal a(href="/rpc-terminal", class="nav-link") RPC Terminal
li(class="nav-item") li(class="nav-item")
a(href="/node-info", class="nav-link") Node Details a(href="/node-details", class="nav-link") Node Details
form(method="post", action="/search", class="form-inline") form(method="post", action="/search", class="form-inline")
div(class="input-group") div(class="input-group")
input(type="text", class="form-control form-control-sm", name="query", placeholder="block height, block hash, txid", value=(query), style="width: 250px;") input(type="text", class="form-control form-control-sm", name="query", placeholder="block height, block hash, txid", value=(query), style="width: 250px;")

4
views/node-info.pug → views/node-details.pug

@ -1,10 +1,10 @@
extends layout extends layout
block headContent block headContent
title Node Info title Node Details
block content block content
h1 Node Info h1 Node Details
hr hr
if (getblockchaininfo) if (getblockchaininfo)
Loading…
Cancel
Save