You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by GitBox <gi...@apache.org> on 2019/03/06 17:43:35 UTC

[GitHub] [metron] merrimanr commented on a change in pull request #1344: METRON-1654: findOne request after an alert patch returns with the original state of the alert item

merrimanr commented on a change in pull request #1344: METRON-1654: findOne request after an alert patch returns with the original state of the alert item
URL: https://github.com/apache/metron/pull/1344#discussion_r263056533
 
 

 ##########
 File path: metron-interface/metron-alerts/src/app/alerts/alert-details/alert-details.component.ts
 ##########
 @@ -252,22 +234,15 @@ export class AlertDetailsComponent implements OnInit {
 
     const confirmedSubscription = this.dialogService.launchDialog(commentText).subscribe(action => {
       if (action === ConfirmationType.Confirmed) {
-        let deletedCommentWrapper = this.alertCommentsWrapper.splice(index, 1)[0];
         let commentRequest = new CommentAddRemoveRequest();
         commentRequest.guid = this.alertSource.guid;
         commentRequest.comment = this.alertCommentsWrapper[index].alertComment.comment;
         commentRequest.username = this.alertCommentsWrapper[index].alertComment.username;
         commentRequest.timestamp = this.alertCommentsWrapper[index].alertComment.timestamp;
         commentRequest.sensorType = this.alertSourceType;
-        this.updateService.removeComment(commentRequest).subscribe(
-            () => {
-              this.alertCommentsWrapper.map(alertsWrapper => alertsWrapper.alertComment)
 
 Review comment:
   It's the opposite now.  Before, as you said, we were doing nothing on success and reverting optimistic changes on error.  Now we update on success and do nothing on error.  So no need to handle the error case unless there is something else we want to do with it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services