och5351 commented on code in PR #27826:
URL: https://github.com/apache/flink/pull/27826#discussion_r2988130116


##########
flink-runtime-web/web-dashboard/src/app/pages/job/job-detail/status/job-status.component.ts:
##########
@@ -126,16 +128,31 @@ export class JobStatusComponent implements OnInit, 
OnDestroy {
     return this.listOfNavigation.findIndex(item => item.path === 
'checkpoints');
   }
 
+  rescalesIndexOfNav(): number {
+    return this.listOfNavigation.findIndex(item => item.path === 'rescales');
+  }
+
   private handleJobDetailChanged(data: JobDetailCorrect): void {
     this.jobDetail = data;
-    const index = this.checkpointIndexOfNav();
-    if (data.plan.type == 'STREAMING' && index == -1) {
+    const checkpointIndex = this.checkpointIndexOfNav();
+    if (data.plan.type == 'STREAMING' && checkpointIndex == -1) {
       this.listOfNavigation.splice(this.checkpointIndexOfNavigation, 0, {
         path: 'checkpoints',
         title: 'Checkpoints'
       });
-    } else if (data.plan.type == 'BATCH' && index > -1) {
-      this.listOfNavigation.splice(index, 1);
+    } else if (data.plan.type == 'BATCH' && checkpointIndex > -1) {
+      this.listOfNavigation.splice(checkpointIndex, 1);
+    }

Review Comment:
   I wasn't sure how to split the commit message appropriately, so I created a 
sub-issue [[FLINK-39325](https://issues.apache.org/jira/browse/FLINK-39325)] 
under [[FLIP-487](https://issues.apache.org/jira/browse/FLINK-22258)] for the 
rescales tab logic and committed it separately with the new ticket number.



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