You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by zh...@apache.org on 2022/12/26 08:22:17 UTC

[flink] 01/02: [FLINK-30358][runtime-web] Exception location links to taskManagers UI.

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

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

commit d4f9656d56cc495e1df78eaf1f25f82c18640e02
Author: JunRuiLee <jr...@gmail.com>
AuthorDate: Thu Dec 15 18:59:36 2022 +0800

    [FLINK-30358][runtime-web] Exception location links to taskManagers UI.
---
 .../src/app/pages/job/exceptions/job-exceptions.component.html | 10 +++++++++-
 .../src/app/pages/job/exceptions/job-exceptions.component.ts   | 10 +++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

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 2ae429299b6..6f43632d4a7 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
@@ -78,7 +78,15 @@
                   </nz-option>
                 </nz-select>
               </td>
-              <td>{{ item.selected.location || '(unassigned)' }}</td>
+              <td class="clickable" (click)="navigateTo(item.selected.taskManagerId)">
+                <a>
+                  {{
+                    item.selected.location
+                      ? item.selected.taskManagerId + '(' + item.selected.location + ')'
+                      : '(unassigned)'
+                  }}
+                </a>
+              </td>
             </tr>
             <tr [nzExpand]="item.expand">
               <td colspan="5" class="expand-td">
diff --git a/flink-runtime-web/web-dashboard/src/app/pages/job/exceptions/job-exceptions.component.ts b/flink-runtime-web/web-dashboard/src/app/pages/job/exceptions/job-exceptions.component.ts
index 50db421230f..23797921ae4 100644
--- a/flink-runtime-web/web-dashboard/src/app/pages/job/exceptions/job-exceptions.component.ts
+++ b/flink-runtime-web/web-dashboard/src/app/pages/job/exceptions/job-exceptions.component.ts
@@ -19,6 +19,7 @@
 import { DatePipe, formatDate, NgForOf, NgIf } from '@angular/common';
 import { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef, OnDestroy } from '@angular/core';
 import { FormsModule } from '@angular/forms';
+import { Router } from '@angular/router';
 import { Subject } from 'rxjs';
 import { distinctUntilChanged, mergeMap, takeUntil, tap } from 'rxjs/operators';
 
@@ -103,7 +104,8 @@ export class JobExceptionsComponent implements OnInit, OnDestroy {
   constructor(
     private readonly jobService: JobService,
     private readonly jobLocalService: JobLocalService,
-    private readonly cdr: ChangeDetectorRef
+    private readonly cdr: ChangeDetectorRef,
+    private readonly router: Router
   ) {}
 
   public ngOnInit(): void {
@@ -151,4 +153,10 @@ export class JobExceptionsComponent implements OnInit, OnDestroy {
         });
       });
   }
+
+  public navigateTo(taskManagerId: string | null): void {
+    if (taskManagerId !== null) {
+      this.router.navigate(['task-manager', taskManagerId, 'metrics']).then();
+    }
+  }
 }