Bug 1609735 - VMRC credentials validation always successful when hitting enter
Summary: VMRC credentials validation always successful when hitting enter
Keywords:
Status: ON_QA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.0
Assignee: Aparna Karve
QA Contact: Jad Haj Yahya
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-30 10:24 UTC by Antonin Pagac
Modified: 2023-05-31 23:33 UTC (History)
9 users (show)

Fixed In Version: 5.10.0.22
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
success with bad creds (118.67 KB, image/png)
2018-07-30 10:24 UTC, Antonin Pagac
no flags Details
reproduced with 5.10.0.18 (176.92 KB, image/png)
2018-10-08 10:21 UTC, Antonin Pagac
no flags Details
Validation not successful with random creds for vmrc (171.65 KB, image/png)
2018-10-08 14:59 UTC, Aparna Karve
no flags Details

Description Antonin Pagac 2018-07-30 10:24:45 UTC
Created attachment 1471487 [details]
success with bad creds

Description of problem:
When adding VMRC credentials to vmware infrastructure provider and hitting enter instead of using the Validate button, the validation is always successful. The Save button however is not enabled and I can't save the provider with wrong VMRC credentials.

The Validate button works fine and enables me to save the provider with correct VMRC credentials.

Version-Release number of selected component (if applicable):
5.10.0.6
occurs also in 5.9.4

How reproducible:
Always

Steps to Reproduce:
1. Have infrastructure provider added, choose to edit the provider
2. In the Endpoints section, choose VMRC Console
3. Input random username and password, hit enter
4. Success message appears, see screenshot

Actual results:
Success message appears

Expected results:
Error message should appear

Additional info:

Comment 5 Antonin Pagac 2018-10-08 10:21:55 UTC
Created attachment 1491581 [details]
reproduced with 5.10.0.18

Comment 6 Aparna Karve 2018-10-08 14:59:55 UTC
Created attachment 1491684 [details]
Validation not successful with random creds for vmrc

Comment 11 CFME Bot 2018-10-13 13:51:29 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/6a332cfb21d5b74affd276d908b2da2055b6ab11
commit 6a332cfb21d5b74affd276d908b2da2055b6ab11
Author:     Aparna Karve <akarve>
AuthorDate: Fri Oct 12 14:56:23 2018 -0400
Commit:     Aparna Karve <akarve>
CommitDate: Fri Oct 12 14:56:23 2018 -0400

    maintain a single source of truth in multi tab situation

    `$scope.currentTab` will always contain the correct tab value (prefix value for the endpoint validation)

    https://bugzilla.redhat.com/show_bug.cgi?id=1609735

 app/assets/javascripts/controllers/ems_common/ems_common_form_controller.js | 7 +-
 1 file changed, 3 insertions(+), 4 deletions(-)

Comment 12 CFME Bot 2018-10-15 13:51:35 UTC
New commit detected on ManageIQ/manageiq-ui-classic/hammer:

https://github.com/ManageIQ/manageiq-ui-classic/commit/88ce7f0128e15ac63bfcad28324d41ea1d6a999e
commit 88ce7f0128e15ac63bfcad28324d41ea1d6a999e
Author:     Harpreet Kataria <hkataria>
AuthorDate: Sat Oct 13 09:46:42 2018 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Sat Oct 13 09:46:42 2018 -0400

    Merge pull request #4768 from AparnaKarve/bz1609735_handle_enterkey_in_multitab_endpoint

    Fix multi-tab endpoint credential validation by passing the right credential type when user hits "Enter"

    (cherry picked from commit 0b54e1d530c18ddbaedeaa581e99e52619438ff8)

    https://bugzilla.redhat.com/show_bug.cgi?id=1609735

 app/assets/javascripts/controllers/ems_common/ems_common_form_controller.js | 7 +-
 spec/javascripts/controllers/ems_common/ems_common_form_controller_spec.js | 18 +
 2 files changed, 21 insertions(+), 4 deletions(-)

Comment 15 Vatsal Parekh 2018-10-22 13:22:30 UTC
The change introduced in this fix actually breaks the kubevirt provider's Validation tab in the UI

specifically this change, https://github.com/ManageIQ/manageiq-ui-classic/pull/4768/files#diff-0c636d08755efa76b988d3a5cfbcf94aR701

@Moti please add more details if you feel

Comment 16 Moti Asayag 2018-10-22 13:30:52 UTC
The following line causes kubevirt's provider (the Virtualization sub tab of the container provider) to fail:
https://github.com/ManageIQ/manageiq-ui-classic/commit/88ce7f0128e15ac63bfcad28324d41ea1d6a999e#diff-0c636d08755efa76b988d3a5cfbcf94aR701


Before the change the following used to work for kubevirt provider:
$scope.angularForm[$scope.authType + '_auth_status']
It was resolved to:
$scope.angularForm['kubevirt_auth_status']

However changing this code to:
$scope.angularForm[$scope.currentTab + '_auth_status']
resolved to:
$scope.angularForm['virtualization_auth_status'] - which is undefined

exception from console:
vendor-da7cd999f24f50456669.js:309 TypeError: Cannot read property '$setViewValue' of undefined
    at l.t.updateAuthStatus (application-c4e42117e0c2ae8458273f67a0834b0f84399b4f7e5c35bc69aced73b83128a5.js:201)
    at application-c4e42117e0c2ae8458273f67a0834b0f84399b4f7e5c35bc69aced73b83128a5.js:201
    at l.$eval (vendor-da7cd999f24f50456669.js:309)
    at l.$apply (vendor-da7cd999f24f50456669.js:309)
    at application-c4e42117e0c2ae8458273f67a0834b0f84399b4f7e5c35bc69aced73b83128a5.js:201
    at vendor-da7cd999f24f50456669.js:309
    at p (vendor-da7cd999f24f50456669.js:309)
    at vendor-da7cd999f24f50456669.js:309

Comment 21 CFME Bot 2018-10-26 22:09:06 UTC
New commit detected on ManageIQ/manageiq-ui-classic/hammer:

https://github.com/ManageIQ/manageiq-ui-classic/commit/e931e5c6d1926ccdc2330383121fd173b7fdbaa6
commit e931e5c6d1926ccdc2330383121fd173b7fdbaa6
Author:     Harpreet Kataria <hkataria>
AuthorDate: Fri Oct 26 10:04:28 2018 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Fri Oct 26 10:04:28 2018 -0400

    Merge pull request #4836 from AparnaKarve/rename_tab_to_match_current_tab

    Rename tabs in the haml to match current tab in the controller scope

    (cherry picked from commit 020f33c9fc202507c7f66d20bff80714f40e913a)

    https://bugzilla.redhat.com/show_bug.cgi?id=1609735
    https://bugzilla.redhat.com/show_bug.cgi?id=1640304

 app/assets/javascripts/controllers/ems_common/ems_common_form_controller.js | 10 +-
 app/controllers/mixins/ems_common_angular.rb | 1 +
 app/views/layouts/angular/_multi_auth_credentials.html.haml | 12 +-
 spec/javascripts/controllers/ems_common/ems_common_form_controller_spec.js | 45 +
 4 files changed, 58 insertions(+), 10 deletions(-)

Comment 22 Vatsal Parekh 2018-11-02 07:47:01 UTC
I was able to add kubevirt, not a issue on kubevirt side anymore.


Note You need to log in before you can comment on or make changes to this bug.