ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [2/2] ignite git commit: IGNITE-843 Added validation for readStripesNumber as power of two.
Date Fri, 12 Feb 2016 11:04:55 GMT
IGNITE-843 Added validation for readStripesNumber as power of two.


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

Branch: refs/heads/ignite-843-rc3
Commit: 3eb0be4c0f705d3cf9b354321904bca078667588
Parents: 49b4b9a
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Fri Feb 12 18:00:52 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Feb 12 18:00:52 2016 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/clusters-controller.js          | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb0be4c/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 7681a6e..f07c91d 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
@@ -369,10 +369,17 @@ consoleModule.controller('clustersController', function ($http, $timeout,
$scope
             var swapKind = item.swapSpaceSpi && item.swapSpaceSpi.kind;
 
             if (swapKind && item.swapSpaceSpi[swapKind]) {
-                var sparsity = item.swapSpaceSpi[swapKind].maximumSparsity;
+                var swap = item.swapSpaceSpi[swapKind];
+
+                var sparsity = swap.maximumSparsity;
 
                 if ($common.isDefined(sparsity) && (sparsity < 0 || sparsity >=
1))
                     return showPopoverMessage($scope.ui, 'swap', 'maximumSparsity', 'Maximum
sparsity should be more or equal 0 and less than 1');
+
+                var readStripesNumber = swap.readStripesNumber;
+
+                if (readStripesNumber && !(readStripesNumber == -1 || (readStripesNumber
& (readStripesNumber - 1)) == 0))
+                    return showPopoverMessage($scope.ui, 'swap', 'readStripesNumber', 'Read
stripe size must be positive and power of two');
             }
 
             if (item.sslEnabled) {


Mime
View raw message