Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 155672eba -> d5179c136


AMBARI-7926. ADMIN VIEW old values after cancel editing configurations 
(alexantonenko)


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

Branch: refs/heads/branch-1.7.0
Commit: d5179c136e77bda77e2f01b42cc5b0e96a59c911
Parents: 155672e
Author: Alex Antonenko <[email protected]>
Authored: Thu Oct 23 18:51:44 2014 +0300
Committer: Alex Antonenko <[email protected]>
Committed: Thu Oct 23 20:05:02 2014 +0300

----------------------------------------------------------------------
 .../app/scripts/controllers/ambariViews/ViewsEditCtrl.js          | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d5179c13/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
----------------------------------------------------------------------
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
index cbd235c..12ef1d3 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
@@ -119,6 +119,7 @@ angular.module('ambariAdminConsole')
   $scope.editConfigurationDisabled = true;
   $scope.togglePropertiesEditing = function () {
     $scope.editConfigurationDisabled = !$scope.editConfigurationDisabled;
+    $scope.configurationBeforeEdit = angular.copy($scope.configuration);
     if (!$scope.editConfigurationDisabled) {
       $scope.configurationMeta.forEach(function (element) {
         if (element.masked) {
@@ -144,7 +145,7 @@ angular.module('ambariAdminConsole')
     }
   };
   $scope.cancelConfiguration = function() {
-    initConfigurations();
+    $scope.configuration = angular.copy($scope.configurationBeforeEdit);
     $scope.editConfigurationDisabled = true;
     $scope.propertiesForm.$setPristine();
   };

Reply via email to