Issue 6481 - UI - When ports that are in use are used to update a DS instance the error message is not helpful - #6482
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:
mreynolds389
left a comment
There was a problem hiding this comment.
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 |
mreynolds389
left a comment
There was a problem hiding this comment.
Yeah, since there are other places where the minus button is the same just open a new ticket then. Thanks, and ack!
…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: