From 5e91a67e788f0b8c779601a56f7db87114c74fdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 2 Mar 2020 11:18:15 -0500 Subject: [PATCH] feat: add user ip to admin/dev/info --- public/language/en-GB/admin/development/info.json | 3 ++- src/controllers/admin/info.js | 1 + src/views/admin/development/info.tpl | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/language/en-GB/admin/development/info.json b/public/language/en-GB/admin/development/info.json index c095a9718b..da7e6b547a 100644 --- a/public/language/en-GB/admin/development/info.json +++ b/public/language/en-GB/admin/development/info.json @@ -1,5 +1,6 @@ { - "you-are-on": "Info - You are on %1:%2", + "you-are-on": "You are on %1:%2", + "ip": "IP %1", "nodes-responded": "%1 nodes responded within %2ms!", "host": "host", "pid": "pid", diff --git a/src/controllers/admin/info.js b/src/controllers/admin/info.js index 4a93fb2089..6a22d52160 100644 --- a/src/controllers/admin/info.js +++ b/src/controllers/admin/info.js @@ -35,6 +35,7 @@ infoController.get = function (req, res) { port: nconf.get('port'), nodeCount: data.length, timeout: timeoutMS, + ip: req.ip, }); }, timeoutMS); }; diff --git a/src/views/admin/development/info.tpl b/src/views/admin/development/info.tpl index 08e8472f94..a3a419ee35 100644 --- a/src/views/admin/development/info.tpl +++ b/src/views/admin/development/info.tpl @@ -1,7 +1,7 @@
-

[[admin/development/info:you-are-on, {host}, {port}]]

+

[[admin/development/info:you-are-on, {host}, {port}]] • [[admin/development/info:ip, {ip}]]