Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A7DFE18C7F for ; Wed, 28 Oct 2015 02:55:55 +0000 (UTC) Received: (qmail 31983 invoked by uid 500); 28 Oct 2015 02:55:55 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 31954 invoked by uid 500); 28 Oct 2015 02:55:55 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 31945 invoked by uid 99); 28 Oct 2015 02:55:55 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2015 02:55:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7675BDFF30; Wed, 28 Oct 2015 02:55:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: akuznetsov@apache.org To: commits@ignite.apache.org Message-Id: <960c8832f35949c7b957c8b2bcf634cc@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ignite git commit: IGNITE-1715 Reset button. Date: Wed, 28 Oct 2015 02:55:55 +0000 (UTC) Repository: ignite Updated Branches: refs/heads/ignite-843-rc1 d8fc3990d -> 0d8c5e311 IGNITE-1715 Reset button. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0d8c5e31 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0d8c5e31 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0d8c5e31 Branch: refs/heads/ignite-843-rc1 Commit: 0d8c5e311defc826752cd7f8719651cf6c16b26d Parents: d8fc399 Author: vsisko Authored: Wed Oct 28 09:55:59 2015 +0700 Committer: Alexey Kuznetsov Committed: Wed Oct 28 09:55:59 2015 +0700 ---------------------------------------------------------------------- .../src/main/js/controllers/caches-controller.js | 11 ++++------- .../src/main/js/controllers/clusters-controller.js | 11 ++++------- .../src/main/js/controllers/igfs-controller.js | 11 ++++------- .../src/main/js/controllers/metadata-controller.js | 7 ++++--- 4 files changed, 16 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/0d8c5e31/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 922897e..57dfe3a 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 @@ -594,13 +594,10 @@ consoleModule.controller('cachesController', [ }; $scope.resetAll = function() { - _.forEach($scope.general, function(group) { - $scope.resetItem(group.group); - }); - - _.forEach($scope.advanced, function(group) { - $scope.resetItem(group.group); - }); + $confirm.confirm('Are you sure you want to reset current cache?') + .then(function() { + $scope.backupItem = $scope.selectedItem ? angular.copy($scope.selectedItem) : prepareNewItem(); + }); }; }] ); http://git-wip-us.apache.org/repos/asf/ignite/blob/0d8c5e31/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 ab6d5fa..50320d6 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 @@ -590,13 +590,10 @@ consoleModule.controller('clustersController', [ }; $scope.resetAll = function() { - _.forEach($scope.general, function(group) { - $scope.resetItem(group.group); - }); - - _.forEach($scope.advanced, function(group) { - $scope.resetItem(group.group); - }); + $confirm.confirm('Are you sure you want to reset current cluster?') + .then(function() { + $scope.backupItem = $scope.selectedItem ? angular.copy($scope.selectedItem) : prepareNewItem(); + }); }; }] ); http://git-wip-us.apache.org/repos/asf/ignite/blob/0d8c5e31/modules/control-center-web/src/main/js/controllers/igfs-controller.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/controllers/igfs-controller.js b/modules/control-center-web/src/main/js/controllers/igfs-controller.js index cea6640..b57fb28 100644 --- a/modules/control-center-web/src/main/js/controllers/igfs-controller.js +++ b/modules/control-center-web/src/main/js/controllers/igfs-controller.js @@ -383,13 +383,10 @@ consoleModule.controller('igfsController', [ }; $scope.resetAll = function() { - _.forEach($scope.general, function(group) { - $scope.resetItem(group.group); - }); - - _.forEach($scope.advanced, function(group) { - $scope.resetItem(group.group); - }); + $confirm.confirm('Are you sure you want to reset current IGFS?') + .then(function() { + $scope.backupItem = $scope.selectedItem ? angular.copy($scope.selectedItem) : prepareNewItem(); + }); }; }] ); http://git-wip-us.apache.org/repos/asf/ignite/blob/0d8c5e31/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 ccab1ea..9a70c1d 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 @@ -1296,9 +1296,10 @@ consoleModule.controller('metadataController', [ }; $scope.resetAll = function() { - _.forEach($scope.metadata, function(group) { - $scope.resetItem(group.group); - }); + $confirm.confirm('Are you sure you want to reset current metadata?') + .then(function() { + $scope.backupItem = $scope.selectedItem ? angular.copy($scope.selectedItem) : prepareNewItem(); + }); }; }] );