admin -> dashboard

This commit is contained in:
Girish Ramakrishnan
2021-05-05 12:29:04 -07:00
parent cc9b43450c
commit 44ac406e57
28 changed files with 104 additions and 104 deletions

View File

@@ -133,9 +133,9 @@ function runStartupTasks() {
// always generate webadmin config since we have no versioning mechanism for the ejs
function (callback) {
if (!settings.adminDomain()) return callback();
if (!settings.dashboardDomain()) return callback();
reverseProxy.writeDashboardConfig(settings.adminDomain(), callback);
reverseProxy.writeDashboardConfig(settings.dashboardDomain(), callback);
},
// check activation state and start the platform
@@ -174,8 +174,8 @@ function getConfig(callback) {
callback(null, {
apiServerOrigin: settings.apiServerOrigin(),
webServerOrigin: settings.webServerOrigin(),
adminDomain: settings.adminDomain(),
adminFqdn: settings.adminFqdn(),
adminDomain: settings.dashboardDomain(),
adminFqdn: settings.dashboardFqdn(),
mailFqdn: settings.mailFqdn(),
version: constants.VERSION,
isDemo: settings.isDemo(),
@@ -295,7 +295,7 @@ function prepareDashboardDomain(domain, auditSource, callback) {
domains.get(domain, function (error, domainObject) {
if (error) return callback(error);
const fqdn = domains.fqdn(constants.ADMIN_LOCATION, domainObject);
const fqdn = domains.fqdn(constants.DASHBOARD_LOCATION, domainObject);
apps.getAll(function (error, result) {
if (error) return callback(error);
@@ -303,7 +303,7 @@ function prepareDashboardDomain(domain, auditSource, callback) {
const conflict = result.filter(app => app.fqdn === fqdn);
if (conflict.length) return callback(new BoxError(BoxError.BAD_STATE, 'Dashboard location conflicts with an existing app'));
tasks.add(tasks.TASK_SETUP_DNS_AND_CERT, [ constants.ADMIN_LOCATION, domain, auditSource ], function (error, taskId) {
tasks.add(tasks.TASK_SETUP_DNS_AND_CERT, [ constants.DASHBOARD_LOCATION, domain, auditSource ], function (error, taskId) {
if (error) return callback(error);
tasks.startTask(taskId, {}, NOOP_CALLBACK);
@@ -328,9 +328,9 @@ function setDashboardDomain(domain, auditSource, callback) {
reverseProxy.writeDashboardConfig(domain, function (error) {
if (error) return callback(error);
const fqdn = domains.fqdn(constants.ADMIN_LOCATION, domainObject);
const fqdn = domains.fqdn(constants.DASHBOARD_LOCATION, domainObject);
settings.setAdminLocation(domain, fqdn, function (error) {
settings.setDashboardLocation(domain, fqdn, function (error) {
if (error) return callback(error);
appstore.updateCloudron({ domain }, NOOP_CALLBACK);