seung-00 commented on code in PR #5129:
URL: https://github.com/apache/zeppelin/pull/5129#discussion_r2772986229


##########
zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts:
##########
@@ -435,18 +435,31 @@ export class NotebookComponent extends 
MessageListenersManager implements OnInit
       this.noteVarShareService.clear();
     });
     this.activatedRoute.params.pipe(takeUntil(this.destroy$)).subscribe(param 
=> {
-      const { noteId, revisionId } = param;
-      if (revisionId) {
-        this.messageService.noteRevision(noteId, revisionId);
-      } else {
-        this.messageService.getNote(noteId);
-      }
-      this.revisionView = !!revisionId;
+      this.revisionView = !!param.revisionId;
       this.cdr.markForCheck();
-      this.messageService.listRevisionHistory(noteId);
-      // TODO(hsuanxyz) scroll to current paragraph
     });
     this.revisionView = !!this.activatedRoute.snapshot.params.revisionId;
+
+    // Fetch note when WebSocket connects or reconnects
+    this.messageService.connectedStatus$
+      .pipe(startWith(this.messageService.connectedStatus), 
takeUntil(this.destroy$))
+      .subscribe(connected => {
+        console.log('connectedStatus$ changed to ', connected ? 'connected' : 
'disconnected');
+        if (connected) {
+          const { noteId, revisionId } = this.activatedRoute.snapshot.params;
+          if (!noteId) {
+            throw new Error('Query parameter `noteId` is required.');

Review Comment:
   nit: `noteId` looks like a path parameter.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to