davidradl commented on code in PR #27532:
URL: https://github.com/apache/flink/pull/27532#discussion_r2770278236


##########
flink-runtime-web/web-dashboard/src/app/pages/job/overview/job-overview.component.ts:
##########
@@ -82,19 +82,23 @@ export class JobOverviewComponent implements OnInit, 
OnDestroy {
         takeUntil(this.destroy$)
       )
       .subscribe(data => {
-        if (this.jobId !== data.plan.jid || data.plan.nodes.length !== 
this.nodes.length) {
-          this.jobId = data.plan.jid;
-          this.nodes = data.plan.nodes;
-          this.streamNodes = data.plan.streamNodes;
-          this.streamLinks = data.plan.streamLinks;
-          this.links = data.plan.links;
-          this.updatePendingInfo();
+        const graphNeedsRefresh =
+          this.jobId !== data.plan.jid ||
+          data.plan.nodes.length !== this.nodes.length ||
+          this.hasLinkChanged(this.links, data.plan.links) ||
+          this.hasLinkChanged(this.streamLinks, data.plan.streamLinks);
+
+        this.jobId = data.plan.jid;

Review Comment:
   I am not an expert at typescript so this could be a dumb question. if we do 
not need to update the graph, do we need to update the this. fields. Can we 
move these lines to into the `if (graphNeedsRefresh) { ` block? Or do these 
fields need updating when graphNeedsRefresh is false?



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