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 Fixed dirty check logic.
Date Wed, 23 Sep 2015 07:11:32 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 d6cacf230 -> 469b4bb7f


IGNITE-843 Fixed dirty check logic.


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

Branch: refs/heads/ignite-843
Commit: 469b4bb7fef7c3584cc21d4fdda5ae01e481ac03
Parents: d6cacf2
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Wed Sep 23 14:11:33 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Wed Sep 23 14:11:33 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/caches-controller.js             | 8 ++++----
 .../src/main/js/controllers/clusters-controller.js           | 8 ++++----
 .../src/main/js/controllers/common-module.js                 | 3 +++
 .../src/main/js/controllers/metadata-controller.js           | 2 +-
 4 files changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/469b4bb7/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 06b01f6..d1b487a 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
@@ -352,7 +352,7 @@ controlCenterModule.controller('cachesController', [
                 function selectItem() {
                     $table.tableReset();
 
-                    $scope.selectedItem = item;
+                    $scope.selectedItem = angular.copy(item);
 
                     if (item)
                         sessionStorage.lastSelectedCache = angular.toJson(item._id);
@@ -471,14 +471,14 @@ controlCenterModule.controller('cachesController', [
                         });
 
                         if (idx >= 0)
-                            angular.extend($scope.caches[idx], item);
+                            $scope.caches[idx] = item;
                         else {
                             item._id = _id;
-
                             $scope.caches.push(item);
-                            $scope.selectItem(item);
                         }
 
+                        $scope.selectItem(item);
+
                         $common.showInfo('Cache "' + item.name + '" saved.');
                     })
                     .error(function (errMsg) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/469b4bb7/modules/control-center-web/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/clusters-controller.js b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index 3ae80f6..2289058 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -275,7 +275,7 @@ controlCenterModule.controller('clustersController', [
             function selectItem() {
                 $table.tableReset();
 
-                $scope.selectedItem = item;
+                $scope.selectedItem = angular.copy(item);
 
                 if (item && item._id)
                     sessionStorage.lastSelectedCluster = angular.toJson(item._id);
@@ -393,14 +393,14 @@ controlCenterModule.controller('clustersController', [
                     });
 
                     if (idx >= 0)
-                        angular.extend($scope.clusters[idx], item);
+                        $scope.clusters[idx] = item;
                     else {
                         item._id = _id;
-
                         $scope.clusters.push(item);
-                        $scope.selectItem(item);
                     }
 
+                    $scope.selectItem(item);
+
                     $common.showInfo('Cluster "' + item.name + '" saved.');
                 })
                 .error(function (errMsg) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/469b4bb7/modules/control-center-web/src/main/js/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/common-module.js b/modules/control-center-web/src/main/js/controllers/common-module.js
index fab158c..db7866d 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -552,6 +552,9 @@ controlCenterModule.service('$common', [
                 var curValue = curModel[field.model];
                 var srcValue = srcModel[field.model];
 
+                if (typeof(curValue) == 'string' && (curValue.length == 0) &&
(srcValue === undefined))
+                    curValue = undefined;
+
                 var isCur = isDefined(curValue);
                 var isSrc = isDefined(srcValue);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/469b4bb7/modules/control-center-web/src/main/js/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/metadata-controller.js b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index 4c6d3e1..77785c8 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -679,7 +679,7 @@ controlCenterModule.controller('metadataController', [
                 function selectItem() {
                     $table.tableReset();
 
-                    $scope.selectedItem = item;
+                    $scope.selectedItem = angular.copy(item);
 
                     if (item && item._id)
                         sessionStorage.lastSelectedMetadata = angular.toJson(item._id);


Mime
View raw message