diff --git a/src/config.js b/src/config.js index 09fbcf3e..22778432 100644 --- a/src/config.js +++ b/src/config.js @@ -29,3 +29,4 @@ iptables -A FORWARD -o wg0 -j ACCEPT; module.exports.WG_PRE_DOWN = process.env.WG_PRE_DOWN || ''; module.exports.WG_POST_DOWN = process.env.WG_POST_DOWN || ''; module.exports.LANG = process.env.LANG || 'en'; +module.exports.UI_DETAILED_STATS = process.env.UI_DETAILED_STATS || 'false'; diff --git a/src/lib/Server.js b/src/lib/Server.js index 1f00a6b4..3a419aa8 100644 --- a/src/lib/Server.js +++ b/src/lib/Server.js @@ -18,6 +18,7 @@ const { RELEASE, PASSWORD, LANG, + UI_DETAILED_STATS, } = require('../config'); module.exports = class Server { @@ -44,6 +45,9 @@ module.exports = class Server { .get('/api/lang', (Util.promisify(async () => { return LANG; }))) + .get('/api/ui-detailed-stats', (Util.promisify(async () => { + return UI_DETAILED_STATS === 'true' ? true : false; + }))) // Authentication .get('/api/session', Util.promisify(async (req) => { diff --git a/src/www/index.html b/src/www/index.html index 412d26a0..b63f158f 100644 --- a/src/www/index.html +++ b/src/www/index.html @@ -17,11 +17,8 @@
-