This is an automated email from the ASF dual-hosted git repository.
RocMarshal pushed a commit to branch release-2.3
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-2.3 by this push:
new 651dd5319c1 [FLINK-39641][runtime-web] Fix unstable position of the
Rescales Tab (#28133)
651dd5319c1 is described below
commit 651dd5319c18465433406dc469c6aba47acb8531
Author: Yuepeng Pan <[email protected]>
AuthorDate: Sat May 9 22:35:13 2026 +0800
[FLINK-39641][runtime-web] Fix unstable position of the Rescales Tab
(#28133)
(cherry picked from commit 679264659d993f9192bcf557cc1f1624fa12ff8c)
---
.../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'
});