move config route under dashboard
it's essentially giving info for various parts of the ui
This commit is contained in:
+1
-30
@@ -2,7 +2,6 @@
|
||||
|
||||
exports = module.exports = {
|
||||
getStatus,
|
||||
getConfig,
|
||||
|
||||
setupDnsAndCert,
|
||||
|
||||
@@ -21,14 +20,12 @@ const apps = require('./apps.js'),
|
||||
appstore = require('./appstore.js'),
|
||||
assert = require('assert'),
|
||||
BoxError = require('./boxerror.js'),
|
||||
branding = require('./branding.js'),
|
||||
constants = require('./constants.js'),
|
||||
cron = require('./cron.js'),
|
||||
debug = require('debug')('box:cloudron'),
|
||||
dashboard = require('./dashboard.js'),
|
||||
dns = require('./dns.js'),
|
||||
eventlog = require('./eventlog.js'),
|
||||
mailServer = require('./mailserver.js'),
|
||||
moment = require('moment-timezone'),
|
||||
network = require('./network.js'),
|
||||
oidc = require('./oidc.js'),
|
||||
@@ -36,10 +33,8 @@ const apps = require('./apps.js'),
|
||||
safe = require('safetydance'),
|
||||
services = require('./services.js'),
|
||||
settings = require('./settings.js'),
|
||||
system = require('./system.js'),
|
||||
tasks = require('./tasks.js'),
|
||||
translation = require('./translation.js'),
|
||||
users = require('./users.js');
|
||||
translation = require('./translation.js');
|
||||
|
||||
async function getStatus() {
|
||||
return {
|
||||
@@ -47,30 +42,6 @@ async function getStatus() {
|
||||
};
|
||||
}
|
||||
|
||||
async function getConfig() {
|
||||
const ubuntuVersion = await system.getUbuntuVersion();
|
||||
const profileConfig = await users.getProfileConfig();
|
||||
const { fqdn:adminFqdn, domain:adminDomain } = await dashboard.getLocation();
|
||||
|
||||
// be picky about what we send out here since this is sent for 'normal' users as well
|
||||
return {
|
||||
apiServerOrigin: await appstore.getApiServerOrigin(),
|
||||
webServerOrigin: await appstore.getWebServerOrigin(),
|
||||
consoleServerOrigin: await appstore.getConsoleServerOrigin(),
|
||||
adminDomain,
|
||||
adminFqdn,
|
||||
mailFqdn: await mailServer.getLocation().fqdn,
|
||||
version: constants.VERSION,
|
||||
ubuntuVersion,
|
||||
isDemo: constants.DEMO,
|
||||
cloudronName: await branding.getCloudronName(),
|
||||
footer: await branding.renderFooter(),
|
||||
features: appstore.getFeatures(),
|
||||
profileLocked: profileConfig.lockUserProfiles,
|
||||
mandatory2FA: profileConfig.mandatory2FA,
|
||||
};
|
||||
}
|
||||
|
||||
async function prepareDashboardDomain(domain, auditSource) {
|
||||
assert.strictEqual(typeof domain, 'string');
|
||||
assert.strictEqual(typeof auditSource, 'object');
|
||||
|
||||
Reference in New Issue
Block a user