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

tangyun 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 b6c5534efc8 [FLINK-29998] Make the backpressure tab could be sort by 
the busy percent
b6c5534efc8 is described below

commit b6c5534efc8a4b59c3f0993777aa8119af205f0c
Author: Yu Chen <yuchen.e...@gmail.com>
AuthorDate: Thu Dec 8 21:10:46 2022 +0800

    [FLINK-29998] Make the backpressure tab could be sort by the busy percent
---
 .../backpressure/job-overview-drawer-backpressure.component.html     | 2 +-
 .../backpressure/job-overview-drawer-backpressure.component.ts       | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/flink-runtime-web/web-dashboard/src/app/pages/job/overview/backpressure/job-overview-drawer-backpressure.component.html
 
b/flink-runtime-web/web-dashboard/src/app/pages/job/overview/backpressure/job-overview-drawer-backpressure.component.html
index 963e553927e..bdbd8b3136e 100644
--- 
a/flink-runtime-web/web-dashboard/src/app/pages/job/overview/backpressure/job-overview-drawer-backpressure.component.html
+++ 
b/flink-runtime-web/web-dashboard/src/app/pages/job/overview/backpressure/job-overview-drawer-backpressure.component.html
@@ -57,7 +57,7 @@
     </tr>
     <tr>
       <th>SubTask</th>
-      <th>Backpressured / Idle / Busy</th>
+      <th [nzSortFn]="sortByBusyRatio">Backpressured / Idle / Busy</th>
       <th>Backpressure Status</th>
     </tr>
   </thead>
diff --git 
a/flink-runtime-web/web-dashboard/src/app/pages/job/overview/backpressure/job-overview-drawer-backpressure.component.ts
 
b/flink-runtime-web/web-dashboard/src/app/pages/job/overview/backpressure/job-overview-drawer-backpressure.component.ts
index 5f69b4fa8ba..3e16fe27d35 100644
--- 
a/flink-runtime-web/web-dashboard/src/app/pages/job/overview/backpressure/job-overview-drawer-backpressure.component.ts
+++ 
b/flink-runtime-web/web-dashboard/src/app/pages/job/overview/backpressure/job-overview-drawer-backpressure.component.ts
@@ -99,6 +99,7 @@ export class JobOverviewDrawerBackpressureComponent 
implements OnInit, OnDestroy
         this.now = Date.now();
         this.backpressure = data;
         this.listOfSubTaskBackpressure = data?.subtasks || [];
+        this.listOfSubTaskBackpressure.sort(this.sortByBusyRatio);
         this.cdr.markForCheck();
       });
   }
@@ -129,4 +130,8 @@ export class JobOverviewDrawerBackpressureComponent 
implements OnInit, OnDestroy
       return `${Math.round(value * 100)}%`;
     }
   }
+
+  sortByBusyRatio(a: JobBackpressureSubtask, b: JobBackpressureSubtask): 
number {
+    return a.busyRatio - b.busyRatio;
+  }
 }

Reply via email to