diff --git a/src/apps.js b/src/apps.js index b83b49ec7..a0cc8f1d1 100644 --- a/src/apps.js +++ b/src/apps.js @@ -814,7 +814,7 @@ function install(data, user, auditSource, callback) { newApp.fqdn = domains.fqdn(newApp.location, domainObjectMap[newApp.domain]); newApp.alternateDomains.forEach(function (ad) { ad.fqdn = domains.fqdn(ad.subdomain, domainObjectMap[ad.domain]); }); - eventlog.add(eventlog.ACTION_APP_INSTALL, auditSource, { appId: appId, app: newApp, taskId: result.taskId }); + eventlog.add(eventlog.ACTION_APP_INSTALL, auditSource, { appId, app: newApp, taskId: result.taskId }); callback(null, { id : appId, taskId: result.taskId }); }); @@ -839,7 +839,7 @@ function setAccessRestriction(appId, accessRestriction, auditSource, callback) { appdb.update(appId, { accessRestriction: accessRestriction }, function (error) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, accessRestriction: accessRestriction }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, accessRestriction }); callback(); }); @@ -861,7 +861,7 @@ function setLabel(appId, label, auditSource, callback) { appdb.update(appId, { label: label }, function (error) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, label: label }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, label }); callback(); }); @@ -883,7 +883,7 @@ function setTags(appId, tags, auditSource, callback) { appdb.update(appId, { tags: tags }, function (error) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, tags: tags }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, tags }); callback(); }); @@ -909,7 +909,7 @@ function setIcon(appId, icon, auditSource, callback) { safe.fs.unlinkSync(path.join(paths.APP_ICONS_DIR, appId + '.user.png')); } - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, icon: icon }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, icon }); callback(); }); @@ -937,7 +937,7 @@ function setMemoryLimit(appId, memoryLimit, auditSource, callback) { addTask(appId, exports.ISTATE_PENDING_RESIZE, task, function (error, result) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, memoryLimit: memoryLimit, taskId: result.taskId }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, memoryLimit, taskId: result.taskId }); callback(null, { taskId: result.taskId }); }); @@ -966,7 +966,7 @@ function setCpuShares(appId, cpuShares, auditSource, callback) { addTask(appId, exports.ISTATE_PENDING_RESIZE, task, function (error, result) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, cpuShares, taskId: result.taskId }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, cpuShares, taskId: result.taskId }); callback(null, { taskId: result.taskId }); }); @@ -995,7 +995,7 @@ function setEnvironment(appId, env, auditSource, callback) { addTask(appId, exports.ISTATE_PENDING_RECREATE_CONTAINER, task, function (error, result) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, env: env, taskId: result.taskId }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, env, taskId: result.taskId }); callback(null, { taskId: result.taskId }); }); @@ -1024,7 +1024,7 @@ function setDebugMode(appId, debugMode, auditSource, callback) { addTask(appId, exports.ISTATE_PENDING_DEBUG, task, function (error, result) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, debugMode: debugMode, taskId: result.taskId }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, debugMode, taskId: result.taskId }); callback(null, { taskId: result.taskId }); }); @@ -1061,7 +1061,7 @@ function setMailbox(appId, mailboxName, mailboxDomain, auditSource, callback) { addTask(appId, exports.ISTATE_PENDING_RECREATE_CONTAINER, task, function (error, result) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, mailboxName: mailboxName, taskId: result.taskId }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, mailboxName, taskId: result.taskId }); callback(null, { taskId: result.taskId }); }); @@ -1081,7 +1081,7 @@ function setAutomaticBackup(appId, enable, auditSource, callback) { appdb.update(appId, { enableBackup: enable }, function (error) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, enableBackup: enable }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, enableBackup: enable }); callback(); }); @@ -1100,7 +1100,7 @@ function setAutomaticUpdate(appId, enable, auditSource, callback) { appdb.update(appId, { enableAutomaticUpdate: enable }, function (error) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, enableAutomaticUpdate: enable }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, enableAutomaticUpdate: enable }); callback(); }); @@ -1158,7 +1158,7 @@ function setCertificate(appId, bundle, auditSource, callback) { error = reverseProxy.setAppCertificateSync(app.location, domainObject, { cert: bundle.cert, key: bundle.key }); if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, cert: bundle.cert, key: bundle.key }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, cert: bundle.cert, key: bundle.key }); callback(); }); @@ -1248,7 +1248,7 @@ function setDataDir(appId, dataDir, auditSource, callback) { addTask(appId, exports.ISTATE_PENDING_DATA_DIR_MIGRATION, task, function (error, result) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, newDataDir: dataDir, taskId: result.taskId }); + eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, dataDir, taskId: result.taskId }); callback(null, { taskId: result.taskId }); }); @@ -1437,7 +1437,7 @@ function repair(appId, data, auditSource, callback) { addTask(appId, errorState, task, function (error, result) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_REPAIR, auditSource, { taskId: result.taskId, app }); + eventlog.add(eventlog.ACTION_APP_REPAIR, auditSource, { app, taskId: result.taskId }); callback(null, { taskId: result.taskId }); }); @@ -1671,7 +1671,7 @@ function uninstall(appId, auditSource, callback) { addTask(appId, exports.ISTATE_PENDING_UNINSTALL, task, function (error, result) { if (error) return callback(error); - eventlog.add(eventlog.ACTION_APP_UNINSTALL, auditSource, { appId: appId, app: app, taskId: result.taskId }); + eventlog.add(eventlog.ACTION_APP_UNINSTALL, auditSource, { appId, app, taskId: result.taskId }); callback(null, { taskId: result.taskId }); });