re #1135 #1108 Fix for bug with saving API gateway in UI #466
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue(s):
JIRA 1: https://issues.jboss.org/browse/APIMAN-1135
JIRA 2: https://issues.jboss.org/browse/APIMAN-1108
There were two bugs occurring:
Changes:
pluck
method was deprecated, switched to usemap
instead.cc @EricWittmann @msavy
Notes:
Currently, users are allowed to create the API, define the endpoint, etc. without having a gateway configured. They can go back, add the gateway, and continue configuring the API before publishing it. They can also "trick" the application so that if they unselect all gateways (if they have multiple) and then make the endpoint field "dirty", the save button will become enabled. So, if you were to press save and go back, it will just have the dropdown selection as 'Nothing selected'. They can then select whatever gateway they want. Spoke with @EricWittmann and this should be fine for now, but we can reevaluate this behavior at a later time. This is shown in the screenshots below.
Screenshots:
Screencast: https://drive.google.com/open?id=0B9yOpcUD9qIaelhiaWFpMGNtOEU
The screenshots are not as illustrative as the screencast, so I'd recommend watching that instead.
User deselects both gateways configured, presses save, navigates away and then comes back to the Implementations tab:
Showing that we have more than one gateway, and that selecting one now enables the save button without having to "dirty" the endpoint field:
We have now saved one of our configured gateways, and this value is retained when navigating between tabs: