Display build config (configure options) on admin console
Signed-off-by: Andras Timar <andras.timar@collabora.com> Change-Id: Iac66ea99d23416c494b04ff92abc0bfeb646e5be
This commit is contained in:
parent
0fdab6e99e
commit
1cddb21b94
5 changed files with 19 additions and 5 deletions
|
@ -125,10 +125,12 @@
|
|||
<p>
|
||||
<h5><b>COOLWSD</b></h5>
|
||||
<div id="coolwsd-version"></div>
|
||||
<div id="coolwsd-buildconfig"></div>
|
||||
</p>
|
||||
<p>
|
||||
<h5><b>LOKit</b></h5>
|
||||
<div id="lokit-version"></div>
|
||||
<div id="lokit-buildconfig"></div>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -85,6 +85,7 @@ var AdminSocketSettings = AdminSocketBase.extend({
|
|||
else {
|
||||
$('#coolwsd-version').text(coolwsdVersionObj.Version);
|
||||
}
|
||||
$('#coolwsd-buildconfig').html(coolwsdVersionObj.BuildConfig);
|
||||
}
|
||||
else if (textMsg.startsWith('lokitversion ')) {
|
||||
var lokitVersionObj = JSON.parse(textMsg.substring(textMsg.indexOf('{')));
|
||||
|
@ -95,6 +96,7 @@ var AdminSocketSettings = AdminSocketBase.extend({
|
|||
$('#lokit-version').html(lokitVersionObj.ProductName + ' ' +
|
||||
lokitVersionObj.ProductVersion + lokitVersionObj.ProductExtension +
|
||||
' (git hash: ' + h + ')');
|
||||
$('#lokit-buildconfig').html(lokitVersionObj.BuildConfig);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
#include <config.h>
|
||||
#include <config_version.h>
|
||||
|
||||
#ifndef COOLWSD_BUILDCONFIG
|
||||
#define COOLWSD_BUILDCONFIG
|
||||
#endif
|
||||
|
||||
#include "Util.hpp"
|
||||
|
||||
#include <csignal>
|
||||
|
@ -635,11 +639,12 @@ namespace Util
|
|||
std::string version, hash;
|
||||
Util::getVersionInfo(version, hash);
|
||||
return
|
||||
"{ \"Version\": \"" + version + "\", "
|
||||
"\"Hash\": \"" + hash + "\", "
|
||||
"\"Protocol\": \"" + COOLProtocol::GetProtocolVersion() + "\", "
|
||||
"\"Id\": \"" + Util::getProcessIdentifier() + "\", "
|
||||
"\"Options\": \"" + std::string(enableExperimental ? " (E)" : "") + "\" }";
|
||||
"{ \"Version\": \"" + version + "\", "
|
||||
"\"Hash\": \"" + hash + "\", "
|
||||
"\"BuildConfig\": \"" + std::string(COOLWSD_BUILDCONFIG) + "\", "
|
||||
"\"Protocol\": \"" + COOLProtocol::GetProtocolVersion() + "\", "
|
||||
"\"Id\": \"" + Util::getProcessIdentifier() + "\", "
|
||||
"\"Options\": \"" + std::string(enableExperimental ? " (E)" : "") + "\" }";
|
||||
}
|
||||
|
||||
std::string UniqueId()
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
/* Enable permanent anonymization in logs */
|
||||
#undef COOLWSD_ANONYMIZE_USER_DATA
|
||||
|
||||
/* Options passed to configure script */
|
||||
#undef COOLWSD_BUILDCONFIG
|
||||
|
||||
/* Destination for Trace Event output */
|
||||
#undef COOLWSD_TRACEEVENTFILE
|
||||
|
||||
|
|
|
@ -58,6 +58,8 @@ AC_DEFINE_UNQUOTED([COOLWSD_VERSION_HASH],[["$COOLWSD_VERSION_HASH"]],[Collabora
|
|||
|
||||
AC_CONFIG_SRCDIR([wsd/COOLWSD.cpp])
|
||||
|
||||
AC_DEFINE_UNQUOTED([COOLWSD_BUILDCONFIG],[["$ac_configure_args"]],[Options passed to configure script])
|
||||
|
||||
# this is a dummy header, autoheader adds all entries to it
|
||||
# don't include config_unused.h anywhere!
|
||||
AC_CONFIG_HEADERS([config_unused.h])
|
||||
|
|
Loading…
Reference in a new issue