Repository: ambari
Updated Branches:
  refs/heads/trunk 550752deb -> d69b58234


AMBARI-20484. Custom properties of Alert Target are not reset after last Alert 
Target being created (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d69b5823
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d69b5823
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d69b5823

Branch: refs/heads/trunk
Commit: d69b58234358f017e48bde170cf2a045360fa9a4
Parents: 550752d
Author: Alex Antonenko <[email protected]>
Authored: Mon Mar 27 17:24:39 2017 +0300
Committer: Alex Antonenko <[email protected]>
Committed: Mon Mar 27 17:24:39 2017 +0300

----------------------------------------------------------------------
 .../main/alerts/manage_alert_notifications_controller.js         | 1 +
 .../main/alerts/manage_alert_notifications_controller_test.js    | 4 ++++
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d69b5823/ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js
 
b/ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js
index f470f08..73c19c6 100644
--- 
a/ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js
+++ 
b/ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js
@@ -383,6 +383,7 @@ App.ManageAlertNotificationsController = 
Em.Controller.extend({
       inputFields.set(key + '.value', inputFields.get(key + '.defaultValue'));
     });
     inputFields.set('severityFilter.value', ['OK', 'WARNING', 'CRITICAL', 
'UNKNOWN']);
+    inputFields.set('customProperties',Em.A([]));
     this.showCreateEditPopup(false);
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d69b5823/ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js
 
b/ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js
index 15b4da3..31da561 100644
--- 
a/ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js
+++ 
b/ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js
@@ -213,6 +213,10 @@ describe('App.ManageAlertNotificationsController', 
function () {
       });
     });
 
+    it("should reset custom properties",function(){
+       
expect(controller.get('inputFields.customProperties')).to.be.eql(Em.A([]));
+    });
+
     it("should call showCreateEditPopup", function () {
       expect(controller.showCreateEditPopup.calledOnce).to.be.true;
     });

Reply via email to