Bug 1027290

Summary: [Usability] "Test connection" button is active for Disabled Datasource
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jakub Cechacek <jcechace>
Component: Web Console - UXAssignee: Catherine Robson <crobson>
Status: CLOSED EOL QA Contact: Pavel Jelinek <pjelinek>
Severity: medium Docs Contact: eap-docs <eap-docs>
Priority: unspecified    
Version: 6.2.0CC: brian.stansberry, crobson, hbraun, hpehl, jkudrnac, lclayton
Target Milestone: ---Keywords: Reopened
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Usability
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 12:46:09 UTC Type: Task
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
design_mockup
none
design mockup - relocated "test connection" button. none

Description Jakub Cechacek 2013-11-06 13:35:33 UTC
"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

Comment 1 Heiko Braun 2014-07-09 11:38:09 UTC
In agreement with Catherine we've decided that UX issues will be tracked separately.

Comment 2 Jakub Cechacek 2014-07-21 06:21:34 UTC
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.

Comment 3 Liz 2014-09-05 14:23:53 UTC
Created attachment 934817 [details]
design_mockup

Design proposal: Modify the dialog text, and add an action to enable and test the connection. Mockup attached.

Comment 4 Brian Stansberry 2014-09-05 14:27:47 UTC
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.

Comment 6 Brian Stansberry 2014-09-05 15:25:57 UTC
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:

Name: Foo
JNDI Name: java:jboss/datasources/Foo

Click Next

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
Username: sa
Password: sa

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.

Comment 7 Liz 2014-09-08 15:51:27 UTC
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?
[Cancel][Confirm]
-----------------------------
- 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.

Comment 8 Liz 2014-09-08 15:53:35 UTC
Created attachment 935401 [details]
design mockup - relocated "test connection" button.