ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [3/3] ignite git commit: IGNITE-843 Do not call metadata watch listener on first select.
Date Thu, 10 Dec 2015 06:31:26 GMT
IGNITE-843 Do not call metadata watch listener on first select.


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

Branch: refs/heads/ignite-843-rc2
Commit: 6130b8a162e185e113bcd2cc1a582a083f38f40f
Parents: 4a3df84
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Thu Dec 10 13:32:07 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Thu Dec 10 13:32:07 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/caches-controller.js               | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6130b8a1/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 46a5339..eb1c9df 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -25,6 +25,7 @@ consoleModule.controller('cachesController', [
             angular.extend(this, $controller('save-remove', {$scope: $scope}));
 
             $scope.ui = $common.formUI();
+            $scope.selectedItemWatchGuard = false;
 
             $scope.joinTip = $common.joinTip;
             $scope.getModel = $common.getModel;
@@ -336,7 +337,9 @@ consoleModule.controller('cachesController', [
                             }, true);
 
                             $scope.$watchCollection('backupItem.metadatas', function (val,
old) {
-                                if (!angular.equals(val, old)) {
+                                if ($scope.selectedItemWatchGuard)
+                                    $scope.selectedItemWatchGuard = false;
+                                else {
                                     var item = $scope.backupItem;
 
                                     var cacheStoreFactory = $common.isDefined(item) &&
@@ -376,6 +379,7 @@ consoleModule.controller('cachesController', [
                 function selectItem() {
                     $table.tableReset();
 
+                    $scope.selectedItemWatchGuard = true;
                     $scope.selectedItem = angular.copy(item);
 
                     try {


Mime
View raw message