ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-843 Added missing cleanup after remove all.
Date Thu, 04 Feb 2016 09:32:45 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 947af54b7 -> a39cdd0d8


IGNITE-843 Added missing cleanup after remove all.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a39cdd0d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a39cdd0d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a39cdd0d

Branch: refs/heads/ignite-843-rc2
Commit: a39cdd0d82c4185a11c0cf9c3fa920e23e1404b0
Parents: 947af54
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Thu Feb 4 16:32:51 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Thu Feb 4 16:32:51 2016 +0700

----------------------------------------------------------------------
 modules/control-center-web/src/main/js/routes/caches.js   | 8 +++++++-
 modules/control-center-web/src/main/js/routes/clusters.js | 8 +++++++-
 modules/control-center-web/src/main/js/routes/domains.js  | 5 ++++-
 modules/control-center-web/src/main/js/routes/igfs.js     | 5 ++++-
 4 files changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a39cdd0d/modules/control-center-web/src/main/js/routes/caches.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/caches.js b/modules/control-center-web/src/main/js/routes/caches.js
index e49a07f..0fda48e 100644
--- a/modules/control-center-web/src/main/js/routes/caches.js
+++ b/modules/control-center-web/src/main/js/routes/caches.js
@@ -167,7 +167,13 @@ router.post('/remove/all', function (req, res) {
                 if (err)
                     return res.status(500).send(err.message);
 
-                res.sendStatus(200);
+                db.Cluster.update({space: {$in: space_ids}}, {caches: []}, {multi: true},
function (err) {
+                    if (db.processed(err, res))
+                        db.DomainModel.update({space: {$in: space_ids}}, {caches: []}, {multi:
true}, function (err) {
+                            if (db.processed(err, res))
+                                res.sendStatus(200);
+                        });
+                });
             })
         }
     });

http://git-wip-us.apache.org/repos/asf/ignite/blob/a39cdd0d/modules/control-center-web/src/main/js/routes/clusters.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/clusters.js b/modules/control-center-web/src/main/js/routes/clusters.js
index ebb89bf..b29af37 100644
--- a/modules/control-center-web/src/main/js/routes/clusters.js
+++ b/modules/control-center-web/src/main/js/routes/clusters.js
@@ -152,7 +152,13 @@ router.post('/remove/all', function (req, res) {
                 if (err)
                     return res.status(500).send(err.message);
 
-                res.sendStatus(200);
+                db.Cache.update({space: {$in: space_ids}}, {clusters: []}, {multi: true},
function (err) {
+                    if (db.processed(err, res))
+                        db.Igfs.update({space: {$in: space_ids}}, {clusters: []}, {multi:
true}, function (err) {
+                            if (db.processed(err, res))
+                                res.sendStatus(200);
+                        });
+                });
             })
         }
     });

http://git-wip-us.apache.org/repos/asf/ignite/blob/a39cdd0d/modules/control-center-web/src/main/js/routes/domains.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/domains.js b/modules/control-center-web/src/main/js/routes/domains.js
index b709c2d..302cb59 100644
--- a/modules/control-center-web/src/main/js/routes/domains.js
+++ b/modules/control-center-web/src/main/js/routes/domains.js
@@ -234,7 +234,10 @@ router.post('/remove/all', function (req, res) {
                 if (err)
                     return res.status(500).send(err.message);
 
-                res.sendStatus(200);
+                db.Cache.update({space: {$in: space_ids}}, {domains: []}, {multi: true},
function (err) {
+                    if (db.processed(err, res))
+                        res.sendStatus(200);
+                });
             })
         }
     });

http://git-wip-us.apache.org/repos/asf/ignite/blob/a39cdd0d/modules/control-center-web/src/main/js/routes/igfs.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/igfs.js b/modules/control-center-web/src/main/js/routes/igfs.js
index ea33644..2fad048 100644
--- a/modules/control-center-web/src/main/js/routes/igfs.js
+++ b/modules/control-center-web/src/main/js/routes/igfs.js
@@ -131,7 +131,10 @@ router.post('/remove/all', function (req, res) {
                 if (err)
                     return res.status(500).send(err.message);
 
-                res.sendStatus(200);
+                db.Cluster.update({space: {$in: space_ids}}, {igfss: []}, {multi: true},
function (err) {
+                    if (db.processed(err, res))
+                        res.sendStatus(200);
+                });
             })
         }
     });


Mime
View raw message