You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/07/15 21:17:08 UTC

[20/45] incubator-ignite git commit: IGNITE-843 Fixed broken indexed types save.

IGNITE-843 Fixed broken indexed types save.


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

Branch: refs/heads/ignite-1121
Commit: 27c33697057a778c4fe93b18b8fd97def54315ab
Parents: c1eb007
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Jul 14 17:53:15 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Jul 14 17:53:15 2015 +0700

----------------------------------------------------------------------
 .../nodejs/controllers/caches-controller.js     | 42 ++++++++++++++++++++
 .../nodejs/controllers/metadata-controller.js   | 42 --------------------
 2 files changed, 42 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/27c33697/modules/web-control-center/nodejs/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/caches-controller.js b/modules/web-control-center/nodejs/controllers/caches-controller.js
index 8fdbc70..4564596 100644
--- a/modules/web-control-center/nodejs/controllers/caches-controller.js
+++ b/modules/web-control-center/nodejs/controllers/caches-controller.js
@@ -212,5 +212,47 @@ controlCenterModule.controller('cachesController', ['$scope', '$http', 'commonFu
                     commonFunctions.showError(errMsg);
                 });
         };
+
+        $scope.checkIndexedTypes = function (keyCls, valCls) {
+            if (!keyCls) {
+                commonFunctions.showError('Key class name should be non empty!');
+
+                return false;
+            }
+
+            if (!valCls) {
+                commonFunctions.showError('Value class name should be non empty!');
+
+                return false;
+            }
+
+            return true;
+        };
+
+        $scope.addIndexedTypes = function (keyCls, valCls) {
+            if (!$scope.checkIndexedTypes(keyCls, valCls))
+                return;
+
+            var idxTypes = $scope.backupItem.indexedTypes;
+
+            var newItem = {keyClass: keyCls, valueClass: valCls};
+
+            if (idxTypes)
+                idxTypes.push(newItem);
+            else
+                $scope.backupItem.indexedTypes = [newItem];
+        };
+
+        $scope.saveIndexedType = function (idx, keyCls, valCls) {
+            if (!$scope.checkIndexedTypes(keyCls, valCls))
+                return idx;
+
+            var idxType = $scope.backupItem.indexedTypes[idx];
+
+            idxType.keyClass = keyCls;
+            idxType.valueClass = valCls;
+
+            return -1;
+        };
     }]
 );
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/27c33697/modules/web-control-center/nodejs/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/metadata-controller.js b/modules/web-control-center/nodejs/controllers/metadata-controller.js
index c8a923c..a826e04 100644
--- a/modules/web-control-center/nodejs/controllers/metadata-controller.js
+++ b/modules/web-control-center/nodejs/controllers/metadata-controller.js
@@ -134,47 +134,5 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', 'common
                     commonFunctions.showError(errMsg);
                 });
         };
-
-        $scope.checkIndexedTypes = function (keyCls, valCls) {
-            if (!keyCls) {
-                commonFunctions.showError('Key class name should be non empty!');
-
-                return false;
-            }
-
-            if (!valCls) {
-                commonFunctions.showError('Value class name should be non empty!');
-
-                return false;
-            }
-
-            return true;
-        };
-
-        $scope.addIndexedTypes = function (keyCls, valCls) {
-            if (!$scope.checkIndexedTypes(keyCls, valCls))
-                return;
-
-            var idxTypes = $scope.backupItem.indexedTypes;
-
-            var newItem = {keyClass: keyCls, valueClass: valCls};
-
-            if (idxTypes)
-                idxTypes.push(newItem);
-            else
-                $scope.backupItem.indexedTypes = [newItem];
-        };
-
-        $scope.saveIndexedType = function (idx, keyCls, valCls) {
-            if (!$scope.checkIndexedTypes(keyCls, valCls))
-                return idx;
-
-            var idxType = $scope.backupItem.indexedTypes[idx];
-
-            idxType.keyClass = keyCls;
-            idxType.valueClass = valCls;
-
-            return -1;
-        };
     }]
 );
\ No newline at end of file