Skip to content

Commit

Permalink
incorporated review comments
Browse files Browse the repository at this point in the history
Signed-off-by: msvinaykumar <[email protected]>
  • Loading branch information
msvinaykumar committed Nov 19, 2024
1 parent dc5b888 commit d7aec44
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
19 changes: 19 additions & 0 deletions src/main/java/com/autotune/analyzer/serviceObjects/BulkInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class BulkInput {
private FilterWrapper filter;
private TimeRange time_range;
private String datasource;
private Webhook webhook;

// Getters and Setters

Expand Down Expand Up @@ -136,4 +137,22 @@ public void setEnd(String end) {
this.end = end;
}
}

public static class Webhook{
private String url;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}

public Webhook getWebhook() {
return webhook;
}

public void setWebhook(Webhook webhook) {
this.webhook = webhook;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ public Recommendation getRecommendations() {
public void setNotification(Notification notification) {
this.notification = notification;
}

public Notification getNotification() {
return notification;
}

public void setRecommendations(Recommendation recommendations) {
this.recommendations = recommendations;
}
}

public static class Recommendation {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ public void setFinalJobStatus(String status,String notificationKey,BulkJobStatus
if(null!=notification)
jobData.setNotification(notificationKey,notification);
GenericRestApiClient apiClient = new GenericRestApiClient(finalDatasource);
apiClient.setBaseURL(KruizeDeploymentInfo.webhook_url);
if(null != bulkInput.getWebhook() && null != bulkInput.getWebhook().getUrl()){
apiClient.setBaseURL(bulkInput.getWebhook().getUrl());
}else {
apiClient.setBaseURL(KruizeDeploymentInfo.webhook_url);
}
GenericRestApiClient.HttpResponseWrapper responseCode;
BulkJobStatus.Webhook webhook = new BulkJobStatus.Webhook(WebHookStatus.IN_PROGRESS);
jobData.setWebhook(webhook);
Expand Down

0 comments on commit d7aec44

Please sign in to comment.