more location renaming
This commit is contained in:
+5
-5
@@ -1346,7 +1346,7 @@ async function install(data, auditSource) {
|
|||||||
|
|
||||||
const taskId = await addTask(appId, app.installationState, task, auditSource);
|
const taskId = await addTask(appId, app.installationState, task, auditSource);
|
||||||
|
|
||||||
const newApp = _.extend({}, _.omit(app, 'icon'), { appStoreId, manifest, location: subdomain, domain, portBindings });
|
const newApp = _.extend({}, _.omit(app, 'icon'), { appStoreId, manifest, subdomain, domain, portBindings });
|
||||||
newApp.fqdn = dns.fqdn(newApp.subdomain, domainObjectMap[newApp.domain]);
|
newApp.fqdn = dns.fqdn(newApp.subdomain, domainObjectMap[newApp.domain]);
|
||||||
newApp.secondaryDomains.forEach(function (ad) { ad.fqdn = dns.fqdn(ad.subdomain, domainObjectMap[ad.domain]); });
|
newApp.secondaryDomains.forEach(function (ad) { ad.fqdn = dns.fqdn(ad.subdomain, domainObjectMap[ad.domain]); });
|
||||||
newApp.redirectDomains.forEach(function (ad) { ad.fqdn = dns.fqdn(ad.subdomain, domainObjectMap[ad.domain]); });
|
newApp.redirectDomains.forEach(function (ad) { ad.fqdn = dns.fqdn(ad.subdomain, domainObjectMap[ad.domain]); });
|
||||||
@@ -1697,8 +1697,8 @@ async function setLocation(app, data, auditSource) {
|
|||||||
let error = checkAppState(app, exports.ISTATE_PENDING_LOCATION_CHANGE);
|
let error = checkAppState(app, exports.ISTATE_PENDING_LOCATION_CHANGE);
|
||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
|
|
||||||
let values = {
|
const values = {
|
||||||
location: data.subdomain.toLowerCase(),
|
subdomain: data.subdomain.toLowerCase(),
|
||||||
domain: data.domain.toLowerCase(),
|
domain: data.domain.toLowerCase(),
|
||||||
// these are intentionally reset, if not set
|
// these are intentionally reset, if not set
|
||||||
portBindings: null,
|
portBindings: null,
|
||||||
@@ -1744,7 +1744,7 @@ async function setLocation(app, data, auditSource) {
|
|||||||
|
|
||||||
const task = {
|
const task = {
|
||||||
args: {
|
args: {
|
||||||
oldConfig: _.pick(app, 'location', 'domain', 'fqdn', 'secondaryDomains', 'redirectDomains', 'aliasDomains', 'portBindings'),
|
oldConfig: _.pick(app, 'subdomain', 'domain', 'fqdn', 'secondaryDomains', 'redirectDomains', 'aliasDomains', 'portBindings'),
|
||||||
skipDnsSetup: !!data.skipDnsSetup,
|
skipDnsSetup: !!data.skipDnsSetup,
|
||||||
overwriteDns: !!data.overwriteDns
|
overwriteDns: !!data.overwriteDns
|
||||||
},
|
},
|
||||||
@@ -2220,7 +2220,7 @@ async function clone(app, data, user, auditSource) {
|
|||||||
};
|
};
|
||||||
const taskId = await addTask(newAppId, exports.ISTATE_PENDING_CLONE, task, auditSource);
|
const taskId = await addTask(newAppId, exports.ISTATE_PENDING_CLONE, task, auditSource);
|
||||||
|
|
||||||
const newApp = _.extend({}, _.omit(obj, 'icon'), { appStoreId, manifest, location: subdomain, domain, portBindings });
|
const newApp = _.extend({}, _.omit(obj, 'icon'), { appStoreId, manifest, subdomain, domain, portBindings });
|
||||||
newApp.fqdn = dns.fqdn(newApp.subdomain, domainObjectMap[newApp.domain]);
|
newApp.fqdn = dns.fqdn(newApp.subdomain, domainObjectMap[newApp.domain]);
|
||||||
newApp.secondaryDomains.forEach(function (ad) { ad.fqdn = dns.fqdn(ad.subdomain, domainObjectMap[ad.domain]); });
|
newApp.secondaryDomains.forEach(function (ad) { ad.fqdn = dns.fqdn(ad.subdomain, domainObjectMap[ad.domain]); });
|
||||||
newApp.redirectDomains.forEach(function (ad) { ad.fqdn = dns.fqdn(ad.subdomain, domainObjectMap[ad.domain]); });
|
newApp.redirectDomains.forEach(function (ad) { ad.fqdn = dns.fqdn(ad.subdomain, domainObjectMap[ad.domain]); });
|
||||||
|
|||||||
Reference in New Issue
Block a user