[
https://issues.apache.org/jira/browse/METRON-1634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16522271#comment-16522271
]
ASF GitHub Bot commented on METRON-1634:
----------------------------------------
Github user merrimanr commented on a diff in the pull request:
https://github.com/apache/metron/pull/1077#discussion_r197793823
--- Diff:
metron-interface/metron-alerts/src/app/alerts/alert-details/alert-details.component.ts
---
@@ -99,16 +99,15 @@ export class AlertDetailsComponent implements OnInit {
this.alertSource = alertSource;
this.selectedAlertState =
this.getAlertState(alertSource['alert_status']);
this.alertSources = (alertSource.metron_alert &&
alertSource.metron_alert.length > 0) ? alertSource.metron_alert : [alertSource];
- this.setComments(alertSource);
+ this.setComments(alertSource['comments'] ? alertSource['comments'] :
[]);
--- End diff --
Sounds good.
> Alerts UI add comment doesn't immediately show up.
> --------------------------------------------------
>
> Key: METRON-1634
> URL: https://issues.apache.org/jira/browse/METRON-1634
> Project: Metron
> Issue Type: Bug
> Reporter: Ryan Merriman
> Priority: Major
>
> For ES (and potentially Solr), when the Alerts UI adds a comment to an alert,
> it calls the update, then immediately calls a findOne to retrieve it. This
> comment might not immediately be available, so it doesn't show the new
> comment.
> Instead of running a findOne, assuming the update responds appropriately, we
> should probably just add it directly in the UI.
> Also applies to removing a comment
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)