Skip to content

Commit

Permalink
[FLINK-30358][runtime-web] Exception location links to taskManagers UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
JunRuiLee authored and zhuzhurk committed Dec 26, 2022
1 parent 10fc197 commit d4f9656
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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();
}
}
}

0 comments on commit d4f9656

Please sign in to comment.