Red Hat Bugzilla – Bug 1027290
[Usability] "Test connection" button is active for Disabled Datasource
Last modified: 2017-10-09 20:10:27 EDT
"Test connection" button (Profile - Connector - Datasources - Connection) should be disabled when the selected datasource is disabled.
How to reproduce:
1) navigate to datasources page
2) select and disable ExampleDS
3) switch to "connection" tab
4) click the "Test Connection" button
expected result: button is disabled
actual result: error message
In agreement with Catherine we've decided that UX issues will be tracked separately.
Issue moved under the UX component.
Also moved to 6.4 as this issue is still valid for 6.3. Use ack flags to decide whether we want to go through with it or not.
Created attachment 934817 [details]
Design proposal: Modify the dialog text, and add an action to enable and test the connection. Mockup attached.
Is removing this the correct behavior? The button is also there in the wizard when you add a datasource, and at that point the datasource isn't enabled. But it still tests what you've configured.
Maybe having the button in the wizard is wrong as well. But having the rules be inconsistent between the wizard and when the DS is just disabled seems wrong.
Sorry; I shouldn't have used the word "removed" as the proposal isn't to remove, it's to alter the behavior of the button.
To see what I mean, do the following:
1) Go into the Datasources tab
2) Hit the Add button to start the wizard
3) First screen of the wizard:
JNDI Name: java:jboss/datasources/Foo
4) Second screen, select driver h2 and hit Next
5) Third screen
Connection URL: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
Don't click Done. Instead click the "Test Connection" button. It tests the connection.
6) Click Done.
Note that Foo datasource now appears in the table but is disabled. Enabling it is a separate step.
So, during add, the Test Connection button can test the datasource even though it is disabled. Behind the scenes it enables the DS, does the test, and then disables it again.
My point here is that we have two different locations for a Test Connection button; the one Liz has addressed in her mockup and this one in the "Add" wizard. The behavior of these two should be consistent.
The proposed action for the dialog is to enable the datasource and test the connection in the background, so it is starting to bring the behaviors closer together. The only difference is that the design proposal suggests leaving the datasource enabled, whereas the Add wizard returns it to a disabled state.
* To get to a closer match - the alert dialog action could also return the Datasource to a disabled state, along with tweaking the message text a bit (to let the user know what's happening). For example:
[(i) The datasource must be enabled to test the connection.]
Temporarily enable the datasource and test the datasource?
- I also wonder if the “Test Connection” button (on the page) should be moved? Instead of having it above the table, how about below the fields and within the table, I attached a mockup. This could help make the experiences more consistent as well. Please see the attached mockup.
Created attachment 935401 [details]
design mockup - relocated "test connection" button.