ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject incubator-ignite git commit: # IGNITE-843 Minor.
Date Thu, 04 Jun 2015 07:05:24 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 a8fc57ea9 -> b12633220


# IGNITE-843 Minor.


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

Branch: refs/heads/ignite-843
Commit: b126332205dca41ef76eee4cc0f4263ad89393c4
Parents: a8fc57e
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Thu Jun 4 14:05:18 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Thu Jun 4 14:05:18 2015 +0700

----------------------------------------------------------------------
 .../webconfig/nodejs/public/javascripts/controllers/caches.js  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b1263322/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 556c6d6..bdd78d0 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
@@ -133,12 +133,12 @@ configuratorModule.controller('cachesController', ['$scope', '$http',
function($
         $scope.saveItem = function(item) {
             $http.post('/rest/caches/save', item)
                 .success(function() {
-                    var cache = $scope.caches.find(function(cache) {
+                    var i = _.findIndex($scope.caches, function(cache) {
                         return cache._id == item._id;
                     });
 
-                    if (cache)
-                        angular.extend(cache, item);
+                    if (i >= 0)
+                        angular.extend($scope.caches[i], item);
                 })
                 .error(function(errorMessage) {
                     console.log('Error: ' + errorMessage);


Mime
View raw message