[dashboard] Problems with check-password-on-the-fly java script

Bug #1534642 reported by Ekaterina Chernova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Medium
Valerii Kovalchuk

Bug Description

There are currently two problems:

1) if form contains 2 passwords, script is working only on the first one (error message is appeared only in the first fields)
2) if form contains password with user validator and password with default validator, java script checks the wrong field

code to reproduce:

        - name: password
          type: password
          required: false
          label: Password
          descriptionTitle: Password
          description: >-
            Please provide password that is going to be used to connect to the database
        - name: password2
          type: password
          required: false
          label: Password2
          descriptionTitle: Password2
          description: >-
            Please provide password that is going to be used to connect to the database
        - name: password3
          type: password
          label: IP password
          description: >-
            Provide password that is going to be used to connect to the database
          regexpValidator: '^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$'
          errorMessages:
            invalid: Enter IP

Changed in murano:
milestone: mitaka-3 → mitaka-rc1
summary: - [dasboard] Problems with check-password-on-the-fly java script
+ [dashboard] Problems with check-password-on-the-fly java script
Changed in murano:
milestone: mitaka-rc1 → newton-1
Changed in murano:
assignee: nobody → Valerii Kovalchuk (vakovalchuk)
Revision history for this message
Valerii Kovalchuk (vakovalchuk) wrote :

The reason of this behavior is not the number of passwords but rather names of fields. Password check works only on those ending with "password".

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-dashboard (master)

Fix proposed to branch: master
Review: https://review.openstack.org/304122

Changed in murano:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-dashboard (master)

Reviewed: https://review.openstack.org/304122
Committed: https://git.openstack.org/cgit/openstack/murano-dashboard/commit/?id=6edfc0413da48c4ba12b9a83c7612530d7c03530
Submitter: Jenkins
Branch: master

commit 6edfc0413da48c4ba12b9a83c7612530d7c03530
Author: Valerii Kovalchuk <email address hidden>
Date: Mon Apr 11 16:06:21 2016 +0300

    Add 'password' to names of password fields in dynamic forms

    Password-checking javascript selects password fields relying on a
    fact that their ids should end with 'password' and 'password-
    clone'. But it's not actually true when in application's 'ui.yaml'
    file another name for password field is given.
    This change adds 'password' to every password field name and id,
    and also 'custom_valid' to fields with custom validators to avoid
    showing standard warning messages for them.

    Change-Id: I4974c221f449b70a46f30e78bfd3cd1b72eeb919
    Closes-bug: #1534642

Changed in murano:
status: In Progress → Fix Released
Revision history for this message
Valerii Kovalchuk (vakovalchuk) wrote :

The previous fix caused another problem: https://bugs.launchpad.net/murano/+bug/1585694, so need to find another way to fix this

Changed in murano:
status: Fix Released → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-dashboard (master)

Fix proposed to branch: master
Review: https://review.openstack.org/321532

Changed in murano:
status: Confirmed → In Progress
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/murano-dashboard 3.0.0.0b1

This issue was fixed in the openstack/murano-dashboard 3.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-dashboard (master)

Reviewed: https://review.openstack.org/321532
Committed: https://git.openstack.org/cgit/openstack/murano-dashboard/commit/?id=6139b1bac125850acfcf634828b2cfd5fecd0e13
Submitter: Jenkins
Branch: master

commit 6139b1bac125850acfcf634828b2cfd5fecd0e13
Author: Valerii Kovalchuk <email address hidden>
Date: Thu May 26 15:32:12 2016 +0300

    Correct password-checking js in dynamic UI forms

    Password-checking javascript selects password fields relying on a
    fact that their ids should end with 'password' and 'password-
    clone'. But it's not actually true when in application's 'ui.yaml'
    file another name for password field is given.
    This patch changes js in a way that it doesn't check presence of
    'password' in the field id and uses just it's type. Also it
    distinguish original password field and confirmation field by
    '-clone' ending in id.

    Change-Id: I9b9d7cdea8f5c5249cd7595b104424cf7a4055d4
    Closes-bug: #1534642

Changed in murano:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/murano-dashboard 3.0.0.0b2

This issue was fixed in the openstack/murano-dashboard 3.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.