-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45612/
-----------------------------------------------------------
Review request for Ambari, Alexandr Antonenko, Jaimin Jetly, Jonathan Hurley,
Oleg Nechiporenko, Richard Zang, Srimanth Gunturi, Xi Wang, and Yusaku Sako.
Bugs: AMBARI-15605
https://issues.apache.org/jira/browse/AMBARI-15605
Repository: ambari
Description
-------
Alert repeat tolerance values should be captured and exposed via the API. The
rules for capturing the occurrences of an alert are:
- Alert instances always start at 1
- Alerts with an {{OK}} state always reset the counter
- When transitioning from {{OK}} to non-{{OK}}, the counter is reset
- When transitioning within non-{{OK}} states (such as back and forth between
{{WARNING}} and {{CRITICAL}}, the counter is merely incremented.
GET api/v1/clusters/c1/alerts/1
{
"href": "http://localhost:8080/api/v1/clusters/c1/alerts/1",
"Alert": {
"cluster_name": "c1",
...
"repeat_tolerance": 1,
"repeat_tolerance_remaining": 0,
"occurrences": 8,
....
- {{OK}} alert instances will *always* have a value of {{0}} for
{{repeat_tolerance_remaining}} since they do not honor repeat tolerance. An
{{OK}} alert is considered to be correct always.
Diffs
-----
ambari-web/app/controllers/global/update_controller.js dcef1a2
ambari-web/app/mappers/alert_instances_mapper.js 349d94d
ambari-web/app/messages.js 1b2a02f
ambari-web/app/models/alerts/alert_instance.js d8710a0
ambari-web/app/templates/common/modal_popups/alerts_popup.hbs 4debe10
ambari-web/app/templates/main/alerts/alert_instance/status.hbs d82bc7b
ambari-web/app/templates/main/alerts/definition_details.hbs 14b749d
ambari-web/app/views/main/alerts/definition_details_view.js 2fc75c1
Diff: https://reviews.apache.org/r/45612/diff/
Testing
-------
Local ambari-web test passed.
25602 tests complete (23 seconds)
154 tests pending
Manual testing done.
Thanks,
Zhe (Joe) Wang