mirror of https://gitee.com/bigwinds/arangodb
ui edition mechanism
This commit is contained in:
parent
282b5ac8b8
commit
5d554f9bf3
|
@ -48,10 +48,12 @@ module.exports = router;
|
|||
router.get('/config.js', function (req, res) {
|
||||
const scriptName = req.get('x-script-name');
|
||||
const basePath = req.trustProxy && scriptName || '';
|
||||
const isEnterprise = internal.isEnterprise();
|
||||
res.send(
|
||||
`var frontendConfig = ${JSON.stringify({
|
||||
basePath: basePath,
|
||||
db: req.database,
|
||||
isEnterprise: isEnterprise,
|
||||
authenticationEnabled: internal.authenticationEnabled(),
|
||||
isCluster: cluster.isCluster()
|
||||
})}`
|
||||
|
|
|
@ -138,15 +138,6 @@
|
|||
var currentVersion =
|
||||
window.versionHelper.fromString(data.version);
|
||||
|
||||
if (data.license) {
|
||||
window.frontendConfig.license = data.license;
|
||||
if (data.license !== 'community') {
|
||||
$('#ArangoDBLogo').attr('src', 'img/arangodb_logo_alt.svg');
|
||||
} else {
|
||||
$('.enterprise-menu').show();
|
||||
}
|
||||
}
|
||||
|
||||
$('.navbar #currentVersion').html(
|
||||
' ' + data.version.substr(0, 5) + '<i class="fa fa-exclamation-circle"></i>'
|
||||
);
|
||||
|
|
|
@ -107,6 +107,13 @@
|
|||
|
||||
self.resize();
|
||||
|
||||
console.log(window.frontendConfig);
|
||||
if (window.frontendConfig.isEnterprise === true) {
|
||||
$('#ArangoDBLogo').attr('src', 'img/arangodb_logo_alt.svg');
|
||||
} else {
|
||||
$('.enterprise-menu').show();
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue