Github user tiborm commented on a diff in the pull request:
https://github.com/apache/metron/pull/1240#discussion_r226576832
--- Diff:
metron-interface/metron-alerts/src/app/alerts/alert-details/alert-details.component.ts
---
@@ -249,8 +249,8 @@ export class AlertDetailsComponent implements OnInit {
commentText += ' \'' +
this.alertCommentsWrapper[index].alertComment.comment + '\'';
}
-
this.metronDialogBox.showConfirmationMessage(commentText).subscribe(response =>
{
- if (response) {
+ let confirmedSubscription =
this.dialogService.confirm(commentText).subscribe(r => {
--- End diff --
Could we use const here instead of let?
It might be better to move the logic inside this subscription to a function
like in saved-serches.component.ts #67 or in table-view.component.ts #428
---