-
Notifications
You must be signed in to change notification settings - Fork 103
Issue 6481 - UI - When ports that are in use are used to update a DS instance the error message is not helpful #6482
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
Conversation
…instance the error message is not helpful Bug description: When updating port values on a DS instance, if the port value is already in use the error message displayed by the UI is not helpful. Fix description: Add a UI method that checks if the updated port value is already in use. If it is, disable the save button. Fixes: 389ds#6481 Reviewed by:
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.
You need to move the validation code from the state change function to validateSaveBtn() function, otherwise the NumberInput will not have the validated prop set correctly.
Initially I had the validation code in the validateSaveBtn function, then if the user was say decrementing to a port value and came across a port that was in use the -- button was disabled and the user couldn't go any lower. So I thought a better way was to do the validation in minus/plus/change functions, set the errObj for ('nsslapd-port') as true if the port was in use, then check errObj in validateSaveBtn. Or am i missing something ? |
I think |
Ok, let me move the validation back to validateSaveBtn |
|
Almost there :-) This diff gets the NumberInput working as expected |
|
Sorry another issue... I also noticed that the "minus" buttons are disabled for port and secure port. That should be fixed as well. Thanks! |
The issue of the minus button being disabled existed before I started this work, I had a look at it yesterday and it seems the values of nsslapd-port and nsslapd-secureport are undefined at render time and only defined after loadConfig() is called in componentDidMount(). Let me have another look at it. |
Sorry I was not saying it was your fault, but might as well fix it while you are working on that code. |
Ye I knew you meant fix it while I was working on that area of code, thanks anyway though. I had a look around and found a few more disabled "minus" button issues, how about I create an issue for these and fix them all together ? Server Database |
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.
Yeah, since there are other places where the minus button is the same just open a new ticket then. Thanks, and ack!
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.
Looks good!
…instance the error message is not helpful (#6482) Bug description: When updating port values on a DS instance, if the port value is already in use the error message displayed by the UI is not helpful. Fix description: Add a UI method that checks if the updated port value is already in use. If it is, disable the save button. Fixes: #6481 Reviewed by: @mreynolds389, @droideck (Thank you)
…instance the error message is not helpful (#6482) Bug description: When updating port values on a DS instance, if the port value is already in use the error message displayed by the UI is not helpful. Fix description: Add a UI method that checks if the updated port value is already in use. If it is, disable the save button. Fixes: #6481 Reviewed by: @mreynolds389, @droideck (Thank you)
…instance the error message is not helpful (#6482) Bug description: When updating port values on a DS instance, if the port value is already in use the error message displayed by the UI is not helpful. Fix description: Add a UI method that checks if the updated port value is already in use. If it is, disable the save button. Fixes: #6481 Reviewed by: @mreynolds389, @droideck (Thank you)
…instance the error message is not helpful (#6482) Bug description: When updating port values on a DS instance, if the port value is already in use the error message displayed by the UI is not helpful. Fix description: Add a UI method that checks if the updated port value is already in use. If it is, disable the save button. Fixes: #6481 Reviewed by: @mreynolds389, @droideck (Thank you)
Bug description:
When updating port values on a DS instance, if the port value is already in use the error message displayed by the UI is not helpful.
Fix description:
Add a UI method that checks if the updated port value is already in use. If it is, disable the save button.
Fixes: #6481
Reviewed by: