Skip to content

Commit 6f8d480

Browse files
committed
[FLINK-38899][runtime-web] Introduce the Rescales/History sub-page for streaming jobs with the adaptive scheduler enabled - Temporary commit for review (Changed the display method when the variable is empty)
1 parent 32ee6d3 commit 6f8d480

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

flink-runtime-web/web-dashboard/src/app/pages/job/rescales/job-rescales.component.html

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,28 @@
9393
{{ truncateUuid(history.resourceRequirementsUuid) }}
9494
</td>
9595
<td>{{ history.triggerCause }}</td>
96-
<td><flink-job-badge [state]="history.terminalState"></flink-job-badge></td>
97-
<td>{{ history.terminatedReason }}</td>
96+
<td>
97+
<flink-job-badge
98+
*ngIf="history.terminalState"
99+
[state]="history.terminalState"
100+
></flink-job-badge>
101+
<span *ngIf="!history.terminalState">-</span>
102+
</td>
103+
<td>{{ history.terminatedReason || '-' }}</td>
98104
<td>{{ history.startTimestampInMillis | date: 'yyyy-MM-dd HH:mm:ss.SSS' }}</td>
99105
<td>
100-
{{ history.endTimestampInMillis - history.startTimestampInMillis | humanizeDuration }}
106+
{{
107+
(history.endTimestampInMillis || Date.now()) - history.startTimestampInMillis
108+
| humanizeDuration
109+
}}
110+
</td>
111+
<td>
112+
{{
113+
history.endTimestampInMillis
114+
? (history.endTimestampInMillis | date: 'yyyy-MM-dd HH:mm:ss.SSS')
115+
: '-'
116+
}}
101117
</td>
102-
<td>{{ history.endTimestampInMillis | date: 'yyyy-MM-dd HH:mm:ss.SSS' }}</td>
103118
</tr>
104119
<tr [nzExpand]="isExpanded(history.rescaleUuid)">
105120
<td colspan="10" *ngIf="isExpanded(history.rescaleUuid)" class="collapse-td">
@@ -130,12 +145,12 @@ <h3><strong>Rescale Details</strong></h3>
130145
<nz-divider nzType="vertical"></nz-divider>
131146
<span>
132147
<strong>Terminal State:</strong>
133-
{{ history.terminalState }}
148+
{{ history?.terminalState || '-' }}
134149
</span>
135150
<nz-divider nzType="vertical"></nz-divider>
136151
<span>
137152
<strong>Terminal Reason:</strong>
138-
{{ history.terminatedReason }}
153+
{{ history?.terminatedReason || '-' }}
139154
</span>
140155
</td>
141156
</tr>

flink-runtime-web/web-dashboard/src/app/pages/job/rescales/job-rescales.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export class JobRescalesComponent implements OnInit, OnDestroy {
7171
public rescalesConfig?: JobRescaleConfigInfo;
7272
public jobDetail: JobDetail;
7373
public expandedRowsSet = new Set<string>();
74+
public readonly Date = Date;
7475

7576
private refresh$ = new Subject<void>();
7677
private destroy$ = new Subject<void>();

0 commit comments

Comments
 (0)