Bug 1349975

Summary: [RFE] UI: Clean up credentials validation in the Provider forms
Product: Red Hat CloudForms Management Engine Reporter: Dan Clarizio <dclarizi>
Component: UI - OPSAssignee: Aparna Karve <akarve>
Status: CLOSED ERRATA QA Contact: Matouš Mojžíš <mmojzis>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6.0CC: cpelland, hkataria, jhardy, jprause, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: FutureFeature, ZStream
Target Release: 5.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.7.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1349991 (view as bug list) Environment:
Last Closed: 2017-01-04 12:56:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1349991    

Description Dan Clarizio 2016-06-24 17:40:27 UTC
Description of problem:
The Provider forms were not enforcing that credentials were valid prior to saving.

Version-Release number of selected component (if applicable):
5.6.0

Planned changes:
Results of a chat discussion seem to be that we should not allow Save button to enable until all required form fields are entered and all end point credentials have been validated. So:

* On each end point tab, if validation is needed, show the tab in red (or somehow indicate the tab needs attention) and display a red message inside the tab area stating "Validation required".

* If relevant form fields (i.e. IP, Host Name, Port, credentials, etc) are changed on the form, this invalidates any validations that have been done, the tabs turn red again with validation required message, and Save is disabled.

* Pressing Validate on an end point tab may take longer due to network/timeout issues, but at least this would be expected, rather than overloading Save to do the validation.

* Save is only enabled if all form fields are valid and all entered credentials have been validated, so pressing Save only has to save the record. Refresh workers should then be able to start successfully.

Comment 4 CFME Bot 2016-07-11 20:07:05 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/273b9a060a446aaa12c14997b4d1fead34bab5dc

commit 273b9a060a446aaa12c14997b4d1fead34bab5dc
Author:     Aparna Karve <akarve>
AuthorDate: Thu Jul 7 16:47:09 2016 -0700
Commit:     Aparna Karve <akarve>
CommitDate: Thu Jul 7 16:49:20 2016 -0700

    For hawkular and metrics skip revalidation under certain conditions
    
    For e.g. - A condition where hostname is blank and api_port changes
    https://bugzilla.redhat.com/show_bug.cgi?id=1349975

 .../ems_common/ems_common_form_controller.js       |  5 +++++
 .../validation/reset_validation_status.js          |  7 ++++++-
 .../angular-bootstrap/_endpoints_angular.html.haml | 23 +++++++++++-----------
 3 files changed, 23 insertions(+), 12 deletions(-)

Comment 6 Matouš Mojžíš 2016-12-12 17:03:37 UTC
Verified in 5.7.0.14. When I change something in the endpoint tab I have to revalidate and when there are required fileds empty they are marked red.

Comment 8 errata-xmlrpc 2017-01-04 12:56:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0012.html