This is an automated email from the ASF dual-hosted git repository.

RocMarshal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 679264659d9 [FLINK-39641][runtime-web] Fix unstable position of the 
Rescales Tab (#28131)
679264659d9 is described below

commit 679264659d993f9192bcf557cc1f1624fa12ff8c
Author: Yuepeng Pan <[email protected]>
AuthorDate: Sat May 9 19:18:13 2026 +0800

    [FLINK-39641][runtime-web] Fix unstable position of the Rescales Tab 
(#28131)
---
 .../app/pages/job/job-detail/status/job-status.component.ts   | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git 
a/flink-runtime-web/web-dashboard/src/app/pages/job/job-detail/status/job-status.component.ts
 
b/flink-runtime-web/web-dashboard/src/app/pages/job/job-detail/status/job-status.component.ts
index c5def1f2aec..c9a1e07cb9d 100644
--- 
a/flink-runtime-web/web-dashboard/src/app/pages/job/job-detail/status/job-status.component.ts
+++ 
b/flink-runtime-web/web-dashboard/src/app/pages/job/job-detail/status/job-status.component.ts
@@ -63,7 +63,6 @@ export class JobStatusComponent implements OnInit, OnDestroy {
   urlLoading = true;
   readonly listOfNavigation: RouterTab[];
   private readonly checkpointIndexOfNavigation: number;
-  private readonly rescalesIndexOfNavigation: number;
 
   webCancelEnabled = this.statusService.configuration.features['web-cancel'];
   isHistoryServer = this.statusService.configuration.features['web-history'];
@@ -82,7 +81,6 @@ export class JobStatusComponent implements OnInit, OnDestroy {
     // Create a copy to avoid mutating the shared config
     this.listOfNavigation = [...(moduleConfig.routerTabs || 
JOB_MODULE_DEFAULT_CONFIG.routerTabs)];
     this.checkpointIndexOfNavigation = this.checkpointIndexOfNav();
-    this.rescalesIndexOfNavigation = this.rescalesIndexOfNav();
   }
 
   ngOnInit(): void {
@@ -133,6 +131,11 @@ export class JobStatusComponent implements OnInit, 
OnDestroy {
     return this.listOfNavigation.findIndex(item => item.path === 'rescales');
   }
 
+  private getRescalesTabIndexAfter(path: string): number {
+    const index = this.listOfNavigation.findIndex(item => item.path === path);
+    return index >= 0 ? index + 1 : this.listOfNavigation.length;
+  }
+
   private handleJobDetailChanged(data: JobDetailCorrect): void {
     this.jobDetail = data;
     const checkpointNavIndex = this.checkpointIndexOfNav();
@@ -150,7 +153,9 @@ export class JobStatusComponent implements OnInit, 
OnDestroy {
     if (!shouldShowRescales && rescalesNavIndex > -1) {
       this.listOfNavigation.splice(rescalesNavIndex, 1);
     } else if (shouldShowRescales && rescalesNavIndex == -1) {
-      this.listOfNavigation.splice(this.rescalesIndexOfNavigation, 0, {
+      // Insert deterministically after configuration to avoid stale index 
issues across job transitions.
+      const insertIndex = this.getRescalesTabIndexAfter('configuration');
+      this.listOfNavigation.splice(insertIndex, 0, {
         path: 'rescales',
         title: 'Rescales'
       });

Reply via email to