-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix validation to parse partitions as ints first #2512
Conversation
Signed-off-by: Aindriu Lavelle <[email protected]>
@@ -705,6 +705,11 @@ app.controller("envsCtrl", function($scope, $http, $location, $window) { | |||
|
|||
$scope.addNewEnv = function() { | |||
|
|||
var defRepFactor = parseInt($scope.addNewEnv.defrepfctr,10) | |||
var maxRepFactor = parseInt($scope.addNewEnv.maxrepfctr,10) | |||
var defPartitionFactor = parseInt($scope.addNewEnv.defparts,10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var defPartitionFactor = parseInt($scope.addNewEnv.defparts,10) | |
var defPartitions = parseInt($scope.addNewEnv.defparts,10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well that was a silly mistake to make gimme two minutes and I'll fix it
var defRepFactor = parseInt($scope.addNewEnv.defrepfctr,10) | ||
var maxRepFactor = parseInt($scope.addNewEnv.maxrepfctr,10) | ||
var defPartitionFactor = parseInt($scope.addNewEnv.defparts,10) | ||
var maxPartitionFactor = parseInt($scope.addNewEnv.defmaxparts,10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var maxPartitionFactor = parseInt($scope.addNewEnv.defmaxparts,10) | |
var maxPartitions = parseInt($scope.addNewEnv.defmaxparts,10) |
Signed-off-by: Aindriu Lavelle <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx
Linked issue
Resolves: #2508
What kind of change does this PR introduce?
What is the current behavior?
Strings are compared to each other for default and max paritions and replication
What is the new behavior?
Strings are parsed to ints then compared to each other for default and max paritions and replication
Other information
Additional changes, explanations of the approach taken, unresolved issues, necessary follow ups, etc.
Requirements (all must be checked before review)
main
branch have been pulledpnpm lint
has been run successfully