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 Refactored metadata: use value type instead of name.
Date Thu, 10 Sep 2015 12:07:16 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 d6dce4a59 -> 118839913


IGNITE-843 Refactored metadata: use value type instead of name.


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

Branch: refs/heads/ignite-843
Commit: 11883991320a632aebb6793077da050edb294230
Parents: d6dce4a
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Thu Sep 10 19:07:08 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Thu Sep 10 19:07:08 2015 +0700

----------------------------------------------------------------------
 modules/control-center-web/src/main/js/routes/metadata.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/11883991/modules/control-center-web/src/main/js/routes/metadata.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/metadata.js b/modules/control-center-web/src/main/js/routes/metadata.js
index eb8c09c..2961147 100644
--- a/modules/control-center-web/src/main/js/routes/metadata.js
+++ b/modules/control-center-web/src/main/js/routes/metadata.js
@@ -53,7 +53,7 @@ router.post('/list', function (req, res) {
             db.Cache.find({space: {$in: space_ids}}).sort('name').exec(function (err, caches)
{
                 if (db.processed(err, res)) {
                     // Get all metadata for spaces.
-                    db.CacheTypeMetadata.find({space: {$in: space_ids}}).sort('name').exec(function
(err, metadatas) {
+                    db.CacheTypeMetadata.find({space: {$in: space_ids}}).sort('valueType').exec(function
(err, metadatas) {
                         if (db.processed(err, res)) {
                             // Remove deleted caches.
                             _.forEach(metadatas, function (meta) {
@@ -99,10 +99,10 @@ router.post('/save', function (req, res) {
                 });
         });
     else {
-        db.CacheTypeMetadata.findOne({space: req.body.space, name: req.body.name}, function
(err, metadata) {
+        db.CacheTypeMetadata.findOne({space: req.body.space, valueType: req.body.valueType},
function (err, metadata) {
             if (db.processed(err, res)) {
                 if (metadata)
-                    return res.status(500).send('Cache type metadata with name: "' + metadata.name
+ '" already exist.');
+                    return res.status(500).send('Cache type metadata with value type: "'
+ metadata.valueType + '" already exist.');
 
                 (new db.CacheTypeMetadata(req.body)).save(function (err, metadata) {
                     if (db.processed(err, res)) {


Mime
View raw message