You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/06/26 13:09:25 UTC

[2/2] incubator-ignite git commit: # IGNITE-843 Wip on validation.

# IGNITE-843 Wip on validation.


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

Branch: refs/heads/ignite-843
Commit: 2bbaa6821bdd4023ba05a62a64062d4ba7ff7ec4
Parents: caba05f
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jun 26 18:09:20 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jun 26 18:09:20 2015 +0700

----------------------------------------------------------------------
 .../nodejs/public/javascripts/controllers/caches.js     | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2bbaa682/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/caches.js b/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
index 705ca90..9815887 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
@@ -126,6 +126,18 @@ configuratorModule.controller('cachesController', ['$scope', '$alert', '$http',
         $scope.saveItem = function () {
             var item = $scope.backupItem;
 
+            if (item.cacheStoreFactory && !item.readThrough && !item.writeThrough) {
+                $alert({position: 'top', title: 'Store is configured but read/write through are not enabled!'});
+
+                return;
+            }
+
+            if ((item.readThrough || item.writeThrough) && (!item.cacheStoreFactory || !item.cacheStoreFactory.kind)) {
+                $alert({position: 'top', title: 'Read / write through are enabled but strore is not configured!'});
+
+                return;
+            }
+
             $http.post('/rest/caches/save', item)
                 .success(function (_id) {
                     var idx = _.findIndex($scope.caches, function (cache) {