Browse Source

- /admin: uptime item

- trying to fix certbot...
master
Dan Janosik 5 years ago
parent
commit
624310a985
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 2
      app.js
  2. 1
      public/.well-known/acme-challenge/certbot-challenges-here
  3. 1
      routes/baseActionsRouter.js
  4. 12
      views/admin.pug

2
app.js

@ -359,6 +359,8 @@ function refreshNetworkVolumes() {
app.onStartup = function() {
global.appStartTime = new Date().getTime();
global.config = config;
global.coinConfig = coins[config.coin];
global.coinConfigs = coins;

1
public/.well-known/acme-challenge/certbot-challenges-here

@ -0,0 +1 @@
certbot

1
routes/baseActionsRouter.js

@ -1469,6 +1469,7 @@ router.get("/tools", function(req, res, next) {
});
router.get("/admin", function(req, res, next) {
res.locals.appStartTime = global.appStartTime;
res.locals.memstats = v8.getHeapStatistics();
res.locals.rpcStats = global.rpcStats;

12
views/admin.pug

@ -15,6 +15,18 @@ block content
div.tab-content
div.tab-pane.active(id="tab-details", role="tabpanel")
div.card.shadow-sm.mb-3
div.card-body
h3.h6 Basics
hr
div.clearfix
div.row
div.summary-table-label Uptime
div.summary-table-content.text-monospace
- var uptime = moment.duration(new Date().getTime() - appStartTime);
span #{uptime.format()}
div.card.shadow-sm.mb-3
div.card-body
h3.h6 Memory Stats

Loading…
Cancel
Save