-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44724/
-----------------------------------------------------------

Review request for Ambari and Di Li.


Bugs: AMBARI-12906
    https://issues.apache.org/jira/browse/AMBARI-12906


Repository: ambari


Description
-------

User should not be allowed to save changes if the credential fields are left 
empty when creating new Alert Notifications.

Steps to reproduce:
1. Create New Alert Notification
2. Enter Name = test
3. Tick the checkbox for 'Use Authentication'
4. Keep username and password empty
5. Click on Save
6. New alert notifications is created.


Diffs
-----

  
ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js 
79e524e 
  ambari-web/app/messages.js 8e69dd0 
  ambari-web/app/templates/main/alerts/create_alert_notification.hbs 0a83f63 
  
ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js
 f16bf4d 

Diff: https://reviews.apache.org/r/44724/diff/


Testing
-------

FIX:
1. With the fix, user won't be allowd to to save changes if Email is selected 
for alert notification and Use authentication is chosen and the credential 
fields are left empty when creating new Alert Notifications or editing existing 
Alert Notifications.
2. The error message "Username is required" will be shown if the Username is 
empty.
3. The error message "Password is required" will be shown if the password is 
empty. 
The fix here uses a similar approach that was used for the Password 
Confirmation error handling.

TESTS:
The fix has been tested with HDP UI.
manage_alert_notifications_controller_test.js has also been modified to test 
changes.

The following is the result of running ambari-web tests:

24957 tests complete (31 seconds)
145 tests pending


Thanks,

Qin Liu

Reply via email to