Browse Source

more ui tweaks to help reduce server load for the demo site

fix-133-memory-crash
Dan Janosik 7 years ago
parent
commit
6c537e67e3
  1. 5
      app/config.js
  2. 6
      routes/baseActionsRouter.js
  3. 2
      views/includes/block-content.pug

5
app/config.js

@ -26,6 +26,11 @@ module.exports = {
"walletpassphrasechange"
],
site: {
blockTxPageSize:20,
browseBlocksPageSize:20
},
credentials: credentials,
// Edit "ipWhitelistForRpcCommands" regex to limit access to RPC Browser / Terminal to matching IPs

6
routes/baseActionsRouter.js

@ -181,7 +181,7 @@ router.get("/changeSetting", function(req, res) {
});
router.get("/blocks", function(req, res) {
var limit = 20;
var limit = config.site.browseBlocksPageSize;
var offset = 0;
var sort = "desc";
@ -333,7 +333,7 @@ router.get("/block-height/:blockHeight", function(req, res) {
res.locals.result = {};
var limit = 20;
var limit = config.site.blockTxPageSize;
var offset = 0;
if (req.query.limit) {
@ -368,7 +368,7 @@ router.get("/block/:blockHash", function(req, res) {
res.locals.result = {};
var limit = 20;
var limit = config.site.blockTxPageSize;
var offset = 0;
if (req.query.limit) {

2
views/includes/block-content.pug

@ -143,7 +143,7 @@ div(class="tab-content")
else
span Transactions
if (!crawlerBot && txCount > 20)
if (!demoSite && !crawlerBot && txCount > 20)
div(class="col-md-8 text-right")
span(class="mr-2") Show
div(class="btn-group", role="group")

Loading…
Cancel
Save