Repository: ignite Updated Branches: refs/heads/ignite-843-rc2 87f3c808c -> 4d75119c4
IGNITE-843 WIP Rework server side to Promises. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4d75119c Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4d75119c Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4d75119c Branch: refs/heads/ignite-843-rc2 Commit: 4d75119c4f8480d203bf7645d377999aa39c5371 Parents: 87f3c80 Author: Alexey Kuznetsov <[email protected]> Authored: Tue Feb 16 14:25:03 2016 +0700 Committer: Alexey Kuznetsov <[email protected]> Committed: Tue Feb 16 14:25:03 2016 +0700 ---------------------------------------------------------------------- modules/control-center-web/src/main/js/serve/routes/caches.js | 4 ++-- modules/control-center-web/src/main/js/serve/routes/igfs.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/4d75119c/modules/control-center-web/src/main/js/serve/routes/caches.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/serve/routes/caches.js b/modules/control-center-web/src/main/js/serve/routes/caches.js index 69a37e2..aa57c4e 100644 --- a/modules/control-center-web/src/main/js/serve/routes/caches.js +++ b/modules/control-center-web/src/main/js/serve/routes/caches.js @@ -125,9 +125,9 @@ module.exports.factory = function(_, express, mongo) { .then((spaces) => { spacesIds = mongo.spacesIds(spaces); - return mongo.Cluster.update({space: {$in: spacesIds}}, {caches: []}, {multi: true}); + return mongo.Cluster.update({space: {$in: spacesIds}}, {caches: []}, {multi: true}).exec(); }) - .then(() => mongo.DomainModel.update({space: {$in: spacesIds}}, {caches: []}, {multi: true})) + .then(() => mongo.DomainModel.update({space: {$in: spacesIds}}, {caches: []}, {multi: true}).exec()) .then(() => mongo.Cache.remove({space: {$in: spacesIds}})) .catch((err) => mongo.handleError(res, err)); }); http://git-wip-us.apache.org/repos/asf/ignite/blob/4d75119c/modules/control-center-web/src/main/js/serve/routes/igfs.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/serve/routes/igfs.js b/modules/control-center-web/src/main/js/serve/routes/igfs.js index c44620d..144a577 100644 --- a/modules/control-center-web/src/main/js/serve/routes/igfs.js +++ b/modules/control-center-web/src/main/js/serve/routes/igfs.js @@ -85,7 +85,7 @@ module.exports.factory = function(_, express, mongo) { .then((igfs) => { igfsId = igfs._id; - return mongo.Cluster.update({_id: {$in: clusters}}, {$addToSet: {igfss: igfsId}}, {multi: true}); + return mongo.Cluster.update({_id: {$in: clusters}}, {$addToSet: {igfss: igfsId}}, {multi: true}).exec(); }) .then(() => res.send(igfsId)) .catch((err) => mongo.handleError(res, err)); @@ -116,9 +116,9 @@ module.exports.factory = function(_, express, mongo) { .then((spaces) => { spacesIds = mongo.spacesIds(spaces); - return mongo.Igfs.remove({space: {$in: spacesIds}}); + return mongo.Cluster.update({space: {$in: spacesIds}}, {igfss: []}, {multi: true}).exec(); }) - .then(() => mongo.Cluster.update({space: {$in: spacesIds}}, {igfss: []}, {multi: true})) + .then(() => mongo.Igfs.remove({space: {$in: spacesIds}})) .then(() => res.sendStatus(200)) .catch((err) => mongo.handleError(res, err)); });
