Repository: ambari Updated Branches: refs/heads/trunk 53b163866 -> efddf553f
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/efddf553 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/efddf553 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/efddf553 Branch: refs/heads/trunk Commit: efddf553fb4aa0603fda3765ef8e3faa8c06d29a Parents: 53b1638 Author: Alex Antonenko <[email protected]> Authored: Thu Oct 23 18:54:01 2014 +0300 Committer: Alex Antonenko <[email protected]> Committed: Thu Oct 23 20:02:58 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/efddf553/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(); };
