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

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

commit c4f2da4d133690c0eb9933b1eb1d53b6aa5a3187
Author: Zhanghao Chen <[email protected]>
AuthorDate: Fri Nov 10 22:17:26 2023 +0800

    [FLINK-33148] Update Web UI to adopt the new "endpoint" field in REST API
---
 .../web-dashboard/src/app/interfaces/job-exception.ts             | 4 ++--
 flink-runtime-web/web-dashboard/src/app/interfaces/job-vertex.ts  | 4 ++--
 .../src/app/pages/job/exceptions/job-exceptions.component.html    | 4 ++--
 .../overview/subtasks/job-overview-drawer-subtasks.component.html | 8 +++++---
 .../overview/subtasks/job-overview-drawer-subtasks.component.ts   | 2 +-
 .../taskmanagers/job-overview-drawer-taskmanagers.component.html  | 6 +++---
 .../taskmanagers/job-overview-drawer-taskmanagers.component.ts    | 4 ++--
 7 files changed, 17 insertions(+), 15 deletions(-)

diff --git 
a/flink-runtime-web/web-dashboard/src/app/interfaces/job-exception.ts 
b/flink-runtime-web/web-dashboard/src/app/interfaces/job-exception.ts
index e49e6305734..64eea9867e4 100644
--- a/flink-runtime-web/web-dashboard/src/app/interfaces/job-exception.ts
+++ b/flink-runtime-web/web-dashboard/src/app/interfaces/job-exception.ts
@@ -27,7 +27,7 @@ export interface JobException {
 export interface JobExceptionItem {
   'attempt-num': number;
   exception: string;
-  location: string;
+  endpoint: string;
   'subtask-index': number;
   task: string;
   timestamp: number;
@@ -44,7 +44,7 @@ export interface ExceptionInfo {
   stacktrace: string;
   timestamp: number;
   taskName: string;
-  location: string;
+  endpoint: string;
   taskManagerId: string;
 }
 
diff --git a/flink-runtime-web/web-dashboard/src/app/interfaces/job-vertex.ts 
b/flink-runtime-web/web-dashboard/src/app/interfaces/job-vertex.ts
index 746b9d79d67..140e65fbcb4 100644
--- a/flink-runtime-web/web-dashboard/src/app/interfaces/job-vertex.ts
+++ b/flink-runtime-web/web-dashboard/src/app/interfaces/job-vertex.ts
@@ -69,7 +69,7 @@ export interface JobVertexSubTaskData {
   attempt: number;
   duration: number;
   'end-time': number;
-  host: string;
+  endpoint: string;
   start_time: number;
   status: string;
   subtask: number;
@@ -96,7 +96,7 @@ export interface JobVertexTaskManager {
 
 export interface VertexTaskManagerDetail {
   duration: number;
-  host: string;
+  endpoint: string;
   status: string;
   'start-time': number;
   'end-time': number;
diff --git 
a/flink-runtime-web/web-dashboard/src/app/pages/job/exceptions/job-exceptions.component.html
 
b/flink-runtime-web/web-dashboard/src/app/pages/job/exceptions/job-exceptions.component.html
index 6f43632d4a7..a692a541a99 100644
--- 
a/flink-runtime-web/web-dashboard/src/app/pages/job/exceptions/job-exceptions.component.html
+++ 
b/flink-runtime-web/web-dashboard/src/app/pages/job/exceptions/job-exceptions.component.html
@@ -81,8 +81,8 @@
               <td class="clickable" 
(click)="navigateTo(item.selected.taskManagerId)">
                 <a>
                   {{
-                    item.selected.location
-                      ? item.selected.taskManagerId + '(' + 
item.selected.location + ')'
+                    item.selected.endpoint
+                      ? item.selected.taskManagerId + '(' + 
item.selected.endpoint + ')'
                       : '(unassigned)'
                   }}
                 </a>
diff --git 
a/flink-runtime-web/web-dashboard/src/app/pages/job/overview/subtasks/job-overview-drawer-subtasks.component.html
 
b/flink-runtime-web/web-dashboard/src/app/pages/job/overview/subtasks/job-overview-drawer-subtasks.component.html
index 9e664a827f3..2c757d8bc03 100644
--- 
a/flink-runtime-web/web-dashboard/src/app/pages/job/overview/subtasks/job-overview-drawer-subtasks.component.html
+++ 
b/flink-runtime-web/web-dashboard/src/app/pages/job/overview/subtasks/job-overview-drawer-subtasks.component.html
@@ -47,7 +47,9 @@
           <th [nzSortFn]="sortAttemptFn" (nzSortOrderChange)="collapseAll()" 
nzWidth="100px">
             Attempt
           </th>
-          <th [nzSortFn]="sortHostFn" (nzSortOrderChange)="collapseAll()" 
nzWidth="200px">Host</th>
+          <th [nzSortFn]="sortEndpointFn" (nzSortOrderChange)="collapseAll()" 
nzWidth="200px">
+            Endpoint
+          </th>
           <th [nzSortFn]="sortStartTimeFn" (nzSortOrderChange)="collapseAll()" 
nzWidth="150px">
             Start Time
           </th>
@@ -98,7 +100,7 @@
                 </span>
               </td>
               <td>{{ subtask.attempt + 1 }}</td>
-              <td>{{ subtask.host }}</td>
+              <td>{{ subtask.endpoint }}</td>
               <td>{{ subtask['start_time'] | humanizeDate: 'yyyy-MM-dd 
HH:mm:ss.SSS' }}</td>
               <td>{{ subtask.duration | humanizeDuration }}</td>
               <td>{{ subtask['end-time'] | humanizeDate: 'yyyy-MM-dd 
HH:mm:ss.SSS' }}</td>
@@ -164,7 +166,7 @@
                     </span>
                   </td>
                   <td>{{ attempt.attempt + 1 }}</td>
-                  <td>{{ attempt.host }}</td>
+                  <td>{{ attempt.endpoint }}</td>
                   <td>{{ attempt['start_time'] | humanizeDate: 'yyyy-MM-dd 
HH:mm:ss.SSS' }}</td>
                   <td>{{ attempt.duration | humanizeDuration }}</td>
                   <td>{{ attempt['end-time'] | humanizeDate: 'yyyy-MM-dd 
HH:mm:ss.SSS' }}</td>
diff --git 
a/flink-runtime-web/web-dashboard/src/app/pages/job/overview/subtasks/job-overview-drawer-subtasks.component.ts
 
b/flink-runtime-web/web-dashboard/src/app/pages/job/overview/subtasks/job-overview-drawer-subtasks.component.ts
index 58b5f3e0f11..6a97f37dee5 100644
--- 
a/flink-runtime-web/web-dashboard/src/app/pages/job/overview/subtasks/job-overview-drawer-subtasks.component.ts
+++ 
b/flink-runtime-web/web-dashboard/src/app/pages/job/overview/subtasks/job-overview-drawer-subtasks.component.ts
@@ -78,7 +78,7 @@ export class JobOverviewDrawerSubtasksComponent implements 
OnInit, OnDestroy {
   readonly sortWriteBytesFn = createSortFn(item => 
item.metrics?.['write-bytes']);
   readonly sortWriteRecordsFn = createSortFn(item => 
item.metrics?.['write-records']);
   readonly sortAttemptFn = createSortFn(item => item.attempt);
-  readonly sortHostFn = createSortFn(item => item.host);
+  readonly sortEndpointFn = createSortFn(item => item.endpoint);
   readonly sortStartTimeFn = createSortFn(item => item['start_time']);
   readonly sortDurationFn = createSortFn(item => item.duration);
   readonly sortEndTimeFn = createSortFn(item => item['end-time']);
diff --git 
a/flink-runtime-web/web-dashboard/src/app/pages/job/overview/taskmanagers/job-overview-drawer-taskmanagers.component.html
 
b/flink-runtime-web/web-dashboard/src/app/pages/job/overview/taskmanagers/job-overview-drawer-taskmanagers.component.html
index 35811232782..cf5f4599c61 100644
--- 
a/flink-runtime-web/web-dashboard/src/app/pages/job/overview/taskmanagers/job-overview-drawer-taskmanagers.component.html
+++ 
b/flink-runtime-web/web-dashboard/src/app/pages/job/overview/taskmanagers/job-overview-drawer-taskmanagers.component.html
@@ -26,11 +26,11 @@
   [nzVirtualItemSize]="virtualItemSize"
   [nzVirtualMinBufferPx]="300"
   [nzVirtualMaxBufferPx]="300"
-  [nzVirtualForTrackBy]="trackByHost"
+  [nzVirtualForTrackBy]="trackByEndpoint"
 >
   <thead>
     <tr>
-      <th nzWidth="160px" nzLeft [nzSortFn]="sortHostFn">Host</th>
+      <th nzWidth="160px" nzLeft [nzSortFn]="sortEndpointFn">Endpoint</th>
       <th nzWidth="150px" [nzSortFn]="sortReadBytesFn">Bytes received</th>
       <th nzWidth="150px" [nzSortFn]="sortReadRecordsFn">Records received</th>
       <th nzWidth="120px" [nzSortFn]="sortWriteBytesFn">Bytes sent</th>
@@ -48,7 +48,7 @@
       <ng-container *ngIf="narrowLogData(data) as taskManager">
         <tr>
           <td nzLeft>
-            <span class="ellipsis-cell">{{ taskManager.host }}</span>
+            <span class="ellipsis-cell">{{ taskManager.endpoint }}</span>
           </td>
           <td>
             <span *ngIf="taskManager['metrics']['read-bytes-complete']; else 
loadingTemplate">
diff --git 
a/flink-runtime-web/web-dashboard/src/app/pages/job/overview/taskmanagers/job-overview-drawer-taskmanagers.component.ts
 
b/flink-runtime-web/web-dashboard/src/app/pages/job/overview/taskmanagers/job-overview-drawer-taskmanagers.component.ts
index 793a3116859..ca054eeb967 100644
--- 
a/flink-runtime-web/web-dashboard/src/app/pages/job/overview/taskmanagers/job-overview-drawer-taskmanagers.component.ts
+++ 
b/flink-runtime-web/web-dashboard/src/app/pages/job/overview/taskmanagers/job-overview-drawer-taskmanagers.component.ts
@@ -61,13 +61,13 @@ function createSortFn(
   standalone: true
 })
 export class JobOverviewDrawerTaskmanagersComponent implements OnInit, 
OnDestroy {
-  public readonly trackByHost = (_: number, node: VertexTaskManagerDetail): 
string => node.host;
+  public readonly trackByEndpoint = (_: number, node: 
VertexTaskManagerDetail): string => node.endpoint;
 
   public readonly sortReadBytesFn = createSortFn(item => 
item.metrics?.['read-bytes']);
   public readonly sortReadRecordsFn = createSortFn(item => 
item.metrics?.['read-records']);
   public readonly sortWriteBytesFn = createSortFn(item => 
item.metrics?.['write-bytes']);
   public readonly sortWriteRecordsFn = createSortFn(item => 
item.metrics?.['write-records']);
-  public readonly sortHostFn = createSortFn(item => item.host);
+  public readonly sortEndpointFn = createSortFn(item => item.endpoint);
   public readonly sortStartTimeFn = createSortFn(item => item['start-time']);
   public readonly sortDurationFn = createSortFn(item => item.duration);
   public readonly sortEndTimeFn = createSortFn(item => item['end-time']);

Reply via email to