Skip to content

Commit

Permalink
add workflow id in get detector alerts flow
Browse files Browse the repository at this point in the history
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
  • Loading branch information
eirsep committed Sep 13, 2023
1 parent f4be879 commit d3aea3e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ public AlertsService(Client client) {
* @param table group of search related parameters
* @param severityLevel alert severity level
* @param alertState current alert state
* @param alertState workflowId
* @param listener ActionListener to get notified on response or error
*/
public void getAlertsByDetectorId(
String detectorId,
Table table,
String severityLevel,
String alertState,
String workflowId,
ActionListener<GetAlertsResponse> listener
) {
this.client.execute(GetDetectorAction.INSTANCE, new GetDetectorRequest(detectorId, -3L), new ActionListener<>() {
Expand All @@ -88,6 +90,7 @@ public void onResponse(GetDetectorResponse getDetectorResponse) {
table,
severityLevel,
alertState,
detector.getWorkflowIds() == null || detector.getWorkflowIds().isEmpty() ? "" : detector.getWorkflowIds().get(0),
new ActionListener<>() {
@Override
public void onResponse(GetAlertsResponse getAlertsResponse) {
Expand Down Expand Up @@ -129,6 +132,7 @@ public void getAlertsByMonitorIds(
Table table,
String severityLevel,
String alertState,
String workflowId,
ActionListener<GetAlertsResponse> listener
) {

Expand All @@ -140,7 +144,7 @@ public void getAlertsByMonitorIds(
null,
alertIndex,
monitorIds,
null,
List.of(workflowId),
null
);

Expand Down Expand Up @@ -204,6 +208,7 @@ public void getAlerts(
table,
severityLevel,
alertState,
"",
new ActionListener<>() {
@Override
public void onResponse(GetAlertsResponse getAlertsResponse) {
Expand Down

0 comments on commit d3aea3e

Please sign in to comment.