summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan <mu.stefan@googlemail.com>2015-04-11 00:49:26 +0200
committerStefan <mu.stefan@googlemail.com>2015-04-11 00:49:26 +0200
commitd47e201232454d3366c34cd3748d4dc11a2395cd (patch)
tree9c0f9612a2d1fd3f9d624b2aba68c1a99dbc2ce5 /src
parentd3277deafcf7c57775ee154236dda938cc5c6329 (diff)
parent8f8303415d388b7ba5f2c0dee087bef51ad56b8b (diff)
downloadetherpad-lite-d47e201232454d3366c34cd3748d4dc11a2395cd.zip
Merge branch 'develop' of git://github.com/ether/etherpad-lite into release/1.5.3
Diffstat (limited to 'src')
-rw-r--r--src/node/hooks/express.js2
-rw-r--r--src/node/hooks/express/adminplugins.js8
-rw-r--r--src/node/utils/Settings.js6
-rw-r--r--src/templates/admin/plugins-info.html5
4 files changed, 17 insertions, 4 deletions
diff --git a/src/node/hooks/express.js b/src/node/hooks/express.js
index 3275bd3f..bf849419 100644
--- a/src/node/hooks/express.js
+++ b/src/node/hooks/express.js
@@ -13,6 +13,8 @@ exports.createServer = function () {
console.log("Report bugs at https://github.com/ether/etherpad-lite/issues")
serverName = "Etherpad " + settings.getGitCommit() + " (http://etherpad.org)";
+
+ console.log("Your Etherpad version is " + settings.getEpVersion() + " (" + settings.getGitCommit() + ")");
exports.restartServer();
diff --git a/src/node/hooks/express/adminplugins.js b/src/node/hooks/express/adminplugins.js
index 5015cc5a..1ae8d7b5 100644
--- a/src/node/hooks/express/adminplugins.js
+++ b/src/node/hooks/express/adminplugins.js
@@ -17,7 +17,13 @@ exports.expressCreateServer = function (hook_name, args, cb) {
});
args.app.get('/admin/plugins/info', function(req, res) {
var gitCommit = settings.getGitCommit();
- res.send( eejs.require("ep_etherpad-lite/templates/admin/plugins-info.html", {gitCommit:gitCommit}) );
+ var epVersion = settings.getEpVersion();
+ res.send( eejs.require("ep_etherpad-lite/templates/admin/plugins-info.html",
+ {
+ gitCommit: gitCommit,
+ epVersion: epVersion
+ })
+ );
});
}
diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js
index 536c088b..7e0e6c5a 100644
--- a/src/node/utils/Settings.js
+++ b/src/node/utils/Settings.js
@@ -199,7 +199,6 @@ exports.getGitCommit = function() {
var refPath = rootPath + "/.git/" + ref.substring(5, ref.indexOf("\n"));
version = fs.readFileSync(refPath, "utf-8");
version = version.substring(0, 7);
- console.log("Your Etherpad git version is " + version);
}
catch(e)
{
@@ -208,6 +207,11 @@ exports.getGitCommit = function() {
return version;
}
+// Return etherpad version from package.json
+exports.getEpVersion = function() {
+ return require('ep_etherpad-lite/package.json').version;
+}
+
exports.reloadSettings = function reloadSettings() {
// Discover where the settings file lives
var settingsFilename = argv.settings || "settings.json";
diff --git a/src/templates/admin/plugins-info.html b/src/templates/admin/plugins-info.html
index 1b328a89..5d39c388 100644
--- a/src/templates/admin/plugins-info.html
+++ b/src/templates/admin/plugins-info.html
@@ -22,8 +22,9 @@
</div>
<div class="innerwrapper">
- <h2>Etherpad Git Commit</h2>
- <p><a href='https://github.com/ether/etherpad-lite/commit/<%= gitCommit %>'><%= gitCommit %></a></p>
+ <h2>Etherpad version</h2>
+ <p>Version number: <%= epVersion %></p>
+ <p>Git sha: <a href='https://github.com/ether/etherpad-lite/commit/<%= gitCommit %>'><%= gitCommit %></a></p>
<h2>Installed plugins</h2>
<pre><%- plugins.formatPlugins().replace(", ","\n") %></pre>