Fix appdb.add sql query
This commit is contained in:
@@ -205,7 +205,7 @@ function add(id, appStoreId, manifest, location, domain, portBindings, data, cal
|
|||||||
|
|
||||||
var queries = [];
|
var queries = [];
|
||||||
queries.push({
|
queries.push({
|
||||||
query: 'INSERT INTO apps (id, appStoreId, manifestJson, installationState, location, domain, accessRestrictionJson, memoryLimit, altDomain, xFrameOptions, restoreConfigJson, sso, debugModeJson) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
|
query: 'INSERT INTO apps (id, appStoreId, manifestJson, installationState, location, domain, accessRestrictionJson, memoryLimit, altDomain, xFrameOptions, restoreConfigJson, sso, debugModeJson) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
|
||||||
args: [ id, appStoreId, manifestJson, installationState, location, domain, accessRestrictionJson, memoryLimit, altDomain, xFrameOptions, restoreConfigJson, sso, debugModeJson ]
|
args: [ id, appStoreId, manifestJson, installationState, location, domain, accessRestrictionJson, memoryLimit, altDomain, xFrameOptions, restoreConfigJson, sso, debugModeJson ]
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -219,8 +219,8 @@ function add(id, appStoreId, manifest, location, domain, portBindings, data, cal
|
|||||||
// only allocate a mailbox if mailboxName is set
|
// only allocate a mailbox if mailboxName is set
|
||||||
if (data.mailboxName) {
|
if (data.mailboxName) {
|
||||||
queries.push({
|
queries.push({
|
||||||
query: 'INSERT INTO mailboxes (name, ownerId, ownerType) VALUES (?, ?, ?)',
|
query: 'INSERT INTO mailboxes (name, domain, ownerId, ownerType) VALUES (?, ?, ?, ?)',
|
||||||
args: [ data.mailboxName, id, mailboxdb.TYPE_APP ]
|
args: [ data.mailboxName, domain, id, mailboxdb.TYPE_APP ]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
|
|||||||
error: {},
|
error: {},
|
||||||
app: {},
|
app: {},
|
||||||
location: '',
|
location: '',
|
||||||
|
domain: '',
|
||||||
portBindings: {},
|
portBindings: {},
|
||||||
mediaLinks: [],
|
mediaLinks: [],
|
||||||
certificateFile: null,
|
certificateFile: null,
|
||||||
@@ -57,6 +58,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
|
|||||||
$scope.appInstall.app = {};
|
$scope.appInstall.app = {};
|
||||||
$scope.appInstall.error = {};
|
$scope.appInstall.error = {};
|
||||||
$scope.appInstall.location = '';
|
$scope.appInstall.location = '';
|
||||||
|
$scope.appInstall.domain = '';
|
||||||
$scope.appInstall.portBindings = {};
|
$scope.appInstall.portBindings = {};
|
||||||
$scope.appInstall.state = 'appInfo';
|
$scope.appInstall.state = 'appInfo';
|
||||||
$scope.appInstall.mediaLinks = [];
|
$scope.appInstall.mediaLinks = [];
|
||||||
@@ -102,6 +104,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
|
|||||||
|
|
||||||
$scope.appInstall.mediaLinks = $scope.appInstall.app.manifest.mediaLinks || [];
|
$scope.appInstall.mediaLinks = $scope.appInstall.app.manifest.mediaLinks || [];
|
||||||
$scope.appInstall.location = app.location;
|
$scope.appInstall.location = app.location;
|
||||||
|
$scope.appInstall.domain = $scope.config.fqdn; // FIXME needs to come from domains dropdown
|
||||||
$scope.appInstall.portBindingsInfo = $scope.appInstall.app.manifest.tcpPorts || {}; // Portbinding map only for information
|
$scope.appInstall.portBindingsInfo = $scope.appInstall.app.manifest.tcpPorts || {}; // Portbinding map only for information
|
||||||
$scope.appInstall.portBindings = {}; // This is the actual model holding the env:port pair
|
$scope.appInstall.portBindings = {}; // This is the actual model holding the env:port pair
|
||||||
$scope.appInstall.portBindingsEnabled = {}; // This is the actual model holding the enabled/disabled flag
|
$scope.appInstall.portBindingsEnabled = {}; // This is the actual model holding the enabled/disabled flag
|
||||||
@@ -145,6 +148,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
|
|||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
location: $scope.appInstall.location || '',
|
location: $scope.appInstall.location || '',
|
||||||
|
domain: $scope.appInstall.domain,
|
||||||
portBindings: finalPortBindings,
|
portBindings: finalPortBindings,
|
||||||
accessRestriction: finalAccessRestriction,
|
accessRestriction: finalAccessRestriction,
|
||||||
cert: $scope.appInstall.certificateFile,
|
cert: $scope.appInstall.certificateFile,
|
||||||
|
|||||||
Reference in New Issue
Block a user