----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47034/ -----------------------------------------------------------
Review request for Ambari, Nate Cole and Robert Levas. Bugs: AMBARI-16277 https://issues.apache.org/jira/browse/AMBARI-16277 Repository: ambari Description ------- Alert targets cannot currently be disabled. In order to temporarily stop alerts, the following actions are required: - Deleting the alert target - Removing all states from an alert target - Changing the properties of an alert target to make it invalid - Placing the entire cluster into Maintenance Mode In each case, the state of the system is being changed to achieve a side-effect. Alert targets should support being disabled as a first class action. ``` PUT api/v1/alert_targets/1 { "AlertTarget": { "enabled": false } } ``` Diffs ----- ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java 4acbdc5 ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertStateChangedListener.java 21584fb ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java 078e443 ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity_.java e94c31d ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertTarget.java e2ed70f ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java f85a4c7 ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f5336bc ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql fca3be3 ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql ce0bd84 ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7fb8c31 ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 0f3a2c2 ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b89389c ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 1107c4d ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java f76867a ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java 7c85ba7 Diff: https://reviews.apache.org/r/47034/diff/ Testing ------- mvn clean test Thanks, Jonathan Hurley